Specifications
write output to take directory as input
The option '−r' sets the permissions of all files to be public readable on the CD and enables
RockRidge−extensions. You probably want to use this option unless you really know what you're doing (hint:
without '−r' the mount point gets the permissions of private_collection!).
mkisofs will try to map all filenames to the 8.3 format used by DOS to ensure the highest possible
compatibility. In case of naming conflicts (different files have the same 8.3 name), numbers are used in the
filenames and information about the chosen filename is printed via STDERR (usually the screen). Don't
panic: Under Linux you will never see these odd 8.3 filenames because Linux makes use of the Rock Ridge
extensions which contain the original file information (permissions, filename, etc.).
Remeber do use the Option −J (MS Joliet extensions) or use mkhybrid if you want to generate a more
Windows−friendly CD−ROM. For HFS CD−ROMS used on the Macintosh, you better read the man−page of
mkisofs' bigger sister mkhybrid for details on various options.
Now you may wonder why the output of mkisofs is not directly sent to the writer device. There are three
reasons:
• mkisofs knows nothing about driving CD−writers.
• You may want to test the image before burning it.
• On slow machines it would not be reliable (see section 4.).
There is a method to write a CD−R in one go, which will be described below.
One also could think of creating an extra partition and writing the image to that partition instead to a file. I
vote against such a strategy because if you write to the wrong partition due to a typo, you can lose your
complete Linux system. Read: that happened to me... Furthermore, it is a waste of disk space because the
CD−image is temporary data that can be deleted after writing the CD. However, using raw partitions saves
you the time for deleting files of 650 MB size.
Test the CD−image
Linux has the ability to mount files as if they were disk partitions. This feature is useful to check that the
directory layout and file access permissions of the CD image matches your wishes. Although media is very
cheap today, the writing process is still time consuming, and you may at least want to save your time by
doing a quick test.
To mount the file cd_image created above on the directory /cdrom, give the command
mount −t iso9660 −o ro,loop=/dev/loop0 cd_image /cdrom
Now you can inspect the files under /cdrom −− they appear exactly as they were on a real CD. To umount
the CD−image, just say umount /cdrom. (Warning: On Linux kernels prior to 2.0.31 the last file on
CD−Writing HOWTO
Test the CD−image 16