Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

mkisofs

News Working with ISO Images in Linux Recommended Links Options Configuration Examples
Working with ISO Images Partimage Horror Stories Unix History Humor Etc

mkisofs is effectively a pre-mastering program to generate an ISO9660/JOLIET/HFS filesystem usually called ISO file or ISO image. mkisofs takes a snapshot of a given directory tree, and generates a binary image which will correspond to an ISO9660 or HFS filesystem when written to a block device. Note that mkisofs is not designed to communicate with the writer directly. Most writers have proprietary command sets which vary from one manufacturer to another, and you need a specialized tool to actu- ally burn the disk. The cdrecord utility is a related utility capable of burning an actual disc. The latest version of cdrecord is available from ftp://ftp.berlios.de/pub/cdrecord

mkisofs [ options ] [ -o filename ] pathspec [pathspec ...]

mkisofs is capable of generating the System Use Sharing Protocol records (SUSP) specified by the Rock Ridge Interchange Protocol. This is used to further describe the files in the iso9660 filesystem to a unix host, and provides information such as longer filenames, uid/gid, posix permissions, symbolic links, block and character devices.

If Joliet or HFS hybrid command line options are specified, mkisofs will create additional filesystem meta data for Joliet or HFS. The file content in this case refers to the same data blocks on the media. It will generate a pure ISO9660 filesystem unless the Joliet or HFS hybrid command line options are given.

mkisofs can generate a true (or shared) HFS hybrid filesystem. The same files are seen as HFS files when accessed from a Macintosh and as ISO9660 files when accessed from other machines. HFS stands for Hierar- chical File System and is the native file system used on Macintosh com- puters.

As an alternative, mkisofs can generate the Apple Extensions to ISO9660 for each file. These extensions provide each file with CREATOR, TYPE and certain Finder Flags when accessed from a Macintosh. See the HFS MACINTOSH FILE FORMATS section below.

 

When used with various HFS options, mkisofs will attempt to recognise files stored in a number of Apple/Unix file formats and will copy the data and resource forks as well as any relevant finder information. See the HFS MACINTOSH FILE FORMATS section below for more about formats mkisofs supports.

Note that mkisofs is not designed to communicate with the writer directly. Most writers have proprietary command sets which vary from one manufacturer to another, and you need a specialized tool to actu- ally burn the disk.

Also you should know that most cd writers are very particular about timing. Once you start to burn a disc, you cannot let their buffer empty before you are done, or you will end up with a corrupt disc. Thus it is critical that you be able to maintain an uninterrupted data stream to the writer for the entire time that the disc is being writ- ten.

pathspec is the path of the directory tree to be copied into the iso9660 filesystem. Multiple paths can be specified, and mkisofs will merge the files found in all of the specified path components to form the cdrom image.

If the option -graft-points has been specified, it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the cdrom image with names different than what they have in the source filesystem. This is easiest to illustrate with a couple of examples. Let’s start by assuming that a local file ../old.lis exists, and you wish to include it in the cdrom image.

foo/bar/=../old.lis
will include the file old.lis in the cdrom image at /foo/bar/old.lis, while
foo/bar/xxx=../old.lis
will include the file old.lis in the cdrom image at /foo/bar/xxx. The same sort of syntax can be used with directories as well. mkisofs will create any directories required such that the graft points exist on the cdrom image - the directories do not need to appear in one of the paths. By default, any directories that are created on the fly like this will have permissions 0555 and appear to be owned by the person running mkisofs. If you wish other permissions or owners of the intermediate directories, see -uid, -gid, -dir-mode, -file-mode and -new-dir-mode.

mkisofs will also run on Win9X/NT4 machines when compiled with Cygnus’ cygwin (available from http://sourceware.cygnus.com/cygwin/). Therefore most references in this man page to Unix can be replaced with Win32.

Options