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