This tutorial explains how to easily create ISO images using the terminal.
Using genisoimage to Create ISO Files
For 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 Files
The simplest way to use it is like this:
genisoimage -o ouput_file.iso input_directory
This 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:
In order to create an image out of several files and folders and without including a root directory, use:
genisoimage -o output_file.iso file1 file2 file3
This 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/DVDs
For 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/cdrw
Your 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.iso
if stands for input file, of for output file. The image will be created inside your home directory.
Creating ISO Images from Audio CDs
Use the following command:
cat /dev/cdrw > $HOME/audio_file.iso
Replace your device if needed. Your file will be located inside your home directory.
Resources
This tutorial is based on this guide, written a while ago. This version is more complete.
By Craciun Dan on October 19, 2013 | Updated: February 26, 2013 | v0.2.0 r2
TuxArena Projects
Search
Online Readers