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