Wednesday, 25 March 2009

Tip of the Day: Create an ISO Image from a Directory Using CLI

For this tip we'll be using genisoimage, a command-line tool which allows the creation of ISO9660 filesystems with Rock Ridge attributes (which provide support for file permissions and ownership).

To install it, type in the terminal the following command as root:

apt-get install genisoimage

The simplest way to create an ISO image is like this:

genisoimage -o cd.iso directory_name

This command will create an ISO image with directory_name being the root directory. If you want to include more than one file (or directory) inside the image (without having a single root directory), you can run it like this:

genisoimage -o cd.iso filename_1 filename_2 filename_3

If you need the Rock Ridge extensions, then issue:

genisoimage -o cd.iso -R directory_name

No comments: