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