Under Linux, you can create an ISO image from a folder using a command line argument with the mkisofs tools. The following example creates an ISO image suitable to be used under Windows:
mkisofs -J -l -R -V "Label CD" -iso-level 4 -o output.iso input_directory
The -J option is used to generate Joliet directory records in addition to regular ISO9660 filenames (useful when the discs are to be used on Windows machines). When using the -J, it is recommended to add the -R option (Rock Ridge protocol). Finally, the -l option manages the long names.
If you want to create an ISO image for your Linux box only, simply type:
mkisofs -o output.iso input_directory
Then, you will need to mount it. Use Daemon tools (or equivalent under Windows) and the following syntax under Linux
First, to read the ISO file:
mdconfig -a -f ./image.iso
The command mdconfig returns the relevant memory disk (let us say md0). Now, you need to mount it:
mount -t cd9660 /dev/md0 /mnt
Those two commands could be put together in one command line:
mount -t cd9660 /dev/`mdconfig -a -f ./image.iso` /mnt
Once done, don’t forget to umount the disk:
umount /mnt
mdconfig -d -u 0
One Response to How to create an ISO image from a Folder (linux)