• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

diag/H04-Sep-2020-5,9674,832

COPYINGH A D15-Sep-199317.8 KiB346285

ChangeLogH A D09-Sep-2004124.4 KiB3,8672,880

ChangeLog.mkhybridH A D26-Jun-200013.5 KiB483282

MakefileH A D11-Aug-20192.8 KiB7545

Makefile.docH A D13-Jun-2007831 208

Makefile.manH A D19-Nov-20001.3 KiB309

READMEH A D22-Nov-19995.3 KiB143104

README.compressionH A D03-Apr-2002704 1812

README.eltoritoH A D10-May-20205.3 KiB11890

README.graft_dirsH A D12-Jan-20004.6 KiB15085

README.hfs_bootH A D20-Jul-20002.8 KiB7550

README.hfs_magicH A D16-Jun-19982.7 KiB7051

README.hideH A D22-Nov-20018.1 KiB207155

README.jolietH A D12-Apr-20012.1 KiB5442

README.macosxH A D14-Aug-20021.9 KiB4230

README.mkhybridH A D26-Jun-20004.1 KiB12686

README.prep_bootH A D07-Aug-19991.7 KiB4634

README.rootinfoH A D26-Apr-20002.7 KiB7350

README.sessionH A D02-Mar-19992.3 KiB4938

README.sortH A D22-Nov-20013.3 KiB10368

README.sparcbootH A D12-Dec-19993 KiB7755

README.sunx86bootH A D25-Feb-20052.7 KiB7749

RELEASEH A D09-Sep-200448 42

Rcompresion.mkH A D13-Jun-2007676 176

Reltorito.mkH A D13-Jun-2007671 176

Rgraft_dirs.mkH A D13-Jun-2007675 176

Rhfs_boot.mkH A D13-Jun-2007671 176

Rhfs_magic.mkH A D13-Jun-2007673 176

Rhide.mkH A D13-Jun-2007663 176

Rjoliet.mkH A D13-Jun-2007667 176

Rmacosx.mkH A D13-Jun-2007667 176

Rmkhybrid.mkH A D13-Jun-2007671 176

Rprep_boot.mkH A D13-Jun-2007673 176

Rrootinfo.mkH A D13-Jun-2007671 176

Rsession.mkH A D13-Jun-2007669 176

Rsort.mkH A D13-Jun-2007663 176

Rsparcboot.mkH A D13-Jun-2007673 176

Rsunx86boot.mkH A D13-Jun-2007675 176

TODOH A D27-Nov-20086.2 KiB165124

apple.cH A D08-Jan-201974.6 KiB3,0831,972

apple.hH A D01-Mar-200411 KiB383232

apple_driver.8H A D09-Jun-19981.3 KiB5147

apple_driver.cH A D16-Jul-20175.3 KiB212143

apple_driver.mkH A D19-Dec-20101.5 KiB3715

apple_driver_man.mkH A D15-May-20051.3 KiB309

boot.cH A D23-Oct-201614.4 KiB556399

bootinfo.hH A D01-Mar-20041.3 KiB3510

bswap.hH A D13-Sep-20061.8 KiB5615

build_mkisofs.comH A D13-Jan-20041.7 KiB5049

defaults.hH A D12-Dec-20162.9 KiB155116

desktop.cH A D08-Jul-20094.6 KiB17671

diskmbr.hH A D01-Mar-20041.5 KiB5424

dvd_file.cH A D17-Sep-201819 KiB702506

dvd_file.hH A D21-Jul-20021.1 KiB306

dvd_reader.cH A D17-Sep-20186.4 KiB294181

dvd_reader.hH A D17-Sep-20183.6 KiB14128

eltorito.cH A D23-Nov-201519.4 KiB687471

files.cH A D17-Sep-20188.4 KiB400280

hash.cH A D13-Dec-201613.5 KiB601461

hdisk.plH A D12-May-19982.1 KiB6630

hybridman.mkH A D15-May-20051.3 KiB319

ifo_read.cH A D17-Sep-20189.4 KiB453285

ifo_read.hH A D17-Sep-20182.1 KiB7113

ifo_types.hH A D17-Sep-20182.2 KiB8129

inode.cH A D13-May-201811.5 KiB465312

iso9660.hH A D04-Jun-201113.4 KiB377253

isonum.cH A D19-Dec-20104.2 KiB229134

joliet.cH A D04-Apr-201836.9 KiB1,4761,006

mac_label.cH A D11-May-202013.2 KiB429299

mac_label.hH A D01-Mar-20045.8 KiB158105

mactypes.hH A D01-Mar-20041.7 KiB5437

magicH A D07-Jun-19982.3 KiB8273

mappingH A D21-Jan-1998337 98

match.cH A D27-Nov-20166.1 KiB417323

match.hH A D12-Dec-20162.7 KiB9359

mkhybrid.8H A D30-Apr-200057 31

mkisofs.8H A D03-May-2022119.5 KiB3,9243,851

mkisofs.cH A D09-Oct-2020105 KiB4,0173,237

mkisofs.hH A D24-Mar-202026.9 KiB884622

more.mappingH A D28-Aug-199817.9 KiB283282

multi.cH A D05-Jan-201656.7 KiB2,2351,551

name.cH A D19-Dec-201012.8 KiB543336

readme.mkH A D13-Jun-2007659 176

rock.cH A D02-Dec-201223.7 KiB945697

rock.hH A D28-Apr-20142 KiB5522

scsi.cH A D02-Dec-20124.7 KiB184117

scsi.hH A D14-Nov-20161.1 KiB348

stream.cH A D08-Dec-20156.8 KiB258180

sunlabel.hH A D28-Dec-20036.6 KiB195128

tree.cH A D23-Jul-202077 KiB3,0402,089

udf.cH A D14-Nov-201681.7 KiB2,7121,999

udf.hH A D01-Mar-20041.6 KiB4216

udf_fs.hH A D12-Feb-201323.3 KiB745586

vms.cH A D16-Jul-20175.7 KiB314246

vms.hH A D01-Mar-2004413 186

volume.cH A D19-Dec-201018.2 KiB734397

walk.cH A D19-Dec-20103.9 KiB161115

write.cH A D09-Oct-202074.8 KiB3,0602,197

README

1# @(#)README	1.7 99/11/23 joerg
2
3Note:
4
5	This program requires a lot of virtual memory to run since it
6builds all of the directories in memory.  The exact requirements
7depend upon a lot of things, but for Rock Ridge discs 12Mb would not
8be unreasonable.  Without RockRidge and without the translation
9tables, the requirements would be considerably less.
10
11*****************************
12Notes for version 1.12
13
14	Joliet support is now complete.  See the -J option.
15
16	The file scanning code is much improved - mkisofs can use multiple
17	sources of input files and merge them together to form the output
18	image.  In addition, each source can be grafted at any point in the
19	iso9660 image.
20
21	The image writing code has been cleaned up to make it much easier
22	to add custom extensions.
23
24	The ADD_FILES feature has been removed as it didn't work well,
25and it was hard to figure out.  The recent rearrangements in the
26file scanning code would tend to solve these issues.
27
28*****************************
29Notes for version 1.11
30
31	There is a feature which can be optionally compiled into
32mkisofs that allows you to merge arbitrary directory trees into the
33image you are creating.  You need to compile with -DADD_FILES for my
34changes to take effect.   Thanks to Ross Biro biro@yggdrasil.com.
35
36*****************************
37Notes for version 1.10b1
38
39	Big news is that multi-session capability is very close to being
40	done.  There is still a missing interface to cdwrite that is
41	used to determine the next writable address and the sector number
42	of the last existing session.  Until we get the interface to cdwrite
43	done, this is a beta version.
44
45	Bug involving DST fixed (dates are always calculated, since some
46	files may be DST and other ones would not be).
47
48	Unfortunately the notes on some of the small patches got lost.
49
50*****************************
51Notes for version 1.06
52
53	Jan-Piet Mens <jpm@mens.de> added support for the '-m' switch. This
54	allows exclusion of shell-style globs from the CDROM.
55	See manual mkisofs.8 for more information.
56
57*****************************
58Notes for version 1.05
59
60	Added support for '-r' switch.  This is very similar to -R for
61Rock Ridge, but echos of the development environment are removed
62(i.e. uid/gid set to 0, and permissions of the files are canonicalized).
63Useful in applications where a distribution medium is being produced.
64
65*****************************
66Notes for version 1.04
67
68	No notes for 1.04.
69
70*****************************
71Notes for version 1.03
72
73	No notes for 1.03.
74
75*****************************
76Notes for version 1.02.
77
78	Minor bugfixes here and there.  Support for compiled in
79defaults for many of the text fields in the volume header are now
80present, and there is also support for a file ".mkisofsrc" that can
81also read settings for these parameters.
82
83	A short script "Configure" was added to allow us to set up special
84compile options that depend upon the system that we are running on.
85This should help stamp out the sphaghetti-isms that were starting to grow
86up in various places in the code.
87
88	You should get more meaningful error messages if you run out of
89memory.
90
91*****************************
92Notes for version 1.1.
93
94	The big news is that SUSP CE entries are now generated for
95extremely long filenames and symlink names.  This virtually guarantees
96that there is no limit (OK, well, about 600Mb) for file name lengths.
97I have tested this as well as I can, and it seems to work with linux.
98This would only be used very rarely I suspect.
99
100	Also, I believe that support for VMS is done.  You must be
101careful, because only Stream-LF and FIxed length record files can be
102recorded.  The rest are rejected with error messages.  Perhaps I am
103being too severe here.
104
105	There is a bugfix in the sorting of entries on the disc - we
106need to stop comparing once we reach the ';' character.
107
108	There are four new options -z -d -D -l -V.  Some of these tell
109mkisofs to relax some of the iso9660 restrictions, and many systems
110apparently do not really seem to mind.  Use these with caution.
111
112	Some diagnostic programs to scan disc images are in the diag
113directory.  These are not as portable as mkisofs, and may have some
114bugs.  Still they are useful because they can check for bugs that I might
115have introduced as I add new features.
116
117*****************************
118Notes for version 1.0.
119
120	In version 1.0, the date fields in the TF fields were fixed -
121previously I was storing st_ctime as the file creation time instead of
122the file attribute change time.  Thanks to Peter van der Veen for
123pointing this out.  I have one slight concern with this change,
124however.  The Young Minds software is definitely supplying 3 dates
125(creation, modification and access), and I would strongly suspect that
126they are incorrectly putting the file attribute change time in the
127file creation slot.  I would be curious to see how the different RRIP
128filesystems treat this.  Anyway, this is something to keep in the back
129of your mind.
130
131	The symlink handling was not quite correct in 0.99 - this is
132now fixed.  Only some systems seemed to have been affected by this bug.
133
134	A command line option is now present to allow you to
135specifically exclude certain files from the distribution.
136
137	The case where you do not have permissions to read a directory
138is now handled better by mkisofs.  The directory that cannot be opened
139is converted into a zero-length file, and processing continues normally.
140
141	A few portability things have been fixed (hopefully).
142
143

README.compression

1Transparent decompression (-z option) is available on Linux kernels
2using kernel version 2.4.14 or 2.4.9-ac14 or later.
3
4You also need the zisofs-tools package, containing the mkzftree
5utility, to create the compressed files; this package is available at:
6
7ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/
8
9The mkzftree utility can also be used to read compressed CD-ROMs on
10systems which do not support transparent decompression.
11
12The use of a separate utility allows compression to be controlled on a
13per-file basis.  A file which is not compressed can be read on any
14system.
15
16Transparent decompression is implemented as an extension to Rock
17Ridge, so Rock Ridge needs to be enabled (-R or -r options.)
18

README.eltorito

1/* @(#)README.eltorito	1.3 20/05/10 eric, 2000-2020 J. Schilling */
2
3What is El Torito?
4------------------
5Simply put, El Torito is a specification that says how a cdrom should
6be formatted such that you can directly boot from it.
7
8The "El Torito" spec says that ANY cdrom drive should work (scsi/eide)
9as long as the BIOS supports El Torito. So far this has only been
10tested with EIDE drives because none of the scsi controllers that has
11been tested so far appears to support El Torito. The motherboard
12definately has to support El Torito. The ones that do let you choose
13booting from HD, Floppy, Network or CDROM.
14
15How To Make Bootable CDs
16------------------------
17
18For the x86 platform, many BIOS's have begun to support bootable CDs.
19The standard my patches for mkisofs is based on is called "El Torito".
20
21The "El Torito" standard works by making the CD drive appear, through BIOS
22calls, to be a normal floppy drive. This way you simply put an floppy
23size image (exactly 1440k for a 1.44 meg floppy) somewhere in the
24iso fs. In the headers of the iso fs you place a pointer to this image.
25The BIOS will then grab this image from the CD and for all purposes it
26acts as if it were booting from the floppy drive. This allows a working
27LILO boot disk, for example, to simply be used as is.
28
29It is simple then to make a bootable CD. First create a file, say "boot.img"
30which is an exact image of the boot floppu currently in use. There is
31at least one HOWTO on making bootable floppies. If you have a bootable
32floppy handy, you can make a boot image with the command
33
34dd if=/dev/fd0 of=boot.img bs=10k count=144
35
36assuming the floppy is in the A: drive.
37
38Place this image somewhere in the hierarchy which will be the source
39for the iso9660 filesystem. It is a good idea to put all boot related
40files in their own directory ("boot/" under the root of the iso9660 fs,
41for example), but this is not necessary.
42
43One caveat - Your boot floppy MUST load any initial ramdisk via LILO,
44not the kernel ramdisk driver! This is because once the linux kernel
45starts up, the BIOS emulation of the CD as a floppy disk is circumvented
46and will fail miserably. LILO will load the initial ramdisk using BIOS
47disk calls, so the emulation works as designed.
48
49The "El Torito" specification requires a "boot catalog" to be created as
50ll.
51This is a 2048 byte file which is of no interest except it is required.
52My patches to mkisofs will cause it to automatically create the
53boot catalog. You must specify where the boot catalog will go in the
54iso9660 filesystem. Usually it is a good idea to put it the same place
55as the boot image, and a name like "boot.catalog" seems appropriate.
56
57
58So we have our boot image in the file "boot.image", and we are going to
59put it in the directory "boot/" under the root of the iso9660 filesystem.
60We will have the boot catalog go in the same directory with the name
61"boot.catalog". The command to create the iso9660 fs in the file
62bootcd.iso is then
63
64mkisofs -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .
65
66The -b option specifies the boot image to be used (note the path is
67relative to the root of the iso9660 disc), and the -c option is
68for the boot catalog file.
69
70Since many BIOS implementations now have problems with larger boot images,
71modern boot implementations use the no emulation boot and load the rest
72of the boot image after Eltorito did load a single 2048 byte sector. Use
73a command line like this to create a modern boot:
74
75mkisofs -V MYVOL -iso-level 4 -R -b boot/grub/stage2_eltorito -no-emul-boot \
76	-boot-load-size 4 -boot-info-table -o myvol.iso thisdir
77
78or even a modern boot and EFI boot support at the same time:
79
80mkisofs -V MYVOL -iso-level 4 -R -b boot/grub/stage2_eltorito -no-emul-boot \
81	-boot-load-size 4 -boot-info-table \
82	-eltorito-alt-boot -eltorito-platform efi -b boot/grub/boot.efi \
83	-no-emul-boot
84	-o myvol.iso thisdir
85
86Depending on the BIOS and on the EFI boot code, the -boot-load-size option
87may also be needed for the EFI boot.
88
89Now burn the CD and its ready to boot!
90
91CAVEATS
92-------
93
94I don't think this will work with multisession CDs.
95
96If your bootable floppy image needs to access the boot floppy, it has
97to do so through BIOS calls. This is because if your O/S tries to talk to
98the floppy directly it will bypass the "floppy emulation" the El Torito spec
99creates through BIOS. For example, under Linux it is possible to
100have an initial RAM disk loaded when the kernel starts up. If you let the
101kernel try to read in the initial RAM disk from floppy, it will fail
102miserably because Linux is not using BIOS calls to access the floppy drive.
103Instead of seeing the floppy image on the CD, Linux will be looking at
104the actually floppy drive.
105
106The solution is to have the initial boot loader, called LILO, load your
107initial RAM disk for you.  LILO uses BIOS calls entirely for these
108operations, so it can grab it from the emulated floppy image.
109
110I don't think making a CD bootable renders it unreadable by non-El Torito
111machines. The El Torito spec uses parts of the iso9660 filesystem which
112were reserved for future use, so no existing code should care what it does.
113
114Mkisofs currently stores identification records in the iso9660 filesystem
115saying that the system is a x86 system. The El Torito spec also allows
116one to write PowerPC or Mac id's instead. If you look at the code in write.c
117you could figure out how to change what is written.
118

README.graft_dirs

1# @(#)README.graft_dirs	1.1 00/01/12 joerg
2#
3This is from "Eduardo M. A. M. Mendes" <mendes@mgconecta.com.br>
4
5Creating multi-session CD's with dir=/ feature Micro Howto
6
7This mini-howto was written as guide to help me to create multi-session CD's
8with the possibility of determining the location of files. I hope
9that this guide helps you too.
10
11In order to use cdrecord it is first necessary to define to which scsi bus
12the cd-writer is connected. In my case the setup is dev=0,3,0. It is also
13interesting to have a separate directory in which all image files can
14be dumped: /home/cdsource is the directory I chose for dumping the images.
15
16The best way to understand how to create multi-session cds is to read
17README.multi. Most of what is going to be said here is based on that
18README file and on the help of several cdrecord users.
19
20This Micro Howto is divided into two parts as follows:
21
22Example a) A dir/=/dir1/dir2 example
23
24Example b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
25
26
27We are now ready to start.
28
29Example a) An dir/=/dir1/dir2 example
30
31A simple example will demonstrate that we can create multi-session cds
32with the dir_feature of the type dir/=/dir1/dir2
33
34Objetive: Saving root directories of Redhat 6.1 and Col 2.3 on a single CD.
35
36Observation: Redhat installation is mounted on COL 2.3 at /mnt/redhat
37
38First image - RedHat 6.1 - /mnt/redhat/root
39
40mkisofs -D -l -r -f -m core -L -o image1.raw redhat/=/mnt/redhat/root
41
42This will create a redhat directory on the cd. The option -D should be
43used with care. The other options used in the above command are just
44to demonstrate the use of mkisofs.  Please
45refer to man mkisofs if you want to know more.
46
47
48To see if the image is created as expected, we need to mount image1.raw using
49the option -o loop (Linux only! for information on Solaris read README.verify)
50as follows:
51
52mount -t iso9660 image1.raw /mnt/image -o loop
53
54To see the contents type:
55
56ls -l /mnt/image/redhat
57
58Does it look ok?  Great! Unmount /mnt/image. Now the burning process itself:
59
60cdrecord -v -dev=0,3,0 -multi -eject image1.raw
61
62To check the burned image we need to mount the cd; something like
63
64mount -t iso9660 /dev/scd0 /mnt/cdroms
65
66/mnt/cdroms is the device file for the cdrom I use.
67
68
69Second image - Caldera 2.3 - /root
70
71
72To create the second image on our cd, we need get information
73about sectors related to the first track. To do that, issue the command
74
75cdrecord -v -dev=0,3,0 -msinfo
76
77Cdrecord returns the following number
78
790,135563
80
81This number is the format XX,YY discussed on README.multi.  XX would be used
82for testing the images as well as burning the new track.
83
84mkisofs -D -l -r -f -m core -L -C 0,135563 -M /dev/scd0 -o image2.raw  caldera/=/root
85
86Now we need to check of image2.raw is ok. The following command creates exactly what we
87need.  Plese note that -C option. Only the first number changes in this case. The second one
88is always zero.  In our case the first number is zero due to cdrecord -msinfo.  When
89more tracks are added to the cd this number will change.
90
91mkisofs -D -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw  caldera/=/root
92
93mount -t iso9660 image2_test.raw /mnt/image -o loop
94
95ls -l /mnt/image shows that there are two directories: redhat and caldera, just the way
96we wanted.
97
98Now let us burn image2.raw (not image2_test.raw)
99
100cdrecord -v -dev=0,3,0 -multi -eject image2.raw
101
102We can mount the CD again to see that the two directories are there.  We can carry on
103doing this until we decide to close the CD. If this is the case, don't use -multi when
104burning the last session.
105
106b) A dir1/dir2/=/dir3/dir4 and dir1/dir2a=/dir5/dir6 example
107
108The above example seems a bit silly, one could argue. Why did I create a single directory
109called root and within two sub-directories: redhat and caldera?
110
111Using the procedure described above we would do as follows:
112
113mkisofs -D -l -r -f -m core -L -o image1.raw etc/redhat/=/mnt/redhat/etc
114
115cdrecord -v -dev=0,3,0 -multi -eject image1.raw
116
117To check the burned image we need to mount the cd; something like
118
119mount -t iso9660 /dev/scd0 /mnt/cdroms
120
121cdrecord -v -dev0,3,0 -msinfo
122
123Cdrecord returns the following number
124
1250,14391
126
127The second image can be created using
128
129mkisofs -l -r -f -m core -L -C 0,14391 -M /dev/scd0 -o image2.raw  etc/caldera/=/etc
130
131Creating a test image2
132
133mkisofs -l -r -f -m core -L -C 0,0 -M /dev/scd0 -o image2_test.raw etc/caldera/=/etc
134
135mount -t iso9660 image2_test.raw /mnt/image1 -o loop
136
137It works!!   That is great!!!
138
139Now the burning process itself.
140
141cdrecord -v -dev=0,3,0 -multi -eject image2.raw
142
143and we're done !!!!
144
145To add more tracks just do as indicated above.
146
147Good luxk!!!
148
149Eduardo Mendes - 11/23/99
150

README.hfs_boot

1Making HFS bootable CDs
2
3*******
4The HFS boot code in mkisofs/mkhybrid is now very out of date ...
5it does not support booting from IDE CDROMS, and probably won't work on
6"newer" Macs.
7
8The HFS boot code will be updated at some point in the future
9*******
10
11It *may* be possible to make the hybrid CD bootable on a Mac. As I do not
12have easy access to a CD-R (nor a Mac) at the moment, I have not actually
13created and written a bootable hybrid to CD - however, I *think* it will work!
14
15A bootable HFS CD requires an Apple CD-ROM (or compatible) driver, a bootable
16HFS partition and the necessary System, Finder, etc. files.
17
18A driver can be obtained from any other Mac bootable CD-ROM using the
19"apple_driver" utility (to make, type "make apple_driver"). This file can
20then be used with the -boot-hfs-file option. See below for usage.
21
22The HFS partition (i.e. the hybrid disk in our case) must contain a
23suitable System Folder, again from another CD-ROM or disk.
24
25For a partition to be bootable, it must have it's "boot block" set. The boot
26block is in the first two blocks of a partition. For a non-bootable partition
27the boot block is full of zeros. Normally, when a System file is copied to
28partition on a Mac disk, the boot block is filled with a number of required
29settings - unfortunately I don't know the full spec for the boot block ...
30
31I'm guessing that this will work OK ...
32
33Therefore, the utility "apple_driver" also extracts the boot block from the
34first HFS partition it finds on the given CD-ROM and this is used for the
35HFS partition created by mkhybrid.
36
37To extract the driver and boot block:
38
39apple_driver CDROM_device > HFS_driver_file
40
41where CDROM_device is the device name used by the CD-ROM (e.g. /dev/cdrom)
42
43The format of the HFS driver file is:
44
45	HFS CD Label Block                              512 bytes
46	Driver Partition Map (for 2048 byte blocks)     512 bytes
47	Driver Partition Map (for 512 byte blocks)      512 bytes
48	Empty                                           512 bytes
49	Driver Partition                                N x 2048 bytes
50	HFS Partition Boot Block                        1024 bytes
51
52The Perl script "hdisk.pl" can be used to give a listing of what's on
53a Mac CD. hdisk.pl is part of hfsutils.
54
55A hybrid CD is made using the option "-boot-hfs-file" e.g.
56
57mkhybrid -boot-hfs-file HFS_driver_file -o hfs.raw src_files/
58
59The -boot-hfs-file implies the -hfs option.
60
61PLEASE NOTE:
62
63By using a driver from an Apple CD and copying Apple software to your CD,
64you become liable to obey Apple Computer, Inc. Software License Agreements.
65
66The driver code (both extracting the driver and creating partitions etc.
67is based on code from "mkisofs 1.05 PLUS" by Andy Polyakov
68<appro@fy.chalmers.se> (see http://fy.chalmers.se/~appro/mkisofs_plus.html)
69
70
71Any comments, bug reports/fixes to the address below
72
73James Pearson (j.pearson@ge.ucl.ac.uk)
7419-Jul-2000
75

README.hfs_magic

1
2Find file types by using a modified "magic" file
3
4Based on file v3.22 by Ian F. Darwin (see libfile/LEGAL.NOTICE and
5libfile/README.dist - File v3.22 can be found at many archive sites)
6
7For each entry in the magic file, the "message" for the initial offset MUST
8be 4 characters for the CREATOR and 4 characters for the TYPE - white space is
9optional between them. Any other characters on this line are ignored.
10Continuation lines (starting with a '>') are also ignored i.e. only the initial
11offset lines are used.
12
13e.g magic entry for a GIF file:
14
15# off	type		test		message
16#
17# GIF image
180       string          GIF8            8BIM GIFf
19>4      string          7a              \b, version 8%s,
20>4      string          9a              \b, version 8%s,
21>6      leshort         >0              %hd x
22>8      leshort         >0              %hd,
23#>10    byte            &0x80           color mapped,
24#>10    byte&0x07       =0x00           2 colors
25#>10    byte&0x07       =0x01           4 colors
26#>10    byte&0x07       =0x02           8 colors
27#>10    byte&0x07       =0x03           16 colors
28#>10    byte&0x07       =0x04           32 colors
29#>10    byte&0x07       =0x05           64 colors
30#>10    byte&0x07       =0x06           128 colors
31#>10    byte&0x07       =0x07           256 colors
32
33Just the "8BIM" "GIFf" will be used whatever the type of GIF file it is.
34The continuation lines are used by the "file" command, but ignored by
35mkhybrid. They could be left out completely.
36
37The complete format of the magic file is given in the magic man page (magic.5).
38
39See the file "magic" for other examples
40
41Use with the -magic magic_file option, where magic_file is a file
42described above.
43
44The magic file can be used with the mapping file (option -map) - the order
45these options appear on the command line is important.  mkhybrid will try to
46detect if the file is one of the Unix/Mac files (e.g. a CAP or Netatalk
47file) first. If that fails, it will then use the magic and/or mapping
48file e.g:
49
50mkhybrid -o output.raw -map mapping -magic magic src_dir
51
52The above will check filename extensions first, if that fails to set the
53CREATOR/TYPE, the magic file will be used. To check the magic file
54before the filename extensions, use:
55
56mkhybrid -o output.raw -magic magic -map mapping src_dir
57
58
59Using just a magic file - filename extensions will not be checked e.g:
60
61mkhybrid -o output.raw -magic magic src_dir
62
63For the magic method to work, each file must be opened and read twice
64(once to find it's CREATOR/TYPE, and a second time to actually copy the
65file to the CD image). Therefore the -magic option may significantly
66increase processing time.
67
68If a file's CREATOR/TYPE is not set via the magic and mapping matches,
69then the file is given the default CREATOR/TYPE.
70

README.hide

1Hiding files on a CD
2=====================
3
4This document attempts to show how to hide files from being seen by an
5operating system accessing a CD as an ISO9660/Rock Ridge, Joliet or HFS
6CD. It also highlights some of the limitations ...
7
8Note: this document is about the various -hide options - not be confused with
9the -hidden options.
10
11The -hidden options set the 'EXISTENCE' bit in the directory entry which
12means the file or directory will be invisible - unless some special option
13is used to mount or view the CD - Linux has the 'unhide' mount option to
14make these files visible. i.e. the directory entry exists on the CD.
15
16With hindsight, to avoid confusion with the -hidden option, it would have
17been better to chose an option name like '-omit' instead of '-hide'...
18
19The various -hide options actually exclude the relevant directory entry
20from the directory tree. Therefore, it is not possible to access a file
21or directory that has be hidden with the -hide option when the ISO9600/Rock
22Ridge directory is mounted - because the directory entry does not exist on the
23CD (but the file data does). You would probably be able to access this file
24or directory when mounted as a Joliet or HFS CD (depending on other options
25used). Similarly, a directory entry hidden with the -hide-joliet option
26will not be accessible when mounted as an Joliet CD. Similarly for -hide-hfs
27etc.
28
29If you don't want a file or directory to appear on the CD at all, then use the
30-exclude options, not the -hide options (mkisofs completely ignores any
31file/directory excluded with the -exclude options).
32
33
34Using the hide options
35======================
36
37There are 6 hide options:
38
39-hide		   Hide a file/directory from the ISO9660/Rock Ridge directory
40-hide-list	   As above, but read file names from a file
41-hide-joliet	   Hide a file/directory from the Joliet directory
42-hide-joliet-list  As above, but read file names from a file
43-hide-hfs	   Hide a file/directory from the HFS directory
44-hide-hfs-list	   As above, but read file names from a file
45
46You can use the -hide, -hide-joliet and/or -hide-hfs options as many times
47as you like on the command line, but if you have many files to hide, then
48it may be better to put your file names in a file (one per line) and use
49the corresponding 'list' option. You can also use the three -hide-list options
50as many times as you want.
51
52The arguments to the -hide options are either the 'basename' or the 'whole
53path name' of a file. That is, if you use the option:
54
55% mkisofs -hide ABC [-other-options] CD_directory
56
57then any file with the name ABC will be hidden. If you want to be more
58specific, then use the whole name - as seen by mkisofs e.g.:
59
60% mkisofs -hide CD_directory/XYZ/ABC [-other-options] CD_directory
61
62will hide just the file 'CD_directory/XYZ/ABC' - not any other file called
63'ABC' that might exist under 'CD_directory'. However, if your command line
64is like:
65
66% mkisofs -hide CD_directory/XYZ/ABC [-other-options] ./CD_directory
67
68Then the file 'CD_directory/XYZ/ABC' will not be hidden because as far as
69mkisofs is concerned. Its whole path is actually './CD_directory/XYZ/ABC'.
70
71You can use wild cards in the -hide arguments.
72
73If the file name to be hidden is a directory, then the directory and all
74its contents are hidden.
75
76The main use of the hide options is on a multi platform (hybrid CD) to hide
77various files/directories that are operating system specific from been seen
78on the CD when mounted on another OS. i.e. You may want to hide Macintosh
79executables from being seen when the CD is mounted as a Joliet CD on a PC etc.
80
81For example, say we want to create a ISO9660/Rock Ridge, Joliet, HFS hybrid
82CD from files/directories in the directory called 'cd_dir' - which are:
83
84MAC/
85MAC/app
86MAC/data/
87MAC/data/file1
88PC/
89PC/app
90PC/data/
91PC/data/file1
92UNIX/
93UNIX/app
94UNIX/data
95UNIX/data/file1
96COMMON/
97COMMON/some_files
98
99We could use the command line:
100
101% mkisofs -r -J -hfs -hide MAC -hide PC -hide-joliet MAC \
102	-hide-joliet UNIX -hide-hfs PC -hide-hfs UNIX -o cd.iso cd_dir
103
104This will give a CD that when mounted as a Rock Ridge CD, you will only
105see the directories UNIX and COMMON, as a Joliet CD the directories
106PC and COMMON, and as an HFS CD the directories MAC and COMMON.
107
108If you also had the three files in the current directory called README.hfs,
109README.joliet and README.unix - but you wanted to have each of these
110files appear as just 'README' when mounted, then you could use the above
111command line with the following:
112
113% mkisofs -r -J -hfs -graft-points -hide MAC -hide PC -hide-joliet MAC \
114	-hide-joliet UNIX -hide-hfs PC -hide-hfs UNIX \
115	-hide README.hfs -hide README.joliet -hide-joliet README.hfs \
116	-hide-joliet README.uni -hide-hfs README.joliet -hide-hfs README.unix \
117	README=README.hfs README=README.joliet README=README.unix \
118	-o cd.iso cd_dir
119
120Note: we've used the -graft-points option as we're using the '=' syntax
121to insert the files called README.hfs, README.joliet and README.unix as
122'README'
123
124The resulting CD when mounted as a Rock Ridge CD, will have the directories
125UNIX and COMMON - with the file called README - which was originally
126called README.unix.
127
128However, in most circumstances, it would be better to have the contents
129of each of the OS specific directories (plus the contents of the COMMON
130directory) to appear at the top level of the CD. i.e. when the CD is mounted
131(as ISO9660/Rock Ridge, Joliet or HFS) it has the contents:
132
133README
134app
135data/file1
136some_files
137
138Unfortunately, this is not as straight forward as it may seem - i.e. doing
139the following may seem OK, but it won't work - for reasons I'll explain
140later:
141
142It gets a bit messy using the -graft-points syntax above, so we'll assume
143each of the MAC, UNIX and PC directories contain the correct README, We'll
144also change to the 'cd_dir' directory and use the command:
145
146mkisofs -r -J -hfs -hide MAC -hide PC -hide-joliet MAC \
147	-hide-joliet UNIX -hide-hfs PC -hide-hfs UNIX \
148	-o cd.iso MAC PC UNIX COMMON
149
150You will get errors like:
151
152mkisofs: Error: UNIX/README and MAC/README have the same Rock Ridge name
153...
154mkisofs: Unable to sort directory
155
156This is because you can not hide "pathspecs" that are directories ("pathspecs"
157are file names given on the command line, or in a path-list file). This a
158"feature" of mkisofs. In this case nothing is actually hidden at all.
159
160So you might think that the following may work:
161
162mkisofs -r -J -hfs -hide "MAC/*" -hide "PC/*" -hide-joliet "MAC/*" \
163	-hide-joliet "UNIX/*" -hide-hfs "PC/*" -hide-hfs "UNIX/*" \
164	-o cd.iso MAC PC UNIX COMMON
165
166which may appear to work - but when the CD is mounted as an ISO9660/Rock Ridge
167or Joliet CD, then the directory "data" is missing.
168
169Again this is a feature of mkisofs - the directories PC/data and UNIX/data
170are mapped by mkisofs to the same output directory called "/data" - the
171various "hide" flags are stored with this directory info - in this case as
172the output directory "/data" is first hidden from the ISO9660/Rock Ridge and
173then the Joliet directory, the net result is that "/data" gets hidden from
174both directories ... the way mkisofs hides HFS directories is slightly
175different, so in this case the directory "data" exists on the HFS volume
176and contains the correct contents.
177
178However, it is possible to obtain the required result, but we have to be
179careful about hiding multiple input directories that map to a single output
180directory.
181
182To do this we have to hide just the files in these directories (or more
183accurately, all the non-directories). This is best done by using lists of
184files to hide for example:
185
186find PC -type f -print > pc.list
187find UNIX -type f -print > unix.list
188find MAC -type f -print > mac.list
189
190mkisofs -r -J -hfs -hide-list pc.list -hide-list mac.list \
191	-hide-joliet-list unix.list -hide-joliet-list mac.list \
192	-hide-hfs-list pc.list -hide-hfs-list unix.list \
193	-o cd.iso MAC PC UNIX COMMON
194
195i.e. instead of trying to hide a directory and letting mkisofs hide its
196contents, we explicitly hide all the files in the directory, but not the
197directory and any of its sub-directories.
198
199This will work for the above input files, but if your directory trees contain
200symbolic links and/or directories that will not get merged, then the hide lists
201will have to be tailored to get the required result.
202
203
204James Pearson 22-Nov-2001
205
206Any comments/problems to j.pearson@ge.ucl.ac.uk
207

README.joliet

1Some thoughts on Joliet - why it is a dumb idea to have a CD
2with Joliet enhancements but without Rock Ridge.
3It also helps you to understand why it it not possible to append
4a new session to a multi-session Joliet CD when Rock Ridge is
5missing.
6
7-	Joliet is not an accepted independant international standard
8	like ISO-9660 or Rock Ridge (IEEE-P1282).
9	Joliet has been created in 1995 - Rock Ridge in 1990.
10	Rock Ridge became a IEEE standard around 1992.
11
12Joliet is an unjustified addition to ISO-9660.
13
14-	The Joliet tree has no relation to the
15	ISO-9660 tree. Files from the ISO-9660 tree and from the
16	Joliet tree only share content. In general, it is not
17	possible to find the ISO-9660 name from a Joliet name
18	and vice versa if you check both trees on a CD.
19
20	Rock Ridge extensions are located at the end of each
21	ISO-9660 directory record. This makes the Rock Ridge
22	tree closely coupled to the ISO-9660 tree.
23
24-	Joliet does not allow all characters too, so the
25	Joliet filenames are not identical to the filenames
26	on disk.
27
28	As the ISO-9660 tree is the standard reference tree
29	on a CD and the ISO-9660 filenames don't allow all
30	characters and there is a length limitation, the
31	ISO-9660 names cannot be mapped to the filenames on the
32	OS reference tree on disk for doing multi-session.
33
34	Due to different limitations, the short ISO-9660 name
35	is in most cases not equal to the Joliet name or the
36	Rock Ridge name.
37
38-	Joliet has a filename length limitation of 64 chars (independent
39	from the character coding and type e.g. European vs. Japanese)
40	This is annoying as modern filesystems all allow 255 chars
41	per path name component.
42
43	Joliet uses UTF-16 coding while Rock Ridge uses ISO-8859 or
44	UTF-16 based chars and allows 255 octets. Using UTF-8,
45	Rock Ridge allows 85 Japanese characers or 255 US-ASCII chars.
46
47Other than slightly longer filenames, Joliet offers no new properties
48over plain ISO 9660. Rock Ridge is an open extendable standard and
49there is no filesystem property on Win32 that could not be implemented
50using Rock Ridge.
51
52Except Linux and FreeBSD, there is no POSIX-like like OS that supports
53Joliet. Never create Joliet only CD's for that reason.
54

README.macosx

1Notes on using the --osx-hfs option when running mkisofs on MacOS X
2
3mkisofs does not use any of the MacOS APIs to access files - it uses
4standard (POSIX style) library calls. Under normal circumstances, all
5mkisofs will 'see' is the data fork of files on an HFS (or HFS+) file system.
6
7However, Apple have provided a way for POSIX style applications to
8access the resource fork - using the following syntax:
9
10If a file exists on an HFS volume with the name 'foo', then the resource fork
11can be accessed using the file name 'foo/rsrc' or foo/..namedfork/rsrc'
12(the data fork can also be accessed using 'foo/..namedfork/data').
13
14These 'pseudo' file names are not normally visible in a directory - unless
15you access them directly (e.g. 'ls -l */rsrc etc).
16
17To access the finder information, Apple have provided an undocumented library
18function called getattrlist(). Fortunately there are example of its usage
19in the Darwin (MacOS kernel) source code.
20
21
22Although MacOS X can use HFS(+) as its file system, Apple have decided to
23move away from using HFS to store finder info and resource data - for
24example, the TYPE of a file may be based on its file name extension and the
25TYPE field in the finder info empty.
26
27mkisofs knows nothing about these file name extension mappings, so if the
28--osx-hfs option is used and the source files are on MacOS X HFS(+) volumes,
29by the fact that they are HFS files, they will get identified as 'MacOS X HFS'
30and the resulting file on the output CD image will have empty TYPE and CREATOR
31fields.
32
33Therefore, if the input finderinfo is blank and the the resource fork is
34empty, mkisofs will assume the input file is not a 'real' HFS file - which
35means the TYPE and CREATOR may then be set using the file's magic number or
36mkisofs' file name extension mapping.
37
38The only real benefit of using the --osx-hfs option is when the source files
39are on an OS9 or earlier HFS or HFS+ volume e.g. an existing HFS CD.
40
41James Pearson 3-Jul-2002
42

README.mkhybrid

1
2mkhybrid v1.13 has now merged with, and is a part of mkisofs v1.13
3
4HFS hybrid code Copyright (C) James Pearson 1997, 1998, 1999, 2000
5libhfs code Copyright (C) 1996, 1997 Robert Leslie
6libfile code Copyright (c) Ian F. Darwin 1986, 1987, 1989,
7	1990, 1991, 1992, 1994, 1995
8mkisofs code Copyright 1993 Yggdrasil Computing, Incorporated
9
10*** NEWS ***
11
12Macs can now read Joliet CDs - see http://www.tempel.org/joliet/
13
14***
15
16*** IMPORTANT ***
17
18The meaning of some of the HFS command line options has changed since
19version 1.12b5.2. This change is to make the way mkisofs decodes the
20various Apple/Unix file formats (CAP, AppleDouble, MacBinary etc.) less
21confusing and more logical. To decode one or more of the Apple/Unix files,
22then the corresponding "double dash" option must be given (i.e. --cap,
23--double, --macbin etc.) mkisofs can search for all known Apple/Unix files
24by using the -probe option.
25
26The options that have changed are:
27
28Option		old meaning			new meaning
29======		===========			===========
30
31-hfs		Create an HFS hybrid CD		Create an HFS hybrid CD.
32		and attempt to decode all	Any Apple/Unix file is only
33		Apple/Unix files (except	decoded if one or more of
34		MacBinary and AppleSingle)	the "double dash" options are
35						given
36
37-apple		Create an ISO9660 with		Create an ISO9660 with
38		Apple extensions CD and		Apple extensions CD. Any
39		attempt to decode all		Apple/Unix file is only decoded
40		Apple/Unix files (except	if one or more of the
41		MacBinary and AppleSingle)	"double dash" options are given
42
43-no-mac-files	Do not attempt to decode	No longer used
44		any Apple/Unix file
45
46-probe		Attempt to decode		Attempt to decode all
47		MacBinary and AppleSingle	Apple/Unix files
48		as well as the other
49		Apple/Unix files
50
51***
52
53Most of the HFS features work fine, however, some are not fully tested.
54These are marked as "Alpha" in the man page.
55
56See "ChangeLog.mkhybrid" for any minor changes/bug fixes
57
58If you are using SunOS 4.1.[34], then you need the following patches
59to read CDs with associated files:
60
61SunOS 4.1.3:		Patch 101832-05
62SunOS 4.1.3_U1:		Patch 101833-02
63SunOS 4.1.4:		Patch 102583-02
64
65
66EXAMPLES
67
68To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of
69the source directory cd_dir:
70
71% mkisofs -o cd.iso -r -J -hfs cd_dir
72
73To create a HFS hybrid CD from the source directory cd_dir that contains
74Netatalk Apple/Unix files:
75
76% mkisofs -o cd.iso --netatalk cd_dir
77
78To create a HFS hybrid CD from the source directory cd_dir, giving all files
79CREATOR and TYPES based on just their filename extensions listed in the file
80"mapping".:
81
82% mkisofs -o cd.iso -map mapping cd_dir
83
84To create a CD with the 'Apple Extensions to ISO9660', from the source
85direcories cd_dir and another_dir. Files in all the known Apple/Unix format
86are decoded and any other files are given CREATOR and TYPE based on their
87magic number given in the file "magic":
88
89% mkisofs -o cd.iso -apple -magic magic -probe cd_dir another_dir
90
91The following example puts different files on the CD that all have
92the name README, but have different contents when seen as a
93ISO9660/RockRidge, Joliet or HFS CD.
94
95Current directory contains:
96
97% ls -F
98README.hfs     README.joliet  README.unix    cd_dir/
99
100The following command puts the contents of the directory "cd_dir" on the
101CD along with the three README files - but only one will be seen from
102each of the three filesystems:
103
104% mkisofs -o cd.iso -hfs -J -r \
105        -hide README.hfs -hide README.joliet \
106        -hide-joliet README.hfs -hide-joliet README.unix \
107        -hide-hfs README.joliet -hide-hfs README.unix \
108        README=README.hfs README=README.joliet README=README.unix \
109        cd_dir
110
111i.e. the file README.hfs will be seen as README on the HFS CD and the
112other two README files will be hidden. Similarly for the Joliet and
113ISO9660/RockRidge CD.
114
115There are probably all sorts of stange results possible with
116combinations of the hide options ...
117
118
119Any comments, bug reports/fixes about the HFS parts of mkisofs to the
120address below.
121
122Please state the version, platform and command line used when submitting
123a bug report - the output from "-log-file -v" would help.
124
125James Pearson (j.pearson@ge.ucl.ac.uk)
126

README.prep_boot

1I have extended mkhybrid to create a CD that is bootable via PPCbug
2on a PowerPC Reference Platform compliant machine (referred to as
3PReP).
4
5This includes a number of IBM RS-6000 clones, along with most of
6Motorola's embedded PowerPC boards, such as the MTX and MVME
7boards. (The motorola boards are sometimes referred to as PowerPlus)
8
9To build a bootable CD, you will first need a kernel image for your
10machine. Put the image somewhere in the filesystem you want
11to generate and ISO9660 image from.
12
13The '-B' or '-prep-boot' flags are used to specify the image file
14to use. The path must be relative to the root of the CD filesytem,
15NOT from the current directory.
16
17For example: to make an image of /tmp/cd and use the image file
18/tmp/cd/zImage, (with rock ridge extensions) use:
19
20mkhybrid -r -B zImage /tmp/cd -o cd.img
21
22Since there are four entries for bootable 'partitions', I have
23allowed up to 4 different images to be used. This might be
24usefull if one has need of different kernel images for different
25machines on the same CD.
26
27The first image will be in the first partition entry, so if one
28uses:
29
30mkhybrid -r -B zImage1 -B zImage2 -B zImage3 -B zImage4 /tmp/cd
31
32This will result in 4 bootable images. To boot off the first image
33from PPCbug, use 'pboot 0 41' from the ppcbug> prompt.
34(assuming the CDROM is at SCSI ID 4.. replace the 4 with the SCSI
35ID of the CDROM if not.) The second image is at 'pboot 0 42', etc.
36
37There should not be any conflicts with any of the HFS or hybrid
38functions, since the space used by the PReP partition maps is
39unused by anything else. If fact, the goal is to make a CD
40bootable on both Mac's and PReP machines ;)
41
42For any questions contact me at one of the following addresses:
43troy@microux.com
44troy@blacklablinux.com
45hozer@drgw.net
46

README.rootinfo

1The -icon-position option will attempt to preserve folder window positions,
2scroll bars, views etc. for Apple/Unix file formats that support this
3information (see below for which Apple/Unix encoding are supported).
4
5This information is stored in the 'FinderInfo' part of a Apple/Unix directory.
6For example, in a CAP directory structure a directory called 'dirA' will
7have the necessary FinderInfo stored in file '.finderinfo/dirA'. This file
8stores information including, the folder's location and size on screen,
9its scroll positions, folder View (view as Icons, Small Icons, etc.).
10
11However, the similar FinderInfo data for the 'root' folder is a special case.
12For example, if a directory called '/some/dir/macfiles' is a CAP volume that
13is mounted on a Mac as 'macfiles', then the FinderInfo for this directory
14is stored in the file '/some/dir/.finderinfo/macfiles' - which is outside
15the CAP directory structure.
16
17To get round this, an extra option, '-root-info' is used that takes as its
18argument the name of the file that stores the root folder's FinderInfo.
19
20Using the above example, the command file options will be something like:
21
22% mkhybrid --cap -root-info /some/dir/.finderinfo/macfiles /some/dir/macfiles
23
24The format of the root FinderInfo file must be the same as the 'double-dash'
25option(s) given on the command line.
26
27The Apple/Unix encodings that mkhybrid can decode the root FinderInfo are:
28
29CAP:
30	CAP directory:		/some/dir/macfiles
31	Root FinderInfo file:	/some/dir/.finderinfo/macfiles
32
33Netatalk:
34	Netatalk directory:	/some/dir/macfiles
35	Root FinderInfo file:	/some/dir/.AppleDouble/RootInfo
36
37EtherShare:
38	EtherShare directory:	/some/dir/macfiles
39	Root FinderInfo file:	/some/dir/.rsrc/macfiles
40
41If an HFS disk is mounted on a Linux platform, then the root FinderInfo
42files are:
43
44Option 'fork=cap':
45	Root FinderInfo file:	/mountpoint/.rootinfo
46
47Option 'fork=double':
48	Root FinderInfo file:	/mountpoint/%RootInfo
49
50Option 'fork=netatalk':
51	Root FinderInfo file:	/mountpoint/.AppleDouble/RootInfo
52
53
54The '-root-info' option implies the '-icon-position' option. Future releases
55of mkhybrid may automatically find the root FinderInfo file.
56
57The volume name is not set from the root FinderInfo file. Use the -V or
58-hfs-volid options to set the volume name.
59
60Currently UShare, SGI/XINET, PC Exchange and SFM Apple/Unix root FinderInfo
61files are not supported by mkhybrid - more information about these formats
62is required in order to supoort them.
63
64AppleSingle and MacBinary are file only formats - they don't support folders
65or volumes.
66
67Using this option, it is now possible to make a nearly true representation
68of a Mac folder layout on a Unix/Linux platform.
69
70James Pearson 26-Apr-2000
71
72Any comments/problems to j.pearson@ge.ucl.ac.uk
73

README.session

1/* @(#)README.session	1.3 99/03/02 eric */
2
3	This release of mkisofs has basic support completed for
4multiple sessions.  However, we still need some interaction
5between cdrecord and mkisofs for this to work correctly. This is needed as
6only cdrecord knows the different ways to gather these numbers for all
7different drives. It may be that future versions of mkisofs will include
8the needed support for MMC compliant drives.
9
10	There are a few new options to mkisofs to allow for this.
11The first one is "-M /dev/scd0", and is used so that mkisofs can examine
12the entirety of the previous image so that it can figure out what additional
13files need to be written in the new session. Note that there are operating
14systems that don't allow to read from CD drives with a sector size
15of 2048 bytes per sector. To use mkisofs on such an operating system, you
16will need a version of mkisofs that includes the SCSI transport library
17from cdrecord. Simply use the dev= syntax from cdrecord with -M in
18such a case. It will tell mkisofs to use the SCSI transport library to
19read from the CD instead of using the standard read() OS interface.
20
21	There is also a temporary hack in mkisofs in the form of a '-C' option.
22The -C option takes two numbers as input, which are delimited by commas.
23For example, you could specify "-C 1000,1020", but you should never just
24make up numbers to use here.  These numbers are determined from cdrecord.
25
26	Note that if you use -C and omit -M, it effectively means that
27you are writing a new session, starting at a non-zero block number,
28and you are effectively ignoring all of the previous session contents.
29When this session is sent to the writer, the new session effectively
30"erases" the previous session.
31
32	In practice you should be able to do something like:
33
34mkisofs [other options] -C `cdrecord dev=b,t,l -msinfo` \
35		-M /dev/cdblkdev
36
37Replace 'b,t,l' by the aproriate numbers for SCSIbus, target and lun
38of your drive.
39
40Note: As of the 1.12b5 release, the multi-session technology has
41matured quite significantly.  It is entirely possible that bugs
42exists, or that further tweaks will be required somewhere along the
43way to get things working correctly.  The data gathering mode of
44cdrecord has been tested, and I believe it works correctly.  Caveat
45Emptor.
46
47[Mar 1, 1999].
48
49

README.sort

1Sort the order of file data on the CD
2=====================================
3
4Note: this option does not sort the order of the file names that appear
5in the ISO9660 directory. It sorts the order in which the file data is
6written to the CD image.
7
8This option is useful in order to optimize the data layout on a CD.
9
10To use, type something like:
11
12mkisofs -o cdimage.iso -sort sort_file [other_options] cd_dir
13
14The file 'sort_file' contains two columns of:
15
16filename	weight
17
18where filename is the whole name of a file/directory as mkisofs will see it
19and weight is a whole number between +/- 2147483647
20
21The files will be sorted with the highest weights first and lowest last.
22The default weight is zero.
23
24If the filename is a directory name, then all the files in that directory (and
25sub-directories) will use its weight as their default weight.
26
27e.g.
28
29If the directory 'cd_dir' contains two directories called 'dir1' and 'dir2'
30with files 'A', 'B' and 'C' in dir1 and 'X', 'Y' and 'Z', the the file
31'sort_file' could look something like:
32
33cd_dir/dir2	1000
34cd_dir/dir2/Y	2000
35cd_dir/dir1/B	-2000
36cd_dir/dir1/A	-8000
37
38Note: There must be only one space or tab character between the filename and
39the weight and the weight must be the last characters on a line. The filename
40is taken to include all the characters from the first in a line, up to, but
41not including the last space or tab character on a line. This is to allow
42for space characters to be in, or at the end of a filename.
43
44
45The command:
46
47mkisofs -o cdimage.iso -sort sort_file cd_dir
48
49will sort the above file data as:
50
51cd_dir/dir2/Y
52cd_dir/dir2/X
53cd_dir/dir2/Z
54cd_dir/dir1/C
55cd_dir/dir1/B
56cd_dir/dir1/A
57
58Note: files 'X' and 'Z' both have the weight 1000 - their sort order will then
59be the normal ISO9660 sort order (i.e. alphabetical in this case).
60
61File C will have the default weight of 0
62
63Warning: the filenames in the sort list MUST match the whole path as seen by
64mkisofs. i.e. in the above case, if the command line was:
65
66mkisofs -o cdimage.iso -sort sort_file ./cd_dir
67
68then the sort_file filename will have to changed as accordingly.
69
70Notes
71=====
72
73CDs are written from the middle outwards. High weighted files will be nearer
74the inside of the CD.
75
76Wildcards in the filename list should work.
77
78If a file appears more than once in the source directory tree, then the file
79is only added once to the CD image - i.e. a hard linked file, or symbolic
80link if using the -f option. The file will be sorted according to the
81highest weighting given to any of the linked files.
82
83Zero length files are not sorted - the 'start extent' *may* appear to be in
84the middle of another file after sorting. This is because zero length files
85are given the start extent after the last file added to the CD at that time.
86This address is not changed by the sorting, so it may appear that the file
87address is in another file - however as they are zero length, this will
88not matter!
89
90Directories are not sorted by this flag - directories HAVE to be in the
91ISO9660 sort order - however, the files the directory entry points to, can be
92anywhere on the CD.
93
94Existing files from any previous sessions will not be sorted - they already
95exist on the CD and can not be moved!
96
97I have no idea if this is really useful ...
98
99
100James Pearson 22-Nov-2001
101
102Any comments/problems to j.pearson@ge.ucl.ac.uk
103

README.sparcboot

1# @(#)README.sparcboot	1.1 99/12/12 joerg
2#
3The sparc boot feature does allow you to create your own Sun sparc boot disk.
4This will allow you to create modified Solaris install disks or to create
5installation CD's for other OS that run on sparc systems.
6
7A CD that is bootable on a Sun sparc system has a Sun disk label on sector 0
8and some Sun sparc disk partitions behind the ISO-9660 filesystem image.
9
10The layout of a sparc boot CD:
11
12----------------------------------------------------------------------------------------------------
13|Sun disk label| Iso 9660 filesystem |Generic sun4 boot|sun4c boot|sun4m boot|sun4d boot|sun4e boot|
14----------------------------------------------------------------------------------------------------
15
16On older system CD's all boot partition contain a full UFS miniroot filesystem.
17On newer CD's the images on slice 2 and above only contain boot redirects to
18slice 1.
19
20To create a CD that is bootable on Sun sparc systems you need to have the
21boot images for the apropriate sparc architecture.
22
23A boot image file usually is a UFS filesystem image that contains the
24primary boot image at byte offset 512 ... 8191.
25
26You may get such boot images by extracting partitions 1..5 from a Sun Solaris install CD,
27but any bootable image should work.
28
29Here is an expample how to do this with the Solaris 7 install CD.
30
31dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s1 of=sun4
32dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s2 of=sun4c
33dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s3 of=sun4m
34dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s4 of=sun4d
35dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s5 of=sun4e
36
37
38mkisofs -R -sparc-boot sun4,sun4c,sun4m,sun4d,sun4e -o boot.img /mnt/install
39
40Will create the bootable image in boot.img.
41
42If you like to make the boot images smaller, you may call 'fstyp -v'
43on the images and use the 'size' value to get the needed minimal
44boot image size in kB.
45
46The result for the S7 boot CD is:
47
48ufs
49magic   11954   format  dynamic time    Wed Oct  7 00:00:30 1998
50sblkno  8       cblkno  12      iblkno  16      dblkno  252
51sbsize  2048    cgsize  2048    cgoffset 20     cgmask  0xfffffff0
52ncg     7       size    25704   blocks  23987
53			^^^^^
54			This is the number of interest.
55bsize   8192    shift   13      mask    0xffffe000
56fsize   2048    shift   11      mask    0xfffff800
57frag    4       shift   2       fsbtodb 2
58minfree 10%     maxbpg  2048    optim   time
59maxcontig 256   rotdelay 0ms    rps     90
60csaddr  252     cssize  2048    shift   9       mask    0xfffffe00
61ntrak   14      nsect   72      spc     1008    ncyl    102
62cpg     16      bpg     1008    fpg     4032    ipg     3776
63nindir  2048    inopb   64      nspf    4
64nbfree  1768    ndir    667     nifree  24329   nffree  9
65cgrotor 2       fmod    0       ronly   0
66
67So you should call:
68
69dd if=/vol/dev/dsk/c0t6/sol_7_sparc_sun_srvr/s1 of=sun4 bs=1k count=25704
70
71To modify this filesystem, you can mount it using the fbk driver:
72
73chmod +t ./sun4		# Need to do this to avoid vm cache aliasing problems
74
75mount -F fbk -o rw,type=ufs /dev/fbk0:sun4 /mnt
76
77

README.sunx86boot

1# @(#)README.sunx86boot	1.3 05/02/25 Copyright 2003 J. Schilling
2
3A Solaris x86 Boot CD looks the like this:
4
5-	A PC type fdisk partition map is in CD sector 0 at offset 0
6	This fdisk partition map contains a single Solaris 0x82 type
7	partition starting at CD sector 0 at offset 512.
8
9-	A SVr4 disk partition label is at CD sector 0 at offset 1024.
10	This equates the usual 512 byte offset to the primary partition
11	used by SVr4.
12
13	This SVr4 partition label defines:
14
15	-	Partition 0 to contain a usually UFS type boot filesystem
16
17	-	Partition 1 to map the ISO-9660 filesystem.
18
19		This seems to be a conceptual bug from Sun, as it is
20		impossible to mount this partition because this partition
21		would point outside the primary fdisk partition type 0x82
22
23	-	Partition 2 maps the whole CD.
24
25
26A boot CD created by Sun contains a master boot record in CD sector 0 offset 0.
27The size if this MBR is 0x1BE (446 decimal) as usual on PCs.
28
29At CD sector 0 offset 512, there is a "primary boot sector". The MBR assumes
30that is always gets loaded together with the ""primary boot sector".
31
32The El-Torito map for this CD defines a "no-emulation" boot sitting at CD sector 0
33and being 4 512 byte sectors in size. This covers the 1024 bytes of above
34boot code. Note that mkisofs will not put the no-emulation boot at sector 0
35as it keeps the boot inside the area used for other file content data.
36
37At CD sector 1..15, there is a secondary boot code that understands UFS and tries
38to boot from UFS slice 0. If you like to boot from different filesystem types,
39you need to replace this boot code. The real size used by the secondary boot
40is 31 x 512 bytes == 15872 bytes.
41
42To get hold of the three boot files, do the following with e.g. a Solaris 10
43boot CD:
44
45readcd dev=1,0 f=CD.out sectors=0-32
46
47Replace dev=1,0 with the apropriate values for your system (see readcd -scanbus).
48
49sdd if=CD.out bs=446 count=1 of=mboot
50sdd if=CD.out count=1 iseek=512 of=pboot
51sdd if=CD.out count=60 iseek=2048 of=bootblk
52
53To create the needed files for the misofs command line example below, do the
54following:
55
56sdd if=mboot -fill of=eltoritoboot
57cat pboot >> eltoritoboot
58
59sdd -inull bs=2k count=1 of=genboot
60cat bootblk >> genboot
61
62If you like the CD to look more similar to the original Sun CDs, use:
63
64cp eltoritoboot genboot
65sdd -inull bs=1k count=1 >> genboot
66cat bootblk >> genboot
67
68If you like to create a CD similar to the Solaris 10 boot CD, do the following:
69
70mkdir isodir
71star -cPM -C /vol/dev/dsk/c1t1d0/multi_icd_sol_10_x86/s2 . | star -xp -xdot -C isodir
72cp eltoritoboot isodir/.bootimage
73
74mkisofs -G genboot  -no-emul-boot -b .bootimage -c .catalog -R -o bootcd.iso -sunx86-boot /vol/dev/dsk/c1t1d0/multi_icd_sol_10_x86/s0 isodir/
75
76
77

readme.mk

1#ident @(#)readme.mk	1.1 07/06/14
2###########################################################################
3# Sample makefile for installing non-localized auxiliary files
4###########################################################################
5SRCROOT=	..
6RULESDIR=	RULES
7include		$(SRCROOT)/$(RULESDIR)/rules.top
8###########################################################################
9
10INSDIR=		share/doc/mkisofs
11TARGET=		README
12#XMK_FILE=	Makefile.man
13
14###########################################################################
15include		$(SRCROOT)/$(RULESDIR)/rules.aux
16###########################################################################
17