Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / genisoimage / genisoimage.1
1 '\" t
2 .\" genisoimage.1 -*- nroff -*-  To render, first run through tbl
3 .\" Copyright 1993-1998 by Yggdrasil Computing
4 .\" Copyright 1996-1997 by Robert Leslie
5 .\" Copyright 1997-2001 by James Pearson
6 .\" Copyright 1999-2006 by Joerg Schilling
7 .\" Copyright 2002-2003 by Jungshik Shin
8 .\" Copyright 2003 by Jaakko Heinonen
9 .\" Copyright 2006 by the Cdrkit maintainers
10 .\"
11 .TH GENISOIMAGE 1 "13 Dec 2006"
12 .\" ----------------------------------------
13 .SH NAME
14 genisoimage \- create ISO9660/Joliet/HFS filesystem with optional Rock Ridge attributes
15 .\" ----------------------------------------
16 .SH SYNOPSIS
17 .B genisoimage
18 .RI [ options ]
19 .RB [ \-o
20 .IR filename ]
21 .IR pathspec " [" "pathspec ..." ]
22 .\" ----------------------------------------
23 .SH DESCRIPTION
24 .B genisoimage
25 is a pre-mastering program to generate ISO9660/Joliet/HFS hybrid
26 filesystems.
27 .PP
28 .B genisoimage
29 is capable of generating the 
30 .B System Use Sharing Protocol records (SUSP)
31 specified by the
32 .BR "Rock Ridge Interchange Protocol" .
33 This is used to further describe the
34 files in the ISO9660 filesystem to a Unix host, and provides information such
35 as long filenames, UID/GID, POSIX permissions, symbolic links, and
36 block and character device files.
37 .PP
38 If Joliet or HFS hybrid command line options are specified, 
39 .B genisoimage
40 will create the additional filesystem metadata needed for Joliet or HFS.
41 Otherwise
42 .B genisoimage
43 will generate a pure ISO9660 filesystem.
44 .PP
45 .B genisoimage
46 can generate a 
47 .I true
48 (or
49 .IR shared )
50 HFS hybrid filesystem. The same files are seen as HFS files when
51 accessed from a Macintosh and as ISO9660 files when accessed from other 
52 machines. HFS stands for
53 .I Hierarchical File System
54 and is the native filesystem used on Macintosh computers.
55 .PP
56 As an alternative,
57 .B genisoimage
58 can generate the
59 .I Apple Extensions to ISO9660
60 for each file. These extensions provide each file with CREATOR, TYPE and
61 certain Finder flags when accessed from a Macintosh. See the
62 .B HFS MACINTOSH FILE FORMATS
63 section below.
64 .PP
65 .B genisoimage
66 takes a snapshot of a given directory tree, and generates a
67 binary image which will correspond to an ISO9660 and/or HFS filesystem when
68 written to a block device.
69 .PP
70 Each file written to the ISO9660 filesystem must have a filename in the 8.3
71 format (up to 8 characters, period, up to 3 characters, all uppercase), even
72 if Rock Ridge is in use.  This filename is used on systems that are not able
73 to make use of the Rock Ridge extensions (such as MS-DOS), and each filename
74 in each directory must be different from the other filenames in the same
75 directory.
76 .B genisoimage
77 generally tries to form correct names by forcing the Unix filename to
78 uppercase and truncating as required, but often this yields unsatisfactory
79 results when the truncated names are not all unique.
80 .B genisoimage
81 assigns weightings to each filename, and if two names that are otherwise the
82 same are found, the name with the lower priority is renamed to include a
83 3-digit number (guaranteed to be unique).  For example, the two files
84 .I foo.bar
85 and
86 .I foo.bar.~1~
87 could be rendered as
88 .I FOO.BAR;1
89 and
90 .IR FOO000.BAR;1 .
91 .PP
92 When used with various HFS options,
93 .B genisoimage
94 will attempt to recognise files stored in a number of Apple/Unix file formats
95 and will copy the data and resource forks as well as any
96 relevant Finder information. See the
97 .B HFS MACINTOSH FILE FORMATS
98 section below for more about formats
99 .B genisoimage
100 supports.
101 .PP
102 Note that
103 .B genisoimage
104 is not designed to communicate with the writer directly.  Most writers
105 have proprietary command sets which vary from one manufacturer to
106 another, and you need a specialized tool to actually burn the disc.
107 .B wodim
108 is one such tool.  The latest version of
109 .B wodim
110 is available from
111 .IR http://www.cdrkit.org/ .
112 .PP
113 .B pathspec
114 is the path of the directory tree to be copied into the ISO9660 filesystem.
115 Multiple paths can be specified, and
116 .B genisoimage
117 will merge the files found in all of the specified path components to
118 form the filesystem image.
119 .PP
120 If the option
121 .B \-graft\-points
122 has been specified, it is possible to graft the paths at points other
123 than the root directory, and it is possible to graft files or
124 directories onto the cdrom image with names different than what they
125 have in the source filesystem.  This is easiest to illustrate with a
126 couple of examples.  Let's start by assuming that a local file
127 .I ../old.lis
128 exists, and you wish to include it in the cdrom image.
129 .IP
130 foo/bar/=../old.lis
131 .PP
132 will include
133 .I old.lis
134 in the cdrom image at
135 .IR /foo/bar/old.lis ,
136 while
137 .IP
138 foo/bar/xxx=../old.lis
139 .PP
140 will include 
141 .I old.lis
142 in the cdrom image at
143 .IR /foo/bar/xxx .
144 The same sort of syntax can be used with directories as well.
145 .B genisoimage
146 will create any directories required such that the graft
147 points exist on the cdrom image \(em the directories do not need to
148 appear in one of the paths.  By default, any directories that are created on 
149 the fly like this will have permissions 0555 and appear to be owned by the
150 person running
151 .BR genisoimage .
152 If you wish other permissions or owners of
153 the intermediate directories, see
154 .BR \-uid ", " \-gid ", " \-dir\-mode ", " \-file\-mode " and " \-new\-dir\-mode .
155 .PP
156 .B genisoimage
157 will also run on Windows machines when compiled with Cygnus' cygwin
158 (available from
159 .IR http://www.cygwin.com/ ).
160 Therefore most references in this man page to
161 .I Unix
162 can be replaced with
163 .IR Win32 .
164 .\" ----------------------------------------
165 .SH OPTIONS
166 .PP
167 Several options can be specified as defaults in a
168 .I .genisoimagerc
169 configuration file, as well as on the command line.  If a parameter is
170 specified in both places, the setting from the command line is used.
171 For details on the format and possible locations of this file, see
172 .BR genisoimagerc (5).
173 .TP
174 .BI \-abstract " file"
175 Specifies the abstract filename.  There is space for 37 characters.
176 Equivalent to
177 .B ABST
178 in the
179 .I .genisoimagerc
180 file.
181 .TP
182 .BI \-A " application_id"
183 Specifies a text string that will be written into the volume header.
184 This should describe the application that will be on the disc.  There
185 is space for 128 characters.  Equivalent to
186 .B APPI
187 in the
188 .I .genisoimagerc
189 file.
190 .TP
191 .B \-allow\-limited\-size
192 When processing files larger than 2GiB which cannot be easily represented in
193 ISO9660, add them with a shrunk visible file size to ISO9660 and with the
194 correct visible file size to the UDF system. The result is an inconsistent
195 filesystem and users need to make sure that they really use UDF rather than
196 ISO9660 driver to read a such disk. Implies enabling
197 .BR \-udf.
198 .TP
199 .B \-allow\-leading\-dots
200 .TP
201 .B \-ldots
202 Allow ISO9660 filenames to begin with a period.  Usually, a leading dot is
203 replaced with an underscore in order to maintain MS-DOS compatibility.
204 .br
205 This violates the ISO9660 standard, but it happens to work on many systems.
206 Use with caution.
207 .TP
208 .B \-allow\-lowercase
209 This options allows lowercase characters to appear in ISO9660 filenames.
210 .br
211 This violates the ISO9660 standard, but it happens to work on some systems.
212 Use with caution.
213 .TP
214 .B \-allow\-multidot
215 This options allows more than one dot to appear in ISO9660 filenames.
216 A leading dot is not affected by this option, it
217 may be allowed separately using
218 .BR \-allow\-leading\-dots .
219 .br
220 This violates the ISO9660 standard, but it happens to work on many systems.
221 Use with caution.
222 .TP
223 .BI \-biblio " file"
224 Specifies the bibliographic filename.  There is space for 37 characters.
225 Equivalent to
226 .B BIBL
227 in the
228 .I .genisoimagerc
229 file.
230 .TP
231 .B \-cache\-inodes
232 .TP
233 .B \-no\-cache\-inodes
234 Enable or disable caching inode and device numbers to find hard links
235 to files.  If
236 .B genisoimage
237 finds a hard link (a file with multiple names), the file will also be
238 hard-linked on the CD, so the file contents only appear once.  This
239 helps to save space.
240 .B \-cache\-inodes
241 is default on Unix-like operating systems, but
242 .B \-no\-cache\-inodes
243 is default on some other systems such as Cygwin, because it is not safe
244 to assume that inode numbers are unique on those systems.  (Some
245 versions of Cygwin create fake inode numbers using a weak hashing
246 algorithm, which may produce duplicates.)  If two files have the same
247 inode number but are not hard links to the same file,
248 .B genisoimage \-cache\-inodes
249 will not behave correctly.
250 .B \-no\-cache\-inodes
251 is safe in all situations, but in that case
252 .B genisoimage
253 cannot detect hard links, so the resulting CD image may be larger
254 than necessary.
255 .TP
256 .BI \-alpha\-boot " alpha_boot_image"
257 Specifies the path and filename of the boot image to be used when
258 making an Alpha/SRM bootable CD. The pathname must be relative to the
259 source path specified to
260 .BR genisoimage .
261 .TP
262 .BI \-hppa\-bootloader " hppa_bootloader_image"
263 Specifies the path and filename of the boot image to be used when
264 making an HPPA bootable CD. The pathname must be relative to the
265 source path specified to
266 .BR genisoimage .
267 Other options are required, at the very least a kernel filename and
268 a boot command line.  See the
269 .B HPPA NOTES
270 section below for more information.
271 .TP
272 .BI \-hppa\-cmdline " hppa_boot_command_line"
273 Specifies the command line to be passed to the HPPA boot loader when
274 making a bootable CD. Separate the parameters with spaces or
275 commas. More options must be passed to
276 .B genisoimage,
277 at the very least a kernel filename and the boot loader filename.
278 See the
279 .B HPPA NOTES
280 section below for more information.
281 .TP
282 .BI \-hppa\-kernel\-32 " hppa_kernel_32"
283 .TP
284 .BI \-hppa\-kernel\-64 " hppa_kernel_64"
285 Specifies the path and filename of the 32-bit and/or 64-bit kernel images
286 to be used when making an HPPA bootable CD. The pathnames must be
287 relative to the source path specified to
288 .BR genisoimage .
289 Other options are required, at the very least the boot loader filename
290 and the boot command line.  See the
291 .B HPPA NOTES
292 section below for more information.
293 .TP
294 .BI \-hppa\-ramdisk " hppa_ramdisk_image"
295 Specifies the path and filename of the ramdisk image to be used when
296 making an HPPA bootable CD. The pathname must be relative to the
297 source path specified to
298 .BR genisoimage .
299 This parameter is optional.  Other options are required, at the very
300 least a kernel filename and the boot command line. See the
301 .B HPPA NOTES
302 section below for more information.
303 .TP
304 .BI \-mips\-boot " mips_boot_image"
305 Specifies the path and filename of the boot image to be used when
306 making an SGI/big-endian MIPS bootable CD. The pathname must be
307 relative to the source path specified to
308 .BR genisoimage .
309 This option may be specified several times, to store up to 15 boot
310 images.
311 .TP
312 .BI \-mipsel\-boot " mipsel_boot_image"
313 Specifies the path and filename of the boot image to be used when
314 making an DEC/little-endian MIPS bootable CD. The pathname must be
315 relative to the source path specified to
316 .BR genisoimage .
317 .TP
318 .BI \-B " img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e"
319 .TP
320 .BI \-sparc\-boot " img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e"
321 Specifies a comma-separated list of boot images that are needed to make
322 a bootable CD for SPARC systems.
323 Partition 0 is used for the ISO9660 image, the first image file is mapped
324 to partition 1.
325 The comma-separated list may have up to 7 fields, including empty fields.
326 This option is required to make a bootable CD for Sun SPARC systems.
327 If
328 .B \-B
329 or
330 .B \-sparc\-boot
331 has been specified, the first sector of the resulting image will
332 contain a Sun disk label. This disk label specifies slice 0 for the
333 ISO9660 image and slices 1 to 7 for the boot images that
334 have been specified with this option. Byte offsets 512 to 8191
335 within each of the additional boot images must contain a primary boot
336 that works for the appropriate SPARC architecture. The rest of each
337 of the images usually contains a UFS filesystem used for the primary
338 kernel boot stage.
339 .IP
340 The implemented boot method is the one found with SunOS 4.x and SunOS 5.x.
341 However, it does not depend on SunOS internals but only on properties of
342 the Open Boot prom, so it should be usable for any OS for SPARC systems.
343 For more information also see the 
344 .B NOTES
345 section below.
346 .IP
347 If the special filename
348 .B ...
349 is used, the actual and all following boot partitions are mapped to the
350 previous partition. If
351 .B genisoimage
352 is called with
353 .BI \-G " image " \-B " ..."
354 all boot partitions are mapped to the partition that contains the ISO9660
355 filesystem image and the generic boot image that is located in the first
356 16 sectors of the disc is used for all architectures.
357 .TP
358 .BI \-G " generic_boot_image"
359 Specifies the path and filename of the generic boot image to be used when making
360 a generic bootable CD.  The boot image will be placed on the first 16
361 sectors of the CD, before the ISO9660 primary volume descriptor.
362 If this option is used together with
363 .BR \-sparc\-boot ,
364 the Sun disk label will overlay the first 512 bytes of the generic
365 boot image.
366 .TP
367 .BI \-b " eltorito_boot_image"
368 Specifies the path and filename of the boot image to be used when making
369 an El Torito bootable CD for x86 PCs. The pathname must be relative to
370 the source path specified to
371 .BR genisoimage .
372 This option is required to make an El Torito bootable CD.
373 The boot image must be exactly 1200 kB, 1440 kB or 2880 kB, and
374 .B genisoimage
375 will use this size when creating the output ISO9660 filesystem.  The PC
376 BIOS will use the image to emulate a floppy disk, so the first 512-byte
377 sector should contain PC boot code.  This will work, for example, if
378 the boot image is a LILO-based boot floppy.
379 .IP
380 If the boot image is not an image of a floppy, you need to add either
381 .BR \-hard\-disk\-boot " or " \-no\-emul\-boot .
382 If the system should not boot off the emulated disk, use
383 .BR \-no\-boot .
384 .IP
385 If
386 .B \-sort
387 has not been specified, the boot images are sorted
388 with low priority (+2) to the beginning of the medium.
389 If you don't like this, you need to specify a sort weight of 0 for the boot images.
390 .TP
391 .B \-eltorito\-alt\-boot
392 Start with a new set of El Torito boot parameters.  Up to 63 El Torito
393 boot entries may be stored on a single CD.
394 .TP
395 .BI \-hard\-disk\-boot
396 Specifies that the boot image used to create El Torito bootable CDs is
397 a hard disk image. The image must begin with a master boot
398 record that contains a single partition.
399 .TP
400 .BI \-no\-emul\-boot
401 Specifies that the boot image used to create El Torito bootable CDs is
402 a "no emulation" image. The system will load and execute this image without
403 performing any disk emulation.
404 .TP
405 .BI \-no\-boot
406 Specifies that the created El Torito CD should be marked as not bootable. The
407 system will provide an emulated drive for the image, but will boot off
408 a standard boot device.
409 .TP
410 .BI \-boot\-load\-seg " segment_address"
411 Specifies the load segment address of the boot image for no-emulation
412 El Torito CDs.
413 .TP
414 .BI \-boot\-load\-size " load_sectors"
415 Specifies the number of "virtual" (512-byte) sectors to load in
416 no-emulation mode.  The default is to load the entire boot file.  Some
417 BIOSes may have problems if this is not a multiple of 4.
418 .TP
419 .B \-boot\-info\-table
420 Specifies that a 56-byte table with information of the CD-ROM layout
421 will be patched in at offset 8 in the boot file.  If this option is
422 given, the boot file is
423 .IR "modified in the source filesystem" ,
424 so make a copy of this file if it cannot be easily regenerated!
425 See the
426 .B EL TORITO BOOT INFO TABLE
427 section for a description of this table.
428 .TP
429 .BI \-C " last_sess_start,next_sess_start"
430 This option is needed to create a CD Extra or the image of a second
431 session or a higher-level session for a multisession disc.
432 .B \-C
433 takes two numbers separated by a comma. The first is the first sector
434 in the last session of the disc that should be appended to.
435 The second number is the starting sector number of the new session.
436 The correct numbers may be retrieved by calling
437 .B wodim \-msinfo ...
438 If
439 .B \-C
440 is used in conjunction with
441 .BR \-M ,
442 .B genisoimage
443 will create a filesystem image that is intended to be a continuation
444 of the previous session.
445 If
446 .B \-C
447 is used without
448 .BR \-M ,
449 .B genisoimage
450 will create a filesystem image that is intended to be used for a second
451 session on a CD Extra. This is a multisession CD that holds audio data
452 in the first session and an ISO9660 filesystem in the second session.
453 .TP
454 .BI \-c " boot_catalog"
455 Specifies the path and filename of the boot catalog, which is required
456 for an El Torito bootable CD. The pathname must be relative to the source
457 path specified to
458 .BR genisoimage .
459 This file will be inserted into the output tree and not created
460 in the source filesystem, so be
461 sure the specified filename does not conflict with an existing file, or
462 it will be excluded. Usually a name like
463 .I boot.catalog
464 is chosen.
465 .IP
466 If
467 .B \-sort
468 has not been specified, the boot catalog sorted
469 with low priority (+1) to the beginning of the medium.
470 If you don't like this, you need to specify a sort weight of 0 for the boot catalog.
471 .TP
472 .B \-check\-oldnames
473 Check all filenames imported from the old session for compliance with
474 the ISO9660 file naming rules.
475 Without this option, only names longer than 31 characters are checked,
476 as these files are a serious violation of the ISO9660 standard.
477 .TP
478 .BI \-check\-session " file"
479 Check all old sessions for compliance with actual
480 .B genisoimage 
481 ISO9660 file naming rules.
482 This is a high-level option that combines
483 .B \-M
484 .I file
485 .BR "\-C 0,0 \-check\-oldnames" .
486 For the parameter 
487 .IR file ,
488 see the description of
489 .BR \-M .
490 .TP
491 .BI \-copyright " file"
492 Specifies copyright information, typically a filename on the disc.
493 There is space for 37 characters.  Equivalent to
494 .B COPY
495 in the
496 .I .genisoimagerc
497 file.
498 .TP
499 .B \-d
500 Do not append a period to files that do not have one.
501 .br
502 This violates the ISO9660 standard, but it happens to work on many systems.
503 Use with caution.
504 .TP
505 .B \-D
506 Do not use deep directory relocation, and instead just pack them in the
507 way we see them.
508 .br
509 If ISO9660:1999 has not been selected,
510 this violates the ISO9660 standard, but it happens to work on many systems.
511 Use with caution.
512 .TP
513 .BI \-dir\-mode " mode"
514 Overrides the mode of directories used to create the image to
515 .IR mode ,
516 specified as 4 digits of permission bits as in
517 .BR chmod (1).
518 This option automatically enables Rock Ridge extensions.
519 .TP
520 .B \-dvd\-video
521 Generate a DVD-Video compliant UDF filesystem. This is done by sorting the
522 order of the content of the appropriate files and by adding padding 
523 between the files if needed.
524 Note that the sorting only works if the DVD-Video filenames include uppercase
525 characters only.
526 .IP
527 Note that in order to get a DVD-Video compliant filesystem image, you
528 need to prepare a DVD-Video compliant directory tree.  This requires a
529 directory
530 .B VIDEO_TS
531 (all caps) in the root directory of the resulting DVD, and usually
532 another directory
533 .BR AUDIO_TS .
534 .B VIDEO_TS
535 needs to include all needed files (filenames must be all caps) for a
536 compliant DVD-Video filesystem.
537 .TP
538 .B \-f
539 Follow symbolic links when generating the filesystem.  When this option is not
540 in use, symbolic links will be entered using Rock Ridge if enabled, otherwise
541 they will be ignored.
542 .TP
543 .BI \-file\-mode " mode"
544 Overrides the mode of regular files used to create the image to
545 .IR mode ,
546 specified as 4 digits of permission bits as in
547 .BR chmod (1).
548 This option automatically enables Rock Ridge extensions.
549 .TP
550 .BI \-gid " gid"
551 Overrides the group ID read from the source files to the value of
552 .IR gid . 
553 Specifying this option automatically enables Rock Ridge extensions.
554 .TP
555 .B \-gui
556 Switch the behaviour for a GUI. This currently makes the output more verbose
557 but may have other effects in the future.
558 .TP
559 .B \-graft\-points
560 Allow use of graft points for filenames. If this option is used, all
561 filenames are checked for graft points. The filename is divided at the
562 first unescaped equal sign. All occurrences of `\(rs' and `=' characters
563 must be escaped with `\(rs' if
564 .B \-graft\-points
565 has been specified.
566 .TP
567 .BI \-hide " glob"
568 Hide any files matching
569 .IR glob ,
570 a shell wildcard pattern, from being seen in the ISO9660 or Rock Ridge
571 directory.
572 .I glob
573 may match any part of the filename or path.  If
574 .I glob
575 matches a directory, the contents of that directory will be hidden.
576 In order to match a directory name, make sure the pathname does not include
577 a trailing `/' character.
578 All the hidden files will still be written to the output CD image file.
579 See also
580 .BR \-hide\-joliet ,
581 and
582 .IR README.hide .
583 This option may be used multiple times.
584 .TP
585 .BI \-hide\-list " file"
586 A file containing a list of shell wildcards to be hidden.  See
587 .BR \-hide .
588 .TP
589 .BI \-hidden " glob"
590 Add the hidden (existence) ISO9660 directory attribute for files and
591 directories matching
592 .IR glob ,
593 a shell wildcard pattern.  This attribute will prevent the files from
594 being shown by some MS-DOS and Windows commands.
595 .I glob
596 may match any part of the filename or path.
597 In order to match a directory name, make sure the pathname does not include
598 a trailing `/' character.
599 This option may be used multiple times.
600 .TP
601 .BI \-hidden\-list " file"
602 A file containing a list of shell wildcards to get the hidden
603 attribute.  See
604 .BR \-hidden .
605 .TP
606 .BI \-hide\-joliet " glob"
607 Hide files and directories matching
608 .IR glob ,
609 a shell wildcard pattern, from being seen in the Joliet directory.
610 .I glob
611 may match any part of the filename or path.  If
612 .I glob
613 matches a directory, the contents of that directory will be hidden.
614 In order to match a directory name, make sure the pathname does not include
615 a trailing `/' character.
616 All the hidden files will still be written to the output CD image file.
617 This option is usually used with
618 .BR \-hide .
619 See also
620 .IR README.hide .
621 This option may be used multiple times.
622 .TP
623 .BI \-hide\-joliet\-list " file"
624 A file containing a list of shell wildcards to be hidden from the
625 Joliet tree.  See
626 .BR \-hide\-joliet .
627 .TP
628 .B \-hide\-joliet\-trans\-tbl
629 Hide the
630 .I TRANS.TBL
631 files from the Joliet tree.
632 These files usually don't make sense in the Joliet world as they list
633 the real name and the ISO9660 name which may both be different from the
634 Joliet name.
635 .TP
636 .B \-hide\-rr\-moved
637 Rename the directory
638 .I RR_MOVED
639 to
640 .I .rr_moved
641 in the Rock Ridge tree.
642 It seems to be impossible to completely hide the
643 .I RR_MOVED
644 directory from the Rock Ridge tree.
645 This option only makes the visible tree less confusing for
646 people who don't know what this directory is for.
647 If you need to have no
648 .I RR_MOVED
649 directory at all, you should use
650 .BR \-D .
651 Note that if
652 .B \-D
653 has been specified, the resulting filesystem is not ISO9660
654 level-1 compliant and will not be readable on MS-DOS.
655 See also the
656 .B NOTES
657 section.
658 .TP
659 .BI \-input\-charset " charset"
660 Input charset that defines the characters used in local filenames.
661 To get a list of valid charset names, call
662 .BR "genisoimage \-input\-charset help" .
663 To get a 1:1 mapping, you may use
664 .B default
665 as charset name. The default initial values are
666 .I cp437
667 on DOS-based systems and
668 .I iso8859-1
669 on all other systems.  See the
670 .B CHARACTER SETS
671 section below for more details.
672 .TP
673 .BI \-output\-charset " charset"
674 Output charset that defines the characters that will be used in Rock Ridge
675 filenames.  Defaults to the input charset.  See
676 .B CHARACTER SETS
677 section below for more details.
678 .TP
679 .BI \-iso\-level " level"
680 Set the ISO9660 conformance level. Valid numbers are 1 to 4.
681 .IP
682 With level 1, files may only consist of one section and filenames are
683 restricted to 8.3 characters.
684 .IP
685 With level 2, files may only consist of one section.
686 .IP
687 With level 3, no restrictions (other than ISO-9660:1988) do apply.
688 .IP
689 With all ISO9660 levels from 1 to 3, all filenames are restricted to
690 uppercase letters, numbers and underscores (_). Filenames are
691 limited to 31 characters, directory nesting is limited to 8
692 levels, and pathnames are limited to 255 characters.
693 .IP
694 Level 4 officially does not exist but
695 .B genisoimage
696 maps it to ISO-9660:1999, which is ISO9660 version 2.
697 .IP
698 With level 4, an enhanced volume descriptor with version number
699 and file structure version number set to 2 is emitted.
700 Directory nesting is not limited to 8 levels,
701 there is no need for a file to contain a dot and the dot has no
702 special meaning, filenames do not have version numbers,
703 .\" (f XXX ??? The character used for filling byte positions which are
704 .\"     specified to be characters is subject to agreement between the
705 .\"     originator and the recipient of the volume),
706 and filenames can be up to 207 characters long, or 197 characters if
707 Rock Ridge is used.
708 .IP
709 When creating Version 2 images,
710 .B genisoimage
711 emits an enhanced volume descriptor, similar but not identical to a
712 primary volume descriptor. Be careful not to use broken software
713 to make ISO9660 images bootable by assuming a second PVD copy and patching 
714 this putative PVD copy into an El Torito VD.
715 .TP
716 .B \-J
717 Generate Joliet directory records in addition to regular ISO9660
718 filenames.  This is primarily useful when the discs are to be used on
719 Windows machines.  Joliet filenames are specified in Unicode and each
720 path component can be up to 64 Unicode characters long.
721 Note that Joliet is not a standard \(em only Microsoft Windows and Linux
722 systems can read Joliet extensions.  For greater portability, consider
723 using both Joliet and Rock Ridge extensions.
724 .TP
725 .B \-joliet\-long
726 Allow Joliet filenames to be up to 103 Unicode characters, instead of
727 64.  This breaks the Joliet specification, but appears to work. Use
728 with caution.
729 .\" The number 103 is derived from: the maximum Directory Record Length
730 .\" (254), minus the length of Directory Record (33), minus CD-ROM XA
731 .\" System Use Extension Information (14), divided by the UTF-16
732 .\" character size (2).
733 .TP
734 .BI \-jcharset " charset"
735 A combination of
736 .B \-J \-input\-charset
737 .IR charset .
738 See the
739 .B CHARACTER SETS
740 section below for more details.
741 .TP
742 .B \-l
743 Allow full 31-character filenames.  Normally the ISO9660 filename will be in an
744 8.3 format which is compatible with MS-DOS, even though the ISO9660 standard
745 allows filenames of up to 31 characters.  If you use this option, the disc may
746 be difficult to use on a MS-DOS system, but will work on most other systems.
747 Use with caution.
748 .TP
749 .B \-L
750 Outdated option; use
751 .B \-allow\-leading\-dots
752 instead.
753 .TP
754 .BI \-jigdo\-jigdo " jigdo_file"
755 Produce a
756 .B jigdo
757 .I .jigdo
758 metadata file as well as the filesystem image.  See the
759 .B JIGDO NOTES
760 section below for more information.
761 .TP
762 .BI \-jigdo\-template " template_file"
763 Produce a
764 .B jigdo
765 .I .template
766 file as well as the filesystem image.  See the
767 .B JIGDO NOTES
768 section below for more information.
769 .TP
770 .BI \-jigdo\-min\-file\-size " size"
771 Specify the minimum size for a file to be listed in the
772 .I .jigdo
773 file. Default (and minimum allowed) is 1KB. See the
774 .B JIGDO NOTES
775 section below for more information.
776 .TP
777 .BI \-jigdo\-force\-md5 " path"
778 Specify a file pattern where files
779 .I must
780 be contained in the externally-supplied MD5 list as supplied by
781 .BR \-md5\-list .
782 See the
783 .B JIGDO NOTES
784 section below for more information.
785 .TP
786 .BI \-jigdo\-exclude " path"
787 Specify a file pattern where files will not be listed in the
788 .I .jigdo
789 file. See the
790 .B JIGDO NOTES
791 section below for more information.
792 .TP
793 .BI \-jigdo\-map " path"
794 Specify a pattern mapping for the jigdo file
795 (e.g.
796 .IR Debian=/mirror/debian ).
797 See the
798 .B JIGDO NOTES
799 section below for more information.
800 .TP
801 .BI \-md5\-list " md5_file"
802 Specify a file containing the MD5sums, sizes and pathnames of the
803 files to be included in the
804 .I .jigdo
805 file. See the
806 .B JIGDO NOTES
807 section below for more information.
808 .TP
809 .BI \-jigdo\-template\-compress " algorithm
810 Specify a compression algorithm to use for template date. gzip and
811 bzip2 are currently supported, and gzip is the default. See the
812 .B JIGDO NOTES
813 section below for more information.
814 .TP
815 .BI \-log\-file " log_file"
816 Redirect all error, warning and informational messages to
817 .I log_file
818 instead of the standard error.
819 .TP
820 .BI \-m " glob"
821 Exclude files matching
822 .IR glob ,
823 a shell wildcard pattern, from being written to CD-ROM.
824 .I glob
825 may match either the filename component or the full pathname.
826 This option may be used multiple times.  For example:
827 .sp
828      genisoimage \-o rom \-m \(aq*.o\(aq \-m core \-m foobar
829 .sp
830 would exclude all files ending in `.o', or called
831 .IR core " or " foobar
832 from the image.  Note that if you had a directory called
833 .IR foobar ,
834 it too (and of course all its descendants) would be excluded.
835 .TP
836 .BI \-exclude\-list " file"
837 A file containing a list of shell wildcards to be excluded.  See
838 .BR \-m .
839 .TP
840 .B \-max\-iso9660\-filenames
841 Allow ISO9660 filenames to be up to 37 characters long.
842 This option enables
843 .B \-N
844 as the extra name space is taken from the space reserved for
845 file version numbers.
846 .br
847 This violates the ISO9660 standard, but it happens to work on many systems.
848 Although a conforming application needs to provide a buffer space of at
849 least 37 characters, discs created with this option may cause a buffer
850 overflow in the reading operating system. Use with extreme care.
851 .TP
852 .BI \-M " path"
853 .TP
854 .BI \-M " device"
855 .TP
856 .BI \-dev " device"
857 Specifies path to existing ISO9660 image to be merged. The alternate form
858 takes a SCSI device specifier that uses the same syntax as the
859 .B dev=
860 parameter of
861 .BR wodim .
862 The output of 
863 .B genisoimage
864 will be a new session which should get written to the end of the
865 image specified in
866 .BR \-M .
867 Typically this requires multisession capability for the CD recorder
868 used to write the image.  This option may only be used in conjunction
869 with
870 .BR \-C .
871 .TP
872 .B \-N
873 Omit version numbers from ISO9660 filenames.
874 .br
875 This violates the ISO9660 standard, but no one really uses the
876 version numbers anyway.  Use with caution.
877 .TP
878 .BI \-new\-dir\-mode " mode"
879 Specify the mode, a 4-digit number as used in
880 .BR chmod (1),
881 to use when creating new directories in the filesystem image.  The
882 default is 0555.
883 .TP
884 .B \-nobak
885 .TP
886 .B \-no\-bak
887 Exclude backup files files on the ISO9660 filesystem; that is,
888 filenames that contain the characters `~' or `#' or end in
889 .IR .bak .
890 These are typically backup files for Unix text editors.
891 .TP
892 .B \-force\-rr
893 Do not use the automatic Rock Ridge attributes recognition for previous sessions.
894 This can work around problems with images created by, e.g., NERO Burning ROM.
895 .TP
896 .B \-no\-rr
897 Do not use the Rock Ridge attributes from previous sessions.
898 This may help to avoid problems when
899 .B genisoimage
900 finds illegal Rock Ridge signatures on an old session.
901 .TP
902 .B \-no\-split\-symlink\-components
903 Don't split the symlink components, but begin a new Continuation Area (CE)
904 instead. This may waste some space, but the SunOS 4.1.4 cdrom driver
905 has a bug in reading split symlink components.
906 .IP
907 It is questionable whether this option is useful nowadays.
908 .TP
909 .B \-no\-split\-symlink\-fields
910 Don't split the symlink fields, but begin a new Continuation Area (CE)
911 instead. This may waste some space, but the SunOS 4.1.4 and
912 Solaris 2.5.1 cdrom driver have a bug in reading split symlink fields
913 (a `/' can be dropped).
914 .IP
915 It is questionable whether this option is useful nowadays.
916 .TP
917 .BI \-o " filename"
918 Specify the output file for the the ISO9660 filesystem image.
919 This can be a disk file, a tape drive, or it can correspond directly
920 to the device name of the optical disc writer.  If not specified, stdout is
921 used.  Note that the output can also be a block device for a regular
922 disk partition, in which case the ISO9660 filesystem can be mounted
923 normally to verify that it was generated correctly.
924 .TP
925 .B \-pad
926 Pad the end of the whole image by 150 sectors (300 kB).  This option is
927 enabled by default.  If used in combination with
928 .BR \-B ,
929 padding is inserted between the ISO9660 partition and the boot
930 partitions, such that the first boot partition starts
931 on a sector number that is a multiple of 16.
932 .IP
933 The padding is needed as many operating systems (e.g. Linux)
934 implement read-ahead bugs in their filesystem I/O. These bugs result in read
935 errors on files that are located near the end of a track, particularly
936 if the disc is written in Track At Once mode, or where a CD audio track
937 follows the data track.
938 .\" XXX: Someone should check to see if the Linux readahead bug is
939 .\" XXX: still present, and update this comment accordingly.
940 .TP
941 .B \-no\-pad
942 Do not pad the end by 150 sectors (300 kB) and do not make the the boot partitions
943 start on a multiple of 16 sectors.
944 .TP
945 .BI \-path\-list " file"
946 A file containing a list of
947 .I pathspec
948 directories and filenames to be added to the ISO9660 filesystem. This list
949 of pathspecs are processed after any that appear on the command line. If the
950 argument is
951 .IR \- ,
952 the list is read from the standard input.
953 .TP
954 .B \-P
955 Outdated option; use
956 .B \-publisher
957 instead.
958 .TP
959 .BI \-publisher " publisher_id"
960 Specifies a text string that will be written into the volume header.
961 This should describe the publisher of the CD-ROM, usually with a
962 mailing address and phone number.  There is space for 128 characters.
963 Equivalent to
964 .B PUBL
965 in the
966 .I .genisoimagerc
967 file.
968 .TP
969 .BI \-p " preparer_id"
970 Specifies a text string that will be written into the volume header.
971 This should describe the preparer of the CD-ROM, usually with a mailing
972 address and phone number.  There is space for 128 characters.
973 Equivalent to
974 .B PREP
975 in the
976 .I .genisoimagerc
977 file.
978 .TP
979 .B \-print\-size
980 Print estimated filesystem size in multiples of the sector size (2048 bytes)
981 and exit. This option is needed for
982 Disk At Once mode and with some CD-R drives when piping directly into
983 .BR wodim ,
984 cases where
985 .B wodim
986 needs to know the size of the filesystem image in advance.
987 Old versions of
988 .B mkisofs
989 wrote this information (among other information) to 
990 .IR stderr .
991 As this turns out to be hard to parse, the number without any other information
992 is now printed on 
993 .I stdout
994 too.
995 If you like to write a simple shell script, redirect
996 .I stderr
997 and catch the number from
998 .IR stdout .
999 This may be done with:
1000 .sp
1001      cdblocks=\` genisoimage \-print\-size \-quiet .\|.\|. \`
1002 .br
1003      genisoimage .\|.\|. | wodim .\|.\|. tsize=${cdblocks}s \-
1004 .TP
1005 .B \-quiet
1006 This makes
1007 .B genisoimage
1008 even less verbose.  No progress output will be provided.
1009 .TP
1010 .B \-R
1011 Generate SUSP and RR records using the Rock Ridge protocol to further describe
1012 the files on the ISO9660 filesystem.
1013 .TP
1014 .B \-r
1015 This is like the \-R option, but file ownership and modes are set to
1016 more useful values.  The uid and gid are set to zero, because they are
1017 usually only useful on the author's system, and not useful to the
1018 client.  All the file read bits are set true, so that files and
1019 directories are globally readable on the client.  If any execute bit is
1020 set for a file, set all of the execute bits, so that executables are
1021 globally executable on the client.  If any search bit is set for a
1022 directory, set all of the search bits, so that directories are globally
1023 searchable on the client.  All write bits are cleared, because the
1024 filesystem will be mounted read-only in any case.  If any of the special
1025 mode bits are set, clear them, because file locks are not useful on a
1026 read-only filesystem, and set-id bits are not desirable for uid 0 or
1027 gid 0.
1028 When used on Win32, the execute bit is set on
1029 .I all
1030 files. This is a result of the lack of file permissions on Win32 and the
1031 Cygwin POSIX emulation layer.  See also
1032 .BR \-uid ", " \-gid ,
1033 .BR \-dir\-mode ", " \-file\-mode
1034 and
1035 .BR \-new\-dir\-mode .
1036 .TP
1037 .B \-relaxed\-filenames
1038 Allows ISO9660 filenames to include all 7-bit ASCII characters except
1039 lowercase letters.
1040 .br
1041 This violates the ISO9660 standard, but it happens to work on many systems.
1042 Use with caution.
1043 .TP
1044 .BI \-root " dir"
1045 Moves all files and directories into
1046 .I dir
1047 in the image. This is essentially the
1048 same as using 
1049 .B \-graft\-points
1050 and adding
1051 .I dir
1052 in front of every pathspec, but is easier to use.
1053 .I dir
1054 may actually be several levels deep. It is
1055 created with the same permissions as other graft points.
1056 .TP
1057 .BI \-old-root " dir"
1058 This option is necessary when writing a multisession
1059 image and the previous (or even older) session was written with
1060 .B -root
1061 .IR dir .
1062 Using a directory name not found in the previous session
1063 causes
1064 .B genisoimage
1065 to abort with an error.
1066 Without this option,
1067 .B genisoimage
1068 would not be able to find unmodified files and would
1069 be forced to write their data into the image once more.
1070 .B \-root
1071 and
1072 .B \-old-root
1073 are meant to be used together to do incremental backups.
1074 The initial session would e.g. use:
1075 .B genisoimage \-root backup_1
1076 .IR dirs .
1077 The next incremental backup with
1078 .B genisoimage \-root backup_2 \-old-root backup_1
1079 .I dirs
1080 would take another snapshot of these directories. The first
1081 snapshot would be found in
1082 .BR backup_1 ,
1083 the second one in
1084 .BR backup_2 ,
1085 but only modified or new files need to be written
1086 into the second session.
1087 Without these options, new files would be added and old ones would be
1088 preserved. But old ones would be overwritten if the file was
1089 modified. Recovering the files by copying the whole directory back
1090 from CD would also restore files that were deleted
1091 intentionally. Accessing several older versions of a file requires
1092 support by the operating system to choose which sessions are to be
1093 mounted.
1094 .TP
1095 .BI \-sort " sort_file"
1096 Sort file locations on the media. Sorting is controlled by a file that
1097 contains pairs of filenames and sorting offset weighting.
1098 If the weighting is higher, the file will be located closer to the
1099 beginning of the media, if the weighting is lower, the file will be located
1100 closer to the end of the media. There must be only one space or tabs
1101 character between the filename and the
1102 weight and the weight must be the last characters on a line. The filename
1103 is taken to include all the characters up to, but not including the last
1104 space or tab character on a line. This is to allow for space characters to
1105 be in, or at the end of a filename.
1106 This option does
1107 .B not
1108 sort the order of the filenames that appear
1109 in the ISO9660 directory. It sorts the order in which the file data is
1110 written to the CD image, which is useful in order to optimize the
1111 data layout on a CD. See
1112 .B README.sort
1113 for more details.
1114 .TP
1115 .BI \-sparc\-boot " img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e"
1116 See
1117 .B \-B
1118 above.
1119 .TP
1120 .BI \-sparc\-label " label"
1121 Set the Sun disk label name for the Sun disk label that is created with
1122 .BR \-sparc-boot .
1123 .TP
1124 .B \-split\-output
1125 Split the output image into several files of approximately 1 GB each.
1126 This helps to create DVD-sized ISO9660 images on operating systems without
1127 large file support.
1128 .B wodim
1129 will concatenate more than one file into a single track if writing to a DVD.
1130 To make
1131 .B \-split\-output
1132 work,
1133 .BI \-o " filename"
1134 must be specified. The resulting output images will be named:
1135 .IR filename_00 ", " filename_01 ", " filename_02 ....
1136 .TP
1137 .BI \-stream\-media\-size " #"
1138 Select streaming operation and set the media size to # sectors.
1139 This allows you to pipe the output of the
1140 .BR tar (1)
1141 program into
1142 .B genisoimage
1143 and to create an ISO9660 filesystem without the need of an intermediate
1144 tar archive file. 
1145 If this option has been specified,
1146 .B genisoimage
1147 reads from 
1148 .I stdin 
1149 and creates a file with the name
1150 .IR STREAM.IMG .
1151 The maximum size of the file (with padding) is 200 sectors less than the 
1152 specified media size. If 
1153 .B \-no\-pad
1154 has been specified, the file size is 50 sectors less than the specified media size.
1155 If the file is smaller,
1156 .B genisoimage
1157 will write padding. This may take awhile.
1158 .IP
1159 The option 
1160 .B \-stream\-media\-size
1161 creates simple ISO9660 filesystems only and may not used together with multisession
1162 or hybrid filesystem options.
1163 .TP
1164 .BI \-stream\-file\-name " name"
1165 Reserved for future use.
1166 .TP
1167 .BI \-sunx86\-boot " UFS_img,,,AUX1_img"
1168 Specifies a comma-separated list of filesystem images that are needed to make
1169 a bootable CD for Solaris x86 systems.
1170 .IP
1171 Note that partition 1 is used for the ISO9660 image and that partition 2 is
1172 the whole disk, so partition 1 and 2 may not be used by external partition data.
1173 The first image file is mapped to partition 0.
1174 There may be empty fields in the comma-separated list,
1175 and list entries for partition 1 and 2 must be empty.
1176 The maximum number of supported partitions is 8 (although the Solaris x86
1177 partition table could support up to 16 partitions), so it is impossible
1178 to specify more than 6 partition images.
1179 This option is required to make a bootable CD for Solaris x86 systems.
1180 .IP
1181 If
1182 .B \-sunx86\-boot
1183 has been specified, the first sector of the resulting image will
1184 contain a PC fdisk label with a Solaris type 0x82 fdisk partition that
1185 starts at offset 512 and spans the whole CD.
1186 In addition, for the Solaris type 0x82 fdisk partition, there is a
1187 SVr4 disk label at offset 1024 in the first sector of the CD.
1188 This disk label specifies slice 0 for the first (usually UFS type)
1189 filesystem image that is used to boot the PC and slice 1 for
1190 the ISO9660 image.
1191 Slice 2 spans the whole CD slice 3 .\|.\|. slice 7 may be used for additional
1192 filesystem images that have been specified with this option.
1193 .IP
1194 A Solaris x86 boot CD uses a 1024 byte sized primary boot that uses the
1195 .B El-Torito no-emulation
1196 boot mode and a secondary generic boot that is in CD sectors 1\|.\|.15.
1197 For this reason, both
1198 .BI "-b " bootimage " \-no\-emul\-boot"
1199 and
1200 .BI \-G " genboot"
1201 must be specified.
1202 .TP
1203 .BI \-sunx86\-label " label"
1204 Set the SVr4 disk label name for the SVr4 disk label that is created with
1205 .BR \-sunx86-boot .
1206 .TP
1207 .BI \-sysid " ID"
1208 Specifies the system ID.  There is space for 32 characters.
1209 Equivalent to
1210 .B SYSI
1211 in the
1212 .I .genisoimagerc
1213 file.
1214 .TP
1215 .B \-T
1216 Generate a file
1217 .I TRANS.TBL
1218 in each directory on the CD-ROM, which can be used
1219 on non-Rock\ Ridge-capable systems to help establish the correct filenames.
1220 There is also information present in the file that indicates the major and
1221 minor numbers for block and character devices, and each symlink has the name of
1222 the link file given.
1223 .TP
1224 .BI \-table\-name " table_name"
1225 Alternative translation table filename (see above). Implies
1226 .BR \-T .
1227 If you are creating a multisession image you must use the same name
1228 as in the previous session.
1229 .TP
1230 .BI \-ucs\-level " level"
1231 Set Unicode conformance level in the Joliet SVD. The default level is 3.
1232 It may be set to 1..3 using this option.
1233 .TP
1234 .B \-udf
1235 Include UDF filesystem support in the generated filesystem image.  UDF
1236 support is currently in alpha status and for this reason, it is not
1237 possible to create UDF-only images.  UDF data structures are currently
1238 coupled to the Joliet structures, so there are many pitfalls with the
1239 current implementation. There is no UID/GID support, there is no POSIX
1240 permission support, there is no support for symlinks.  Note that UDF
1241 wastes the space from sector ~20 to sector 256 at the beginning of the
1242 disc in addition to the space needed for real UDF data structures.
1243 .TP
1244 .BI \-uid " uid"
1245 Overrides the uid read from the source files to the value of
1246 .IR uid . 
1247 Specifying this option automatically enables Rock Ridge extensions.
1248 .TP
1249 .B \-use\-fileversion
1250 The option 
1251 .B \-use\-fileversion
1252 allows
1253 .B genisoimage
1254 to use file version numbers from the filesystem.
1255 If the option is not specified, 
1256 .B genisoimage
1257 creates a version number of 1 for all files.
1258 File versions are strings in the range 
1259 .I ;1
1260 to
1261 .I ;32767
1262 This option is the default on VMS. 
1263 .TP
1264 .B \-U
1265 Allows "untranslated" filenames, completely violating the ISO9660 standards
1266 described above.  Enables the following flags:
1267 .B \-d \-l \-N \-allow\-leading\-dots \-relaxed\-filenames
1268 .BR "\-allow\-lowercase \-allow\-multidot \-no\-iso\-translate" .
1269 Allows more than one `.' character in the filename, as well as
1270 mixed-case filenames.  This is useful on HP-UX, where the built-in
1271 .I cdfs
1272 filesystem does not recognize any extensions. Use with extreme caution.
1273 .TP
1274 .B \-no\-iso\-translate
1275 Do not translate the characters `#' and `~' which are invalid for ISO9660 filenames.
1276 Although invalid, these characters are often used by Microsoft systems.
1277 .br
1278 This violates the ISO9660 standard, but it happens to work on many systems.
1279 Use with caution.
1280 .TP
1281 .BI \-V " volid"
1282 Specifies the volume ID (volume name or label) to be written into the
1283 master block.  There is space for 32 characters.  Equivalent to
1284 .B VOLI
1285 in the
1286 .I .genisoimagerc
1287 file.  The volume ID is used as the mount point by the Solaris volume
1288 manager and as a label assigned to a disc on various other platforms
1289 such as Windows and Apple Mac OS.
1290 .TP
1291 .BI \-volset " ID"
1292 Specifies the volume set ID.  There is space for 128 characters.
1293 Equivalent to
1294 .B VOLS
1295 in the
1296 .I .genisoimagerc
1297 file.
1298 .TP
1299 .BI \-volset\-size " #"
1300 Sets the volume set size to #.
1301 The volume set size is the number of CDs that are in a CD volume set.
1302 A volume set is a collection of one or more volumes, on which a set of
1303 files is recorded.
1304 .IP
1305 Volume Sets are not intended to be used to create a set numbered CDs
1306 that are part of e.g. a Operation System installation set of CDs.
1307 Volume Sets are rather used to record a big directory tree that would not
1308 fit on a single volume.
1309 Each volume of a Volume Set contains a description of all the directories
1310 and files that are recorded on the volumes where the sequence numbers
1311 are less than, or equal to, the assigned Volume Set Size of the current
1312 volume.
1313 .IP
1314 .B genisoimage
1315 currently does not support a
1316 .B \-volset\-size
1317 that is larger than 1.
1318 .IP
1319 The option
1320 .B \-volset\-size
1321 must be specified before
1322 .B \-volset\-seqno
1323 on each command line.
1324 .TP
1325 .BI \-volset\-seqno " #"
1326 Sets the volume set sequence number to #.
1327 The volume set sequence number is the index number of the current
1328 CD in a CD set.
1329 The option
1330 .B \-volset\-size
1331 must be specified before
1332 .B \-volset\-seqno
1333 on each command line.
1334 .TP
1335 .B \-v
1336 Verbose execution. If given twice on the command line, extra debug information
1337 will be printed.
1338 .TP
1339 .BI \-x " glob"
1340 Identical to
1341 .B \-m
1342 .IR glob .
1343 .TP
1344 .B \-z
1345 Generate special
1346 .I RRIP
1347 records for transparently compressed files.
1348 This is only of use and interest for hosts that support transparent
1349 decompression, such as Linux 2.4.14 or later.  You must specify
1350 .BR \-R " or " \-r
1351 to enable Rock Ridge, and generate compressed files using the
1352 .B mkzftree
1353 utility before running
1354 .BR genisoimage .
1355 Note that transparent compression is a nonstandard Rock Ridge extension.
1356 The resulting disks are only transparently readable if used on Linux.
1357 On other operating systems you will need to call
1358 .B mkzftree
1359 by hand to decompress the files.
1360 .\" ----------------------------------------
1361 .SH "HFS OPTIONS"
1362 .TP
1363 .B \-hfs
1364 Create an ISO9660/HFS hybrid CD. This option should be used in conjunction
1365 with the
1366 .BR \-map ,
1367 .B \-magic
1368 and/or the various
1369 .I double dash
1370 options given below.
1371 .TP
1372 .B \-apple
1373 Create an ISO9660 CD with Apple's extensions. Similar to
1374 .BR \-hfs ,
1375 except that the Apple Extensions to ISO9660 are added instead of
1376 creating an HFS hybrid volume.
1377 Former 
1378 .B genisoimage
1379 versions did include Rock Ridge attributes by default if 
1380 .B \-apple
1381 was specified. This versions of
1382 .B genisoimage
1383 does not do this anymore. If you like to have Rock Ridge attributes,
1384 you need to specify this separately.
1385 .TP
1386 .BI \-map " mapping_file"
1387 Use the
1388 .I mapping_file
1389 to set the CREATOR and TYPE information for a file based on the
1390 filename's extension. A filename is 
1391 mapped only if it is not one of the know Apple/Unix file formats. See the
1392 .B HFS CREATOR/TYPE
1393 section below.
1394 .TP
1395 .BI \-magic " magic_file"
1396 The CREATOR and TYPE information is set by using a file's
1397 .I magic number
1398 (usually the first few bytes of a file). The
1399 .I magic_file
1400 is only used if a file is not one of the known Apple/Unix file formats, or
1401 the filename extension has not been mapped using
1402 .BR \-map .
1403 See the 
1404 .B HFS CREATOR/TYPE
1405 section below for more details.
1406 .TP
1407 .BI \-hfs\-creator " creator"
1408 Set the default CREATOR for all files. Must be exactly 4 characters. See the
1409 .B HFS CREATOR/TYPE
1410 section below for more details.
1411 .TP
1412 .BI \-hfs\-type " type"
1413 Set the default TYPE for all files. Must be exactly 4 characters. See the
1414 .B HFS CREATOR/TYPE
1415 section below for more details.
1416 .TP
1417 .B \-probe
1418 Search the contents of files for all the known Apple/Unix file formats.
1419 See the
1420 .B HFS MACINTOSH FILE FORMATS
1421 section below for more about these formats.
1422 However, the only way to check for
1423 .I MacBinary
1424 and
1425 .I AppleSingle
1426 files is to open and read them, so this option may
1427 increase processing time. It is better to use one or more
1428 .I double dash
1429 options given below if the Apple/Unix formats in use are known.
1430 .TP
1431 .B \-no\-desktop
1432 Do not create (empty) Desktop files. New HFS Desktop files will be created
1433 when the CD is used on a Macintosh (and stored in the System Folder).
1434 By default, empty Desktop files are added to the HFS volume.
1435 .TP
1436 .B \-mac\-name
1437 Use the HFS filename as the starting point for the ISO9660, Joliet and
1438 Rock Ridge filenames. See the
1439 .B HFS MACINTOSH FILENAMES
1440 section below for more information.
1441 .TP
1442 .BI \-boot\-hfs\-file " driver_file"
1443 Installs the
1444 .I driver_file
1445 that
1446 .I may
1447 make the CD bootable on a Macintosh. See the
1448 .B HFS BOOT DRIVER
1449 section below. (Alpha).
1450 .TP
1451 .B \-part
1452 Generate an HFS partition table. By default, no partition table is generated,
1453 but some older Macintosh CD-ROM drivers need an HFS partition table on the
1454 CD-ROM to be able to recognize a hybrid CD-ROM.
1455 .TP
1456 .BI \-auto " AutoStart_file"
1457 Make the HFS CD use the QuickTime 2.0 Autostart feature to launch an
1458 application or document. The given filename must be the name of a document or
1459 application located at the top level of the CD. The filename must be less
1460 than 12 characters. (Alpha).
1461 .TP
1462 .BI \-cluster\-size " size"
1463 Set the size in bytes of the cluster or allocation units of PC Exchange
1464 files. Implies
1465 .BR \-\-exchange .
1466 See the
1467 .B HFS MACINTOSH FILE FORMATS
1468 section below.
1469 .TP
1470 .BI \-hide\-hfs " glob"
1471 Hide
1472 .IR glob ,
1473 a shell wildcard pattern, from the HFS volume.  The file or directory
1474 will still exist in the ISO9660 and/or Joliet directory.
1475 .I glob
1476 may match any part of the filename.  Multiple globs may be excluded.
1477 Example:
1478 .sp
1479      genisoimage \-o rom \-hfs \-hide\-hfs \(aq*.o\(aq \-hide\-hfs foobar
1480 .sp
1481 would exclude all files ending in `.o' or called
1482 .I foobar
1483 from the HFS volume. Note that if you had a directory called
1484 .IR foobar ,
1485 it too (and of course all its descendants) would be excluded.  The
1486 .I glob
1487 can also be a path name relative to the source directories given on the
1488 command line. Example:
1489 .sp
1490      genisoimage \-o rom \-hfs \-hide\-hfs src/html src
1491 .sp
1492 would exclude just the file or directory called
1493 .I html
1494 from the
1495 .I src
1496 directory.  Any other file or directory called
1497 .I html
1498 in the tree will not be excluded.  Should be used with
1499 .B \-hide
1500 and/or
1501 .BR \-hide\-joliet .
1502 In order to match a directory name, make sure the pattern does not
1503 include a trailing `/' character. See
1504 .I README.hide
1505 for more details.
1506 .TP
1507 .BI \-hide\-hfs\-list " file"
1508 Specify a file containing a list of wildcard patterns to be hidden as in
1509 .BR \-hide\-hfs .
1510 .TP
1511 .BI \-hfs\-volid " hfs_volid"
1512 Volume name for the HFS partition. This is the name that is
1513 assigned to the disc on a Macintosh and replaces the
1514 .I volid
1515 used with
1516 .BR \-V .
1517 .TP
1518 .B \-icon\-position
1519 Use the icon position information, if it exists, from the Apple/Unix file.
1520 The icons will appear in the same position as they would on a Macintosh
1521 desktop. Folder location and size on screen, its scroll positions, folder
1522 View (view as Icons, Small Icons, etc.) are also preserved.
1523 .\" This option may become set by default in the future.
1524 (Alpha).
1525 .TP
1526 .BI \-root\-info " file"
1527 Set the location, size on screen, scroll positions, folder View etc. for the
1528 root folder of an HFS volume. See
1529 .I README.rootinfo
1530 for more information.  (Alpha)
1531 .TP
1532 .BI \-prep\-boot " file"
1533 PReP boot image file. Up to 4 are allowed. See
1534 .I README.prep_boot
1535 for more information.  (Alpha)
1536 .TP
1537 .BI \-chrp\-boot
1538 Add CHRP boot header.
1539 .TP
1540 .BI \-input\-hfs\-charset " charset"
1541 Input charset that defines the characters used in HFS filenames when
1542 used with
1543 .BR \-mac\-name .
1544 The default charset is
1545 .I cp10000
1546 (Mac Roman).  See the
1547 .B CHARACTER SETS
1548 and
1549 .B HFS MACINTOSH FILENAMES
1550 sections below for more details.
1551 .TP
1552 .BI \-output\-hfs\-charset " charset"
1553 Output charset that defines the characters that will be used in the HFS
1554 filenames. Defaults to the input charset. See the
1555 .B CHARACTER SETS
1556 section below for more details.
1557 .TP
1558 .B \-hfs\-unlock
1559 By default,
1560 .B genisoimage
1561 will create an HFS volume that is locked.
1562 This option leaves the volume unlocked so that other applications (e.g.
1563 .BR hfsutils )
1564 can modify the volume. See the
1565 .B HFS PROBLEMS/LIMITATIONS
1566 section below for warnings about using this option.
1567 .TP
1568 .BI \-hfs\-bless " folder_name"
1569 "Bless" the given directory (folder). This is usually the 
1570 .I System Folder
1571 and is used in creating HFS bootable CDs. The name of the directory must
1572 be the whole path name as
1573 .B genisoimage
1574 sees it.  E.g., if the given pathspec is
1575 .I ./cddata
1576 and the required folder is called
1577 .IR "System Folder" ,
1578 the whole path name is
1579 .I \(dq/cddata/System Folder\(dq
1580 (remember to use quotes if the name contains spaces).
1581 .TP
1582 .BI \-hfs\-parms " parameters"
1583 Override certain parameters used to create the HFS filesystem. Unlikely to
1584 be used in normal circumstances.  See the
1585 .I libhfs_iso/hybrid.h
1586 source file for details.
1587 .TP
1588 .B \-\-cap
1589 Look for AUFS CAP Macintosh files. Search for CAP Apple/Unix file formats
1590 only. Searching for the other possible Apple/Unix file formats is disabled,
1591 unless other
1592 .I double dash
1593 options are given.
1594 .TP
1595 .B \-\-netatalk
1596 Look for NETATALK Macintosh files
1597 .TP
1598 .B \-\-double
1599 Look for AppleDouble Macintosh files
1600 .TP
1601 .B \-\-ethershare
1602 Look for Helios EtherShare Macintosh files
1603 .TP
1604 .B \-\-ushare
1605 Look for IPT UShare Macintosh files
1606 .TP
1607 .B \-\-exchange
1608 Look for PC Exchange Macintosh files
1609 .TP
1610 .B \-\-sgi
1611 Look for SGI Macintosh files
1612 .TP
1613 .B \-\-xinet
1614 Look for XINET Macintosh files
1615 .TP
1616 .B \-\-macbin
1617 Look for MacBinary Macintosh files
1618 .TP
1619 .B \-\-single
1620 Look for AppleSingle Macintosh files
1621 .TP
1622 .B \-\-dave
1623 Look for Thursby Software Systems DAVE Macintosh files
1624 .TP
1625 .B \-\-sfm
1626 Look for Microsoft's Services for Macintosh files (NT only) (Alpha)
1627 .TP
1628 .B \-\-osx\-double
1629 Look for Mac OS X AppleDouble Macintosh files
1630 .TP
1631 .B \-\-osx\-hfs
1632 Look for Mac OS X HFS Macintosh files
1633 .\" ----------------------------------------
1634 .SH "CHARACTER SETS"
1635 .B genisoimage
1636 processes filenames in a POSIX-compliant way as strings of 8-bit characters.
1637 To represent all codings for all languages, 8-bit characters are not
1638 sufficient.  Unicode or ISO-10646
1639 define character codings that need at least 21 bits to represent all
1640 known languages. They may be represented with
1641 .IR UTF-32 ", " UTF-16 " or " UTF-8
1642 coding.  UTF-32 uses a plain 32-bit coding but seems to be uncommon.
1643 UTF-16 is used by Microsoft with Win32 with the disadvantage that
1644 16-bit characters are not compliant with the POSIX filesystem
1645 interface.
1646 .PP
1647 Modern Unix operating systems may use UTF-8 coding for filenames.
1648 Each 32-bit character is represented by one or more 8-bit characters.
1649 If a character is coded in
1650 .I ISO-8859-1
1651 (used in Central Europe and North America) is maps 1:1 to a 
1652 UTF-32 or UTF-16 coded Unicode character.
1653 If a character is coded in
1654 .I 7-Bit ASCII
1655 (used in USA and other countries with limited character set)
1656 is maps 1:1 to a UTF-32, UTF-16 or UTF-8 coded Unicode character.
1657 Character codes that cannot be represented as a single byte in UTF-8
1658 (if the value is > 0x7F) use escape sequences that map to more than
1659 one 8-bit character.
1660 .PP
1661 If all operating systems used UTF-8,
1662 .B genisoimage
1663 would not need to recode characters in filenames.
1664 Unfortunately, Apple uses completely nonstandard codings and Microsoft
1665 uses a Unicode coding that is not compatible with the POSIX filename
1666 interface.
1667 .PP
1668 For all non-UTF-8-coded operating systems, the actual character
1669 that each byte represents depends on the
1670 .I character set
1671 or
1672 .I codepage
1673 (the name used by Microsoft)
1674 used by the local operating system \(em the characters in a character
1675 set will reflect the region or natural language set by the user.
1676 .PP
1677 Usually character codes 0x00-0x1f are control characters, codes 0x20-0x7f
1678 are the 7-bit ASCII characters and (on PCs and Macs) 0x80-0xff are used
1679 for other characters.
1680 .PP
1681 As there are a lot more than 256 characters/symbols in use, only a small
1682 subset are represented in a character set. Therefore the same character code
1683 may represent a different character in different character sets. So a filename
1684 generated, say in central Europe, may not display the same character
1685 when viewed on a machine in, say eastern Europe.
1686 .PP
1687 To make matters more complicated, different operating systems use
1688 different character sets for the region or language. For example, the
1689 character code for `\('e' (small e with acute accent)
1690 may be character code 0x82 on a PC, 
1691 code 0x8e on a Macintosh, code 0xe9 on a Unix system in western Europe,
1692 and code 0x000e9 in Unicode.
1693 .PP
1694 As long as not all operating systems and applications use the same
1695 character set as the basis for filenames, it may be
1696 necessary to specify which character set your filenames use in and which
1697 character set the filenames should appear on the CD.
1698 .PP
1699 There are four options to specify the character sets you want to use:
1700 .TP
1701 .B \-input\-charset
1702 Defines the local character set you are using on your host machine.
1703 Any character set conversions that take place will use this character
1704 set as the starting point. The default input character sets are
1705 .I cp437
1706 on MS-DOS-based systems and
1707 .I iso8859-1
1708 on all other systems.  If
1709 .B \-J
1710 is given, the Unicode equivalents of the input character set
1711 will be used in the Joliet directory.
1712 .B \-jcharset
1713 is the same as
1714 .BR "\-input\-charset \-J" .
1715 .TP
1716 .B \-output\-charset
1717 Defines the character set that will be used with for the Rock Ridge names
1718 on the CD.  Defaults to the input character set.
1719 .TP
1720 .B \-input\-hfs\-charset
1721 Defines the HFS character set used for HFS filenames decoded from
1722 any of the various Apple/Unix file formats. Only useful when used with
1723 .BR \-mac\-name .
1724 See the
1725 .B HFS MACINTOSH FILENAMES
1726 for more information. Defaults to
1727 .I cp10000
1728 (Mac Roman).
1729 .TP
1730 .B \-output\-hfs\-charset
1731 Defines the HFS character set used to create HFS filenames from the input
1732 character set in use. In most cases this will be from the character set
1733 given with
1734 .BR \-input\-charset .
1735 Defaults to the input HFS character set.
1736 .PP
1737 There are a number of character sets built in to
1738 .BR genisoimage .
1739 To get a listing, use
1740 .BR "\-input\-charset help" .
1741 This list doesn't include the charset derived from the current locale,
1742 if
1743 .B genisoimage
1744 is built with
1745 .I iconv
1746 support.
1747 .PP
1748 Additional character sets can be read from file for any of the character
1749 set options by giving a filename as the argument to the options. The given
1750 file will only be read if its name does not match one of the built-in
1751 character sets.
1752 .PP
1753 The format of the character set files is the same as the mapping files
1754 available from
1755 .IR http://www.unicode.org/Public/MAPPINGS .
1756 This format is:
1757 .IP
1758 Column #1 is the input byte code (in hex as 0xXX)
1759 .br
1760 Column #2 is the Unicode (in hex as 0xXXXX)
1761 .br
1762 The rest of the line is ignored.
1763 .PP
1764 Any blank line, line without two (or more) columns in the above format
1765 or comments lines (starting with the # character) are ignored without any
1766 warnings. Any missing input code is mapped to Unicode character 0x0000.
1767 .PP
1768 Note that, while UTF-8 is supported, other Unicode encodings such as
1769 UCS-2/UTF-16 and UCS-4/UTF-32 are not, as POSIX operating systems
1770 cannot handle them natively.
1771 .PP
1772 A 1:1 character set mapping can be defined by using the keyword
1773 .I default
1774 as the argument to any of the character set options. This is the behaviour
1775 of old versions of
1776 .BR mkisofs .
1777 .PP
1778 The ISO9660 filenames generated from the input filenames are not converted
1779 from the input character set. The ISO9660 character set is a very limited
1780 subset of the ASCII characters, so any conversion would be pointless.
1781 .PP
1782 Any character that
1783 .B genisoimage
1784 cannot convert will be replaced with a `_' character.
1785 .\" ----------------------------------------
1786 .SH "HFS CREATOR/TYPE"
1787 A Macintosh file has two properties associated with it which define
1788 which application created the file, the
1789 .I CREATOR
1790 and what data the file contains, the
1791 .IR TYPE .
1792 Both are (exactly) 4 letter strings. Usually this
1793 allows a Macintosh user to double-click on a file and launch the correct
1794 application etc. The CREATOR and TYPE of a particular file can be found by
1795 using something like ResEdit (or similar) on a Macintosh.
1796 .PP
1797 The CREATOR and TYPE information is stored in all the various Apple/Unix
1798 encoded files.
1799 For other files it is possible to base the CREATOR and TYPE on the
1800 filename's extension using a
1801 .I mapping
1802 file (with
1803 .BR \-map )
1804 and/or using the
1805 .I magic number
1806 (usually a
1807 .I signature
1808 in the first few bytes) of a file (with
1809 .BR \-magic ).
1810 If both these options are given, their order on the command
1811 line is significant.  If
1812 .B \-map
1813 is given first, a filename extension match is attempted
1814 before a magic number match. However, if
1815 .B \-magic
1816 is given first, a magic number match is attempted before a
1817 filename extension match.
1818 .PP
1819 If a mapping or magic file is not used, or no match is found, the default
1820 CREATOR and TYPE for all regular files can be set by using entries in the 
1821 .I .genisoimagerc
1822 file or using
1823 .B \-hfs\-creator
1824 and/or
1825 .BR \-hfs\-type ,
1826 otherwise the default CREATOR and TYPE are
1827 .IR Unix " and " TEXT .
1828 .PP
1829 The format of the
1830 .I mapping
1831 file is the same
1832 .I afpfile
1833 format as used by
1834 .BR aufs .
1835 This file has five columns for the
1836 .IR extension ,
1837 .IR "file translation" ,
1838 .IR CREATOR ,
1839 .IR TYPE " and"
1840 .IR Comment .
1841 Lines starting with the `#' character are
1842 comment lines and are ignored. An example file would be like:
1843 .PP
1844 .TS
1845 tab (/);
1846 l s s s s
1847 l s s s s
1848 l l l l l .
1849 # Example filename mapping file
1850 #
1851 # EXTN/XLate/CREATOR/TYPE/Comment
1852 \&.tif/Raw/\(aq8BIM\(aq/\(aqTIFF\(aq/\(dqPhotoshop TIFF image\(dq
1853 \&.hqx/Ascii/\(aqBnHq\(aq/\(aqTEXT\(aq/\(dqBinHex file\(dq
1854 \&.doc/Raw/\(aqMSWD\(aq/\(aqWDBN\(aq/\(dqWord file\(dq
1855 \&.mov/Raw/\(aqTVOD\(aq/\(aqMooV\(aq/\(dqQuickTime Movie\(dq
1856 */Ascii/\(aqttxt\(aq/\(aqTEXT\(aq/\(dqText file\(dq
1857 .TE
1858 .PP
1859 Where:
1860 .IP
1861 The first column
1862 .I EXTN
1863 defines the Unix filename extension to be
1864 mapped. The default mapping for any filename extension that doesn't
1865 match is defined with the `*' character.
1866 .IP
1867 The
1868 .I Xlate
1869 column defines the type of text translation between the Unix and
1870 Macintosh file it is ignored by
1871 .BR genisoimage ,
1872 but is kept to be compatible with
1873 .BR aufs (1).
1874 Although 
1875 .B genisoimage
1876 does not alter the contents of a file, if a binary file has its TYPE
1877 set as
1878 .IR TEXT ", it " may
1879 be read incorrectly on a Macintosh. Therefore a better choice for the
1880 default TYPE may be
1881 .IR ???? .
1882 .IP
1883 The
1884 .I CREATOR
1885 and
1886 .I TYPE
1887 keywords must be 4 characters long and enclosed in single quotes.
1888 .IP
1889 The comment field is enclosed in double quotes \(em it is ignored by
1890 .BR genisoimage ,
1891 but is kept to be compatible with 
1892 .BR aufs .
1893 .PP
1894 The format of the
1895 .I magic
1896 file is almost identical to the
1897 .BR magic (5)
1898 file used by the
1899 .BR file (1)
1900 command.
1901 .PP
1902 This file has four tab-separated columns for the
1903 .IR "byte offset" ,
1904 .IR type ,
1905 .I test
1906 and
1907 .IR message .
1908 Lines starting with the `#' character are
1909 comment lines and are ignored. An example file would be like:
1910 .PP
1911 .TS
1912 tab (/);
1913 l s s s
1914 l s s s
1915 l l l l .
1916 # Example magic file
1917 #
1918 # off/type/test/message
1919 0/string/GIF8/8BIM GIFf  GIF image
1920 0/beshort/0xffd8/8BIM JPEG  image data
1921 0/string/SIT!/SIT! SIT!  StuffIt Archive
1922 0/string/\(rs037\(rs235/LZIV ZIVU  standard Unix compress
1923 0/string/\(rs037\(rs213/GNUz ZIVU  gzip compressed data
1924 0/string/%!/ASPS TEXT  Postscript
1925 0/string/\(rs004%!/ASPS TEXT  PC Postscript with a ^D to start
1926 4/string/moov/txtt MooV  QuickTime movie file (moov)
1927 4/string/mdat/txtt MooV  QuickTime movie file (mdat)
1928 .TE
1929 .PP
1930 The format of the file is described in
1931 .BR magic (5).
1932 The only difference here is that for each entry in the magic file, the
1933 .I message
1934 for the initial offset must be be 4 characters for the CREATOR followed
1935 by 4 characters for the TYPE \(em white space is
1936 optional between them. Any other characters on this line are ignored.
1937 Continuation lines (starting with a `>') are also ignored, i.e., only
1938 the initial offset lines are used.
1939 .PP
1940 Using
1941 .B \-magic
1942 may significantly increase processing time as each file has to opened
1943 and read to find its magic number.
1944 .PP
1945 In summary, for all files, the default CREATOR is
1946 .I Unix
1947 and the default TYPE is
1948 .IR TEXT .
1949 These can be changed by using entries in the
1950 .I .genisoimagerc
1951 file or by using
1952 .B \-hfs\-creator
1953 and/or
1954 .BR \-hfs\-type .
1955 .PP
1956 If the a file is in one of the known Apple/Unix formats (and the format
1957 has been selected), the CREATOR and TYPE are taken from the values
1958 stored in the Apple/Unix file.
1959 .PP
1960 Other files can have their CREATOR and TYPE set from their filename
1961 extension (with
1962 .BR \-map ),
1963 or their magic number (with
1964 .BR \-magic ).
1965 If the default match is used in the
1966 .I mapping
1967 file, these values override the default CREATOR and TYPE.
1968 .PP
1969 A full CREATOR/TYPE database can be found at 
1970 .IR http://www.angelfire.com/il/szekely/ .
1971 .\" ----------------------------------------
1972 .SH "HFS MACINTOSH FILE FORMATS"
1973 Macintosh files have two parts called the
1974 .I Data
1975 and
1976 .IR "Resource fork" .
1977 Either may be empty. Unix (and many other OSs) can only
1978 cope with files having one part (or fork). To add to this, Macintosh files
1979 have a number of attributes associated with them \(em probably the most
1980 important are the TYPE and CREATOR.  Again, Unix has no concept of these
1981 types of attributes.
1982 .PP
1983 E.g., a Macintosh file may be a JPEG image where the image is stored in the
1984 Data fork and a desktop thumbnail stored in the Resource fork. It is usually
1985 the information in the data fork that is useful across platforms.
1986 .PP
1987 Therefore to store a Macintosh file on a Unix filesystem, a way has to be
1988 found to cope with the two forks and the extra attributes (which are
1989 referred to as the
1990 .IR "Finder info" ).
1991 Unfortunately, it seems that every software package that stores Macintosh
1992 files on Unix has chosen a completely different storage method.
1993 .PP
1994 The Apple/Unix formats that
1995 .B genisoimage
1996 (partially) supports are:
1997 .IP "CAP AUFS format"
1998 Data fork stored in a file. Resource fork in subdirectory
1999 .I .resource
2000 with same filename as data fork. Finder info in subdirectory
2001 .I .finderinfo
2002 with same filename.
2003 .IP "AppleDouble/Netatalk"
2004 Data fork stored in a file. Resource fork stored in a file with
2005 same name prefixed with `%'. Finder info also stored in same
2006 `%' file. Netatalk uses the same format, but the resource
2007 fork/Finder info stored in subdirectory
2008 .I .AppleDouble
2009 with same filename as data fork.
2010 .IP AppleSingle
2011 Data structures similar to above, except both forks and Finder
2012 info are stored in one file.
2013 .IP "Helios EtherShare"
2014 Data fork stored in a file.  Resource fork and Finder info together in
2015 subdirectory
2016 .I .rsrc
2017 with same filename as data fork.
2018 .IP "IPT UShare"
2019 Like the EtherShare format, but the Finder info
2020 is stored slightly differently.
2021 .IP MacBinary
2022 Both forks and Finder info stored in one file.
2023 .IP "Apple PC Exchange"
2024 Used by Macintoshes to store Apple files on DOS (FAT) disks.
2025 Data fork stored in a file. Resource fork in subdirectory
2026 .IR resource.frk " (or " RESOURCE.FRK ).
2027 Finder info as one record in file
2028 .IR finder.dat " (or " FINDER.DAT ).
2029 Separate
2030 .I finder.dat
2031 for each data fork directory.
2032 .IP
2033 Note: 
2034 .B genisoimage
2035 needs to know the native FAT cluster size of the disk that the PC Exchange
2036 files are on (or have been copied from). This size is given by
2037 .BR \-cluster\-size .
2038 The cluster or allocation size can be found by using the DOS utility
2039 .BR chkdsk .
2040 .IP
2041 May not work with PC Exchange v2.2 or higher files (available with MacOS 8.1).
2042 DOS media containing PC Exchange files should be mounted as type
2043 .I msdos
2044 (not
2045 .IR vfat )
2046 when using Linux.
2047 .IP SGI/XINET
2048 Used by SGI machines when they mount HFS disks. Data fork stored
2049 in a file.  Resource fork in subdirectory
2050 .I .HSResource
2051 with same filename.  Finder info as one record in file
2052 .IR .HSancillary ".  Separate " .HSancillary
2053 for each data fork directory.
2054 .IP "Thursby Software Systems DAVE"
2055 Allows Macintoshes to store Apple files on SMB servers.
2056 Data fork stored in a file. Resource fork in subdirectory
2057 .IR resource.frk .
2058 Uses the AppleDouble format to store resource fork.
2059 .IP "Services for Macintosh"
2060 Format of files stored by NT Servers on NTFS filesystems. Data fork is
2061 stored as
2062 .IR filename .
2063 Resource fork stored as a NTFS stream called
2064 .IR filename:AFP_Resource .
2065 The Finder info is stored as a NTFS stream called
2066 .IR filename:Afp_AfpInfo .
2067 NTFS streams are normally invisible to the user.
2068 .IP
2069 Warning:
2070 .B genisoimage
2071 only partially supports the SFM format. If an HFS file
2072 or folder stored on the NT server contains an illegal
2073 NT character in its name, NT converts these characters to
2074 .I Private Use Unicode
2075 characters.  The characters are: \(dq * / < > ? \(rs | and a space or
2076 period if it is the last character of the filename, character codes 0x01
2077 to 0x1f (control characters) and Apple's apple logo.
2078 .IP
2079 Unfortunately, these private Unicode characters are not readable by the
2080 .B genisoimage
2081 NT executable. Therefore any file or directory
2082 name containing these characters will be ignored \(em including the contents of
2083 any such directory.
2084 .IP "Mac OS X AppleDouble"
2085 When HFS/HFS+ files are copied or saved by Mac OS X on to a non-HFS
2086 filesystem (e.g. UFS, NFS etc.), the files are stored in AppleDouble format.
2087 Data fork stored in a file. Resource fork stored in a file with
2088 same name prefixed with `._'. Finder info also stored in same `._' file.
2089 .IP "Mac OS X HFS (Alpha)"
2090 Not really an Apple/Unix encoding, but actual HFS/HFS+ files on a Mac\ OS\ X
2091 system. Data fork stored in a file. Resource fork stored in a pseudo file
2092 with the same name with the suffix
2093 .IR /rsrc .
2094 The Finder info is only available via a Mac OS X library call.
2095 .IP
2096 See also
2097 .IR README.macosx .
2098 .IP
2099 Only works when used on Mac OS X.
2100 .IP
2101 If a file is found with a zero
2102 length resource fork and empty finderinfo, it is assumed not to have
2103 any Apple/Unix encoding \(em therefore a TYPE and CREATOR can be set using
2104 other methods.
2105 .PP
2106 .B genisoimage
2107 will attempt to set the CREATOR, TYPE, date and possibly other flags from
2108 the finder info. Additionally, if it exists, the Macintosh filename is set
2109 from the finder info, otherwise the Macintosh name is based on the Unix
2110 filename \(em see the
2111 .B HFS MACINTOSH FILENAMES
2112 section below.
2113 .PP
2114 When using
2115 .BR \-apple ,
2116 the TYPE and CREATOR are stored in the optional System Use or
2117 .I SUSP
2118 field
2119 in the ISO9660 Directory Record \(em in much the same way as the Rock Ridge
2120 attributes are. In fact to make life easy, the Apple extensions are added
2121 at the beginning of the existing Rock Ridge attributes (i.e., to get the Apple
2122 extensions you get the Rock Ridge extensions as well).
2123 .PP
2124 The Apple extensions require the resource fork to be stored as an ISO9660
2125 .I associated
2126 file. This is just like any normal file stored in the ISO9660 filesystem
2127 except that the associated file flag is set in the Directory Record (bit
2128 2). This file has the same name as the data fork (the file seen by
2129 non-Apple machines). Associated files are normally ignored by other OSs
2130 .PP
2131 When using
2132 .BR \-hfs ,
2133 the TYPE and CREATOR plus other finder info, are stored in a separate
2134 HFS directory, not visible on the ISO9660 volume. The HFS directory references
2135 the same data and resource fork files described above.
2136 .PP
2137 In most cases, it is better to use
2138 .B \-hfs
2139 instead of
2140 .BR \-apple ,
2141 as the latter imposes the limited ISO9660 characters allowed in
2142 filenames. However, the Apple extensions do give the advantage that the
2143 files are packed on the disk more efficiently and it may be possible to fit 
2144 more files on a CD.
2145 .\" ----------------------------------------
2146 .SH "HFS MACINTOSH FILENAMES"
2147 Where possible, the HFS filename that is stored with an Apple/Unix file
2148 is used for the HFS part of the CD. However, not all the Apple/Unix
2149 encodings store the HFS filename with the finderinfo. In these cases,
2150 the Unix filename is used \(em with escaped special characters. Special
2151 characters include `/' and characters with codes over 127.
2152 .PP
2153 AUFS escapes these characters by using `:' followed by the character code
2154 as two hex digits. Netatalk and EtherShare have a similar scheme, but uses
2155 `%' instead of a `:'.
2156 .PP
2157 If
2158 .B genisoimage
2159 cannot find an HFS filename, it uses the Unix name, with any
2160 .IR %xx " or " :xx
2161 characters
2162 .RI ( xx
2163 are two hex digits) converted to a single character code.  If
2164 .I xx
2165 are not hex digits ([0-9a-fA-F]), they are
2166 left alone \(em although any remaining `:' is converted to `%', as `:'
2167 is the HFS directory separator. Care must be taken, as an ordinary Unix
2168 file with
2169 .I %xx
2170 or
2171 .I :xx
2172 will also be converted. e.g.
2173 .PP
2174 .TS
2175 l l 
2176 l s
2177 l l
2178 l s
2179 l l .
2180 This:2fFile     converted to This/File
2181         
2182 This:File       converted to This%File
2183         
2184 This:t7File     converted to This%t7File
2185 .TE
2186 .PP
2187 Although HFS filenames appear to support uppercase and lowercase letters,
2188 the filesystem is case-insensitive, i.e., the filenames
2189 .IR aBc " and " AbC
2190 are the same. If a file is found in a directory with the same HFS name,
2191 .B genisoimage
2192 will attempt to make a unique name by adding `_' characters
2193 to one of the filenames. 
2194 .PP
2195 If an HFS filename exists for a file,
2196 .B genisoimage
2197 can use this name as the starting point for the ISO9660, Joliet and
2198 Rock Ridge filenames using
2199 .BR \-mac\-name .
2200 Normal Unix files without an HFS name will still use their Unix name.
2201 e.g.
2202 .PP
2203 If a MacBinary (or PC Exchange) file is stored as
2204 .I someimage.gif.bin
2205 on the Unix filesystem, but contains a HFS file called
2206 .IR someimage.gif ,
2207 this is the name that would appear on the HFS part of the CD. However, as
2208 .B genisoimage
2209 uses the Unix name as the starting point for the other names,
2210 the ISO9660 name generated will probably be 
2211 .I SOMEIMAG.BIN
2212 and the Joliet/Rock Ridge would be
2213 .IR someimage.gif.bin .
2214 This option will use
2215 the HFS filename as the starting point and the ISO9660 name will probably be
2216 .I SOMEIMAG.GIF
2217 and the Joliet/Rock Ridge would be
2218 .IR someimage.gif .
2219 .PP
2220 .B \-mac\-name
2221 will not currently work with
2222 .B \-T
2223 \(em the Unix name will be used in the
2224 .I TRANS.TBL
2225 file, not the Macintosh name.
2226 .PP
2227 The character set used to convert any HFS filename to a Joliet/Rock Ridge
2228 filename defaults to
2229 .I cp10000
2230 (Mac Roman).
2231 The character set used can be specified using
2232 .BR \-input\-hfs\-charset .
2233 Other built-in HFS character sets are:
2234 .I cp10006
2235 (MacGreek),
2236 .I cp10007
2237 (MacCyrillic),
2238 .I cp10029
2239 (MacLatin2),
2240 .I cp10079
2241 (MacIcelandandic) and
2242 .I cp10081
2243 (MacTurkish).
2244 .PP
2245 Note: the character codes used by HFS filenames taken from the various
2246 Apple/Unix formats will not be converted as they are assumed to be in the
2247 correct Apple character set. Only the Joliet/Rock Ridge names derived from
2248 the HFS filenames will be converted.
2249 .PP
2250 The existing
2251 .B genisoimage
2252 code will filter out any illegal characters for the ISO9660 and Joliet
2253 filenames, but as
2254 .B genisoimage
2255 expects to be dealing directly with Unix names, it leaves the Rock
2256 Ridge names as is.  But as `/' is a legal HFS filename character,
2257 .B \-mac\-name
2258 converts `/' to a `_' in Rock Ridge filenames.
2259 .PP
2260 If the Apple extensions are used, only the ISO9660 filenames will
2261 appear on the Macintosh. However, as the Macintosh ISO9660 drivers can use
2262 .I Level 2
2263 filenames, you can use options like
2264 .B \-allow\-multidot
2265 without problems on
2266 a Macintosh \(em still take care over the names, for example
2267 .I this.file.name
2268 will be converted to
2269 .I THIS.FILE
2270 i.e. only have one `.', also filename
2271 .I abcdefgh
2272 will be seen as
2273 .I ABCDEFGH
2274 but
2275 .I abcdefghi
2276 will be seen as
2277 .I ABCDEFGHI.
2278 i.e. with a `.' at the end \(em don't know if this is a Macintosh
2279 problem or a
2280 .BR genisoimage / mkhybrid
2281 problem. All filenames will be in uppercase
2282 when viewed on a Macintosh. Of course, DOS/Win3.X machines will not be able
2283 to see Level 2 filenames...
2284 .\" ----------------------------------------
2285 .SH "HFS CUSTOM VOLUME/FOLDER ICONS"
2286 To give a HFS CD a custom icon, make sure the root (top level) folder includes
2287 a standard Macintosh volume icon file. To give a volume a custom icon on
2288 a Macintosh, an icon has to be pasted over the volume's icon in the "Get Info"
2289 box of the volume. This creates an invisible file called
2290 .I Icon\(rsr
2291 (`\(rsr' is the carriage return character) in the root folder.
2292 .P
2293 A custom folder icon is very similar \(em an invisible file called
2294 .I Icon\(rsr
2295 exists in the folder itself.
2296 .P
2297 Probably the easiest way to create a custom icon that
2298 .B genisoimage
2299 can use is to format a blank HFS floppy disk on a Mac and paste an icon
2300 to its "Get Info" box. If using Linux with the HFS module installed,
2301 mount the floppy:
2302 .IP
2303 mount \-t hfs /dev/fd0 /mnt/floppy
2304 .PP
2305 The floppy will be mounted as a CAP filesystem by default.  Then run
2306 .B genisoimage
2307 using something like:
2308 .IP
2309 genisoimage \-\-cap \-o output source_dir /mnt/floppy
2310 .PP
2311 If you are not using Linux, you can use
2312 .B hfsutils
2313 to copy the icon file from the floppy.  However, care has to be taken,
2314 as the icon file contains a control character.  For example:
2315 .IP
2316 hmount /dev/fd0
2317 .br
2318 hdir \-a
2319 .br
2320 hcopy \-m Icon^V^M icon_dir/icon
2321 .PP
2322 Where `^V^M' is control-V followed by control-M. Then run 
2323 .B genisoimage
2324 by using something like:
2325 .IP
2326 genisoimage \-\-macbin \-o output source_dir icon_dir
2327 .PP
2328 The procedure for creating/using custom folder icons is very similar \(em paste
2329 an icon to folder's "Get Info" box and transfer the resulting
2330 .I Icon\(rsr
2331 file to the relevant directory in the
2332 .B genisoimage
2333 source tree.
2334 .PP
2335 You may want to hide the icon files from the ISO9660 and Joliet trees.
2336 .PP
2337 To give a custom icon to a Joliet CD, follow the instructions found at
2338 .IR http://www.cdrfaq.org/faq03.html#S3-21-1 .
2339 .\" ----------------------------------------
2340 .SH "HFS BOOT DRIVER"
2341 It 
2342 .I may
2343 be possible to make the hybrid CD bootable on a Macintosh.
2344 .PP
2345 A bootable HFS CD requires an Apple CD-ROM (or compatible) driver, a bootable
2346 HFS partition and the necessary System, Finder, etc. files.
2347 .PP
2348 A driver can be obtained from any other Macintosh bootable CD-ROM using the
2349 .B apple_driver
2350 utility. This file can then be used with
2351 .BR \-boot\-hfs\-file .
2352 .PP
2353 The HFS partition (i.e. the hybrid disk in our case) must contain a
2354 suitable System Folder, again from another CD-ROM or disk.
2355 .PP
2356 For a partition to be bootable, it must have its 
2357 .I boot block
2358 set. The boot
2359 block is in the first two blocks of a partition. For a non-bootable partition
2360 the boot block is full of zeros. Normally, when a System file is copied to
2361 partition on a Macintosh disk, the boot block is filled with a number of
2362 required settings \(em unfortunately I don't know the full spec for the boot
2363 block, so I'm guessing that the following will work.
2364 .PP
2365 Therefore, the utility
2366 .B apple_driver
2367 also extracts the boot block from the
2368 first HFS partition it finds on the given CD-ROM and this is used for the
2369 HFS partition created by
2370 .BR genisoimage .
2371 .PP
2372 .I Please note:
2373 By using a driver from an Apple CD and copying Apple software to your CD,
2374 you become liable to obey Apple Computer, Inc. Software License Agreements.
2375 .\" ----------------------------------------
2376 .SH "EL TORITO BOOT INFORMATION TABLE"
2377 When
2378 .B \-boot\-info\-table
2379 is given,
2380 .B genisoimage
2381 will modify the boot file specified by
2382 .B \-b
2383 by inserting a 56-byte
2384 .I boot information table
2385 at offset 8 in
2386 the file.  This modification is done in the source filesystem, so make
2387 sure you use a copy if this file is not easily recreated!  This file
2388 contains pointers which may not be easily or reliably obtained at boot
2389 time.
2390 .PP
2391 The format of this table is as follows; all integers are in
2392 section 7.3.1 ("little endian") format.
2393 .sp
2394 .RS +.2i
2395 .ta 1.0i 2.5i 3.5i
2396 .nf
2397 Offset  Name    Size    Meaning
2398  8      bi_pvd  4 bytes LBA of primary volume descriptor
2399 12      bi_file 4 bytes LBA of boot file
2400 16      bi_length       4 bytes Boot file length in bytes
2401 20      bi_csum 4 bytes 32-bit checksum
2402 24      bi_reserved     40 bytes        Reserved
2403 .fi
2404 .RE
2405 .IP
2406 The 32-bit checksum is the sum of all the 32-bit words in the boot
2407 file starting at byte offset 64.  All linear block addresses (LBAs)
2408 are given in CD sectors (normally 2048 bytes).
2409 .\" ----------------------------------------
2410 .SH "HPPA NOTES"
2411 To make a bootable CD for HPPA, at the very least a boot loader file
2412 .RB ( \-hppa\-bootloader ),
2413 a kernel image file (32-bit, 64-bit, or both, depending on hardware)
2414 and a boot command line
2415 .RB ( \-hppa\-cmdline )
2416 must be specified. Some systems can boot either a 32- or a 64-bit
2417 kernel, and the firmware will choose one if both are present.
2418 Optionally, a ramdisk can be used for the root filesystem using
2419 .BR \-hppa\-cmdline .
2420 .\" ----------------------------------------
2421 .SH "JIGDO NOTES"
2422 Jigdo is a tool to help in the distribution of large files like CD and
2423 DVD images; see
2424 .I http://atterer.org/jigdo/
2425 for more details.  Debian CDs and DVD ISO
2426 images are published on the web in jigdo format to allow end users to download
2427 them more efficiently.
2428 .PP
2429 To create jigdo and template files alongside the ISO image from
2430 .BR genisoimage ,
2431 you must first generate a list of the files that will be
2432 used, in the following format:
2433 .sp
2434 .RS +.2i
2435 .ta 2.0i 2.0i 5.0i
2436 .nf
2437 MD5sum   File size  Path
2438 32 chars 12 chars   to end of line
2439 .fi
2440 .RE
2441 .IP
2442 .PP
2443 The MD5sum must be written in standard hexadecimal notation, the
2444 file size must list the size of the file in bytes, and the path
2445 must list the absolute path to the file. For example:
2446 .sp
2447 .nf
2448 00006dcd58ff0756c36d2efae21be376         14736  /mirror/debian/file1
2449 000635c69b254a1be8badcec3a8d05c1        211822  /mirror/debian/file2
2450 00083436a3899a09633fc1026ef1e66e         22762  /mirror/debian/file3
2451 .fi
2452 .PP
2453 Once you have this file, call
2454 .B genisoimage
2455 with all of your normal command-line parameters. Specify the output
2456 filenames for the jigdo and template files using
2457 .BR \-jigdo\-jigdo " and " \-jigdo\-template ,
2458 and pass in the location of your MD5 list with
2459 .BR \-md5\-list .
2460 .PP
2461 If there are files that you do NOT want to be added into the jigdo
2462 file (e.g. if they are likely to change often), specify them using
2463 \-jigdo\-exclude. If you want to verify some of the files as they are
2464 written into the image, specify them using \-jigdo\-force\-md5. If any
2465 files don't match,
2466 .B genisoimage
2467 will then abort.  Both of these options take
2468 regular expressions as input. It is possible to restrict the set of
2469 files that will be used further based on size \(em use the
2470 \-jigdo\-min\-file\-size option.
2471 .PP
2472 Finally, the jigdo code needs to know how to map the files it is given
2473 onto a mirror-style configuration. Specify how to map paths using
2474 .BR \-jigdo\-map .
2475 Using
2476 .I Debian=/mirror/debian
2477 will cause all
2478 paths starting with
2479 .I /mirror/debian
2480 to be mapped to
2481 .I Debian:<file>
2482 in the output jigdo file.
2483 .\" ----------------------------------------
2484 .SH EXAMPLES
2485 .PP
2486 To create a vanilla ISO9660 filesystem image in the file 
2487 .IR cd.iso ,
2488 where the directory
2489 .I cd_dir
2490 will become the root directory of the CD, call:
2491 .IP
2492 % genisoimage \-o cd.iso cd_dir
2493 .PP
2494 To create a CD with Rock Ridge extensions of
2495 the source directory
2496 .IR cd_dir :
2497 .IP
2498 % genisoimage \-o cd.iso \-R cd_dir
2499 .PP
2500 To create a CD with Rock Ridge extensions of
2501 the source directory
2502 .I cd_dir
2503 where all files have at least read permission and all files
2504 are owned by
2505 .IR root ,
2506 call:
2507 .IP
2508 % genisoimage \-o cd.iso \-r cd_dir
2509 .PP
2510 To write a tar archive directly to a CD that will later contain a simple
2511 ISO9660 filesystem with the tar archive call:
2512 .IP
2513 % tar cf \- . | genisoimage \-stream\-media\-size 333000 | \(rs
2514 .br
2515      wodim dev=b,t,l \-dao tsize=333000s \-
2516 .PP
2517 To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of
2518 the source directory
2519 .IR cd_dir :
2520 .IP
2521 % genisoimage \-o cd.iso \-R \-J \-hfs cd_dir
2522 .PP
2523 To create a HFS hybrid CD from the source directory 
2524 .I cd_dir
2525 that contains
2526 Netatalk Apple/Unix files:
2527 .IP
2528 % genisoimage \-o cd.iso \-\-netatalk cd_dir
2529 .PP
2530 To create a HFS hybrid CD from the source directory
2531 .IR cd_dir ,
2532 giving all files
2533 CREATOR and TYPES based on just their filename extensions listed in the file 
2534 "mapping".:
2535 .IP
2536 % genisoimage \-o cd.iso \-map mapping cd_dir
2537 .PP
2538 To create a CD with the Apple Extensions to ISO9660, from the source
2539 directories
2540 .I cd_dir
2541 and
2542 .IR another_dir .
2543 Files in all the known Apple/Unix format
2544 are decoded and any other files are given CREATOR and TYPE based on their
2545 magic number given in the file
2546 .IR magic :
2547 .IP
2548 % genisoimage \-o cd.iso \-apple \-magic magic \-probe \(rs
2549 .br
2550         cd_dir another_dir
2551 .PP
2552 The following example puts different files on the CD that all have
2553 the name README, but have different contents when seen as a
2554 ISO9660/Rock Ridge, Joliet or HFS CD.
2555 .PP
2556 Current directory contains:
2557 .IP
2558 % ls \-F
2559 .br
2560 README.hfs     README.joliet  README.Unix    cd_dir/
2561 .PP
2562 The following command puts the contents of the directory
2563 .I cd_dir
2564 on the
2565 CD along with the three README files \(em but only one will be seen from
2566 each of the three filesystems:
2567 .IP
2568 % genisoimage \-o cd.iso \-hfs \-J \-r \-graft\-points \(rs
2569 .br
2570         \-hide README.hfs \-hide README.joliet \(rs
2571 .br
2572         \-hide\-joliet README.hfs \-hide\-joliet README.Unix \(rs
2573 .br
2574         \-hide\-hfs README.joliet \-hide\-hfs README.Unix \(rs
2575 .br
2576         README=README.hfs README=README.joliet \(rs
2577 .br
2578         README=README.Unix cd_dir
2579 .PP
2580 i.e. the file README.hfs will be seen as README on the HFS CD and the
2581 other two README files will be hidden. Similarly for the Joliet and
2582 ISO9660/Rock Ridge CD.
2583 .PP
2584 There are probably all sorts of strange results possible with
2585 combinations of the hide options ...
2586 .\" ----------------------------------------
2587 .SH NOTES
2588 .PP
2589 .B genisoimage
2590 may safely be installed suid root. This may be needed to allow
2591 .B genisoimage
2592 to read the previous session when creating a multisession image.
2593 .PP
2594 If 
2595 .B genisoimage 
2596 is creating a filesystem image with Rock Ridge attributes and the
2597 directory nesting level of the source directory tree is too much
2598 for ISO9660, 
2599 .B genisoimage 
2600 will do deep directory relocation.
2601 This results in a directory called
2602 .B RR_MOVED
2603 in the root directory of the CD. You cannot avoid this directory.
2604 .PP
2605 Many boot code options for different platforms are mutualy exclusive because
2606 the boot blocks cannot coexist, ie. different platforms share the same data
2607 locations in the image. See
2608 http://lists.debian.org/debian-cd/2006/12/msg00109.html for details.
2609 .\" ----------------------------------------
2610 .SH BUGS
2611 .PP
2612 Any files that have hard links to files not in the tree being copied to the
2613 ISO9660 filesystem will have an incorrect file reference count.
2614 .PP
2615 Does not check for SUSP record(s) in `.' entry of the
2616 root directory to verify the existence of Rock Ridge
2617 enhancements.
2618 This problem is present when reading old sessions while
2619 adding data in multisession mode.
2620 .PP
2621 Does not properly read relocated directories in multisession
2622 mode when adding data.
2623 Any relocated deep directory is lost if the new session does not
2624 include the deep directory.
2625 .\" Repeat by: create first session with deep directory relocation
2626 .\" then add new session with a single dir that differs from the
2627 .\" old deep path.
2628 .PP
2629 Does not re-use
2630 .I RR_MOVED
2631 when doing multisession from
2632 .IR TRANS.TBL .
2633 .PP
2634 Does not create whole_name entry for
2635 .I RR_MOVED
2636 in multisession mode.
2637 .PP
2638 There may be other bugs.  Please, report them to the maintainers.
2639 .\" ----------------------------------------
2640 .SH "HFS PROBLEMS/LIMITATIONS"
2641 I have had to make several assumptions on how I expect the modified
2642 libhfs routines to work, however there may be situations that either
2643 I haven't thought of, or come across when these assumptions fail.
2644 Therefore I can't guarantee that
2645 .B genisoimage
2646 will work as expected
2647 (although I haven't had a major problem yet). Most of the HFS features work
2648 fine, but some are not fully tested. These are marked as
2649 .I Alpha
2650 above.
2651 .PP
2652 Although HFS filenames appear to support uppercase and lowercase letters,
2653 the filesystem is case-insensitive, i.e., the filenames
2654 .IR aBc " and "AbC
2655 are the same. If a file is found in a directory with the same HFS name,
2656 .B genisoimage
2657 will attempt to make a unique name by adding `_' characters
2658 to one of the filenames.
2659 .PP
2660 HFS file/directory names that share the first 31 characters have
2661 `_N' (a decimal number) substituted for the last few characters
2662 to generate unique names.
2663 .PP
2664 Care must be taken when "grafting" Apple/Unix files or directories (see
2665 above for the method and syntax involved). It is not possible to use a
2666 new name for an Apple/Unix encoded file/directory. e.g. If a Apple/Unix
2667 encoded file called
2668 .I oldname
2669 is to added to the CD, you cannot use the command line:
2670 .IP
2671 genisoimage \-o output.raw \-hfs \-graft\-points newname=oldname cd_dir
2672 .PP
2673 .B genisoimage
2674 will be unable to decode
2675 .IR oldname .
2676 However, you can graft
2677 Apple/Unix encoded files or directories as long as you do not attempt to
2678 give them new names as above.
2679 .PP
2680 When creating an HFS volume with the multisession options,
2681 .B \-M
2682 and
2683 .BR \-C ,
2684 only files in the last session will be in the HFS volume. i.e.
2685 .B genisoimage
2686 cannot
2687 .I add
2688 existing files from previous sessions to the HFS volume.
2689 .PP
2690 However, if each session is created with
2691 .BR \-part ,
2692 each session will appear as 
2693 separate volumes when mounted on a Mac. In this case, it is worth using
2694 .BR \-V " or " \-hfs\-volid
2695 to give each session a unique volume name,
2696 otherwise each "volume" will appear on the Desktop with the same name.
2697 .PP
2698 Symbolic links (as with all other non-regular files) are not added to
2699 the HFS directory.
2700 .PP
2701 Hybrid volumes may be larger than pure ISO9660 volumes
2702 containing the same data. In some cases (e.g. DVD sized volumes) the
2703 difference can be significant. As an HFS volume gets bigger, so does the
2704 allocation block size (the smallest amount of space a file can occupy).
2705 For a 650MB CD, the allocation block is 10kB, for a 4.7GB DVD it will be
2706 about 70kB.
2707 .PP
2708 The maximum number of files in an HFS volume is about 65500 \(em although
2709 the real limit will be somewhat less than this.
2710 .PP
2711 The resulting hybrid volume can be accessed on a Unix machine by using
2712 the hfsutils routines. However, no changes can be made to the volume as it
2713 is set as
2714 .B locked.
2715 The option
2716 .B \-hfs\-unlock
2717 will create an output image that is unlocked \(em however no changes should be
2718 made to the contents of the volume (unless you really know what you are
2719 doing) as it's not a "real" HFS volume.
2720 .PP
2721 .B \-mac\-name
2722 will not currently work with
2723 .B \-T
2724 \(em the Unix name will be used in the
2725 .I TRANS.TBL
2726 file, not the Macintosh name.
2727 .PP
2728 Although 
2729 .B genisoimage
2730 does not alter the contents of a file, if a binary file has its TYPE
2731 set as
2732 .IR TEXT ", it " may
2733 be read incorrectly on a Macintosh. Therefore a better choice for the
2734 default TYPE may be
2735 .IR ???? .
2736 .PP
2737 .B \-mac\-boot\-file
2738 may not work at all...
2739 .PP
2740 May not work with PC Exchange v2.2 or higher files (available with MacOS 8.1).
2741 DOS media containing PC Exchange files should be mounted as type
2742 .B msdos
2743 (not
2744 .BR vfat )
2745 when using Linux.
2746 .PP
2747 The SFM format is only partially supported \(em see
2748 .B HFS MACINTOSH FILE FORMATS
2749 section above.
2750 .PP
2751 It is not possible to use
2752 .BR \-sparc\-boot " or " \-generic\-boot " with"
2753 .BR \-boot\-hfs\-file " or " \-prep\-boot .
2754 .PP
2755 .B genisoimage
2756 should be able to create HFS hybrid images over 4Gb, although this has not
2757 been fully tested.
2758 .\" ----------------------------------------
2759 .SH "SEE ALSO"
2760 .BR genisoimagerc (5),
2761 .BR wodim (1),
2762 .BR mkzftree (8),
2763 .BR magic (5).
2764 .\" ----------------------------------------
2765 .SH AUTHORS
2766 .B genisoimage
2767 is derived from
2768 .B mkisofs
2769 from the
2770 .B cdrtools 2.01.01a08
2771 package from May 2006 (with few updates extracted from cdrtools 2.01.01a24 from
2772 March 2007) from .IR http://cdrecord.berlios.de/ ,
2773 but is now part of the
2774 .B cdrkit
2775 suite, maintained by Joerg Jaspert, Eduard Bloch, Steve McIntyre, Peter
2776 Samuelson, Christian Fromme, Ben Hutchings, and other contributors.
2777 The maintainers can be contacted at
2778 .IR debburn-devel@lists.alioth.debian.org ,
2779 or see the
2780 .B cdrkit
2781 project web site at
2782 .IR http://www.cdrkit.org/ .
2783 .PP
2784 Eric Youngdale wrote the first versions (1993\(en1998) of
2785 .BR mkisofs .
2786 J\(:org Schilling wrote the SCSI transport library and its
2787 interface, and has maintained
2788 .B mkisofs
2789 since 1999.  James Pearson wrote the HFS hybrid code, using
2790 .I libhfs
2791 by Robert Leslie.  Pearson, Schilling, Jungshik Shin and Jaakko
2792 Heinonen contributed to the character set conversion code.  The
2793 .B cdrkit
2794 maintainers have maintained
2795 .B genisoimage
2796 since 2006.
2797 .PP
2798 .nf
2799 Copyright 1993-1998 by Yggdrasil Computing, Inc.
2800 Copyright 1996-1997 by Robert Leslie
2801 Copyright 1997-2001 by James Pearson
2802 Copyright 1999-2006 by J\(:org Schilling
2803 Copyright 2007 by J\(:org Schilling (originating few updates)
2804 Copyright 2002-2003 by Jungshik Shin
2805 Copyright 2003 by Jaakko Heinonen
2806 Copyright 2006 by the Cdrkit maintainers
2807 .fi
2808 .PP
2809 If you want to take part in the development of
2810 .BR genisoimage ,
2811 you may join the
2812 .B cdrkit
2813 developer mailing list by following the instructions on
2814 .IR http://alioth.debian.org/mail/?group_id=31006 .
2815 The email address of the list is
2816 .IR debburn-devel@lists.alioth.debian.org .
2817 This is also the address for user support questions.  Note that
2818 .BR cdrkit " and " cdrtools
2819 are not affiliated.
2820 .PP
2821 .\" ----------------------------------------
2822 .SH ACKNOWLEDGEMENTS
2823 UNIX is a registered trademark of The Open Group in the US and other countries.