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