Using genisoimage to Create ISO FilesFor this task we will use the genisoimage tool, which is developed as part of the cdrkit project, and is based upon the mkisofs code. genisoimage is a command-line tool that lets you create ISO 9660 filesystem images, which can be burned to a CD or DVD using a burning application. To install this program in Ubuntu or Mint, open a terminal and type:
sudo apt-get install genisoimage
Making ISO FilesThe simplest way to use it is like this:
genisoimage -o ouput_file.iso input_directoryThis will create an ISO image called output_file.iso from the contents of input_directory. Keep in mind that the image will include input_directory as the root directory.
Here is an example of how it works:
genisoimage -o output_file.iso file1 file2 file3This command will create an image with file1, file2 and file3, and will have no root directory.
To preserve file permissions, there is the -R switch, which makes genisoimage to use the Rock Ridge protocol. This will also enable longer filenames and support for symbolic links and device files:
genisoimage -R -o output_file.iso input_directory
Creating ISO Images from CDs/DVDsFor this we will use the dd tool, which is used to create or copy files formatting them using a specified filesystem. First, unmount the device if it is already mounted:
sudo umount /dev/cdrwYour device may have a different name, e.g. /dev/cdrom, /dev/scd or /dev/sdc, depending on its type, so replace it accordingly. The command to create an image is the following:
dd if=/dev/cdrw of=$HOME/output_file.isoif stands for input file, of for output file. The image will be created inside your home directory.
Creating ISO Images from Audio CDsUse the following command:
cat /dev/cdrw > $HOME/audio_file.isoReplace your device if needed. Your file will be located inside your home directory.
ResourcesThis tutorial is based on this guide, written a while ago. This version is more complete.