Genisoimage – Creates ISO-9660 CD-ROM filesystem images

genisoimage is a pre-mastering program for creating ISO-9660 CD-ROM filesystem images, which can then be written to CD or DVD media using the wodim program. genisoimage includes support for making bootable “El Torito” CDs, as well as CDs with support for the Macintosh HFS filesystem.

The package also includes extra tools useful for working with ISO images:

* mkzftree – create ISO-9660 image with compressed contents

* dirsplit – easily separate large directory contents into disks of
predefined size

* geteltorito – extract an El Torito boot image from a CD image

Install genisoimage in Debian

#apt-get install genisoimage

This will complete the installation

Using genisoimage

genisoimage Syntax

genisoimage [options] [-o filename] pathspec [pathspec …]

genisoimage Examples

To create a vanilla ISO9660 filesystem image in the file cd.iso, where the directory cd_dir will become the root directory if the CD, call:

genisoimage -o cd.iso cd_dir

To create a CD with Rock Ridge extensions of the source directory cd_dir:

genisoimage -o cd.iso -R cd_dir

To create a CD with Rock Ridge extensions of the source directory cd_dir where all files have at least read permission and all files are owned by root, call:

genisoimage -o cd.iso -r cd_dir

To write a tar archive directly to a CD that will later contain a simple ISO9660 filesystem with the tar archive call:

tar cf – . | genisoimage -stream-media-size 333000 | rs

wodim dev=b,t,l -dao tsize=333000s –

To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of the source directory cd_dir:

genisoimage -o cd.iso -R -J -hfs cd_dir

To create a HFS hybrid CD from the source directory cd_dir that contains Netatalk Apple/Unix files:

genisoimage -o cd.iso –netatalk cd_dir

To create a HFS hybrid CD from the source directory cd_dir, giving all files CREATOR and TYPES based on just their filename extensions listed in the file “mapping”.:

genisoimage -o cd.iso -map mapping cd_dir

To create a CD with the Apple Extensions to ISO9660, from the source directories cd_dir and another_dir. Files in all the known Apple/Unix format are decoded and any other files are given CREATOR and TYPE based on their magic number given in the file magic:

genisoimage -o cd.iso -apple -magic magic -probe rs

cd_dir another_dir

The following example puts different files on the CD that all have the name README, but have different contents when seen as a ISO9660/Rock Ridge, Joliet or HFS CD.

Current directory contains:

ls -F

README.hfs README.joliet README.Unix cd_dir/

The following command puts the contents of the directory cd_dir on the CD along with the three README files — but only one will be seen from each of the three filesystems:

genisoimage -o cd.iso -hfs -J -r -graft-points rs

-hide README.hfs -hide README.joliet rs

-hide-joliet README.hfs -hide-joliet README.Unix rs

-hide-hfs README.joliet -hide-hfs README.Unix rs

README=README.hfs README=README.joliet rs

README=README.Unix cd_dir

i.e. the file README.hfs will be seen as README on the HFS CD and the other two README files will be hidden. Similarly for the Joliet and ISO9660/Rock Ridge CD.

There are probably all sorts of strange results possible with combinations of the hide options …

Sponsored Link

If you want to know more option check genisoimage man page

Leave a comment

Your email address will not be published. Required fields are marked *