Subject: re: Looking to make a Sparc bootable cdrom, any instructions?
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 10/21/1998 20:50:52
making bootable SPARC & sun3 cdroms is fairly simple.  here's the scoop:


the prom treats the cdrom like a normal disk device, so you must provide
a valid sun disklabel on the cdrom, in the normal spot.  it does the
normal "boot" thing here too -- given a partition, load the first few
sectors, and run it.  the prom has some "smarts" about what partition it
will load by default from a cdrom.  eg, partition b is for sun4, c for
sun4c, etc.  this includes sun3 & sun3x support.  the ultras have a
smarter method that involves a data file on the disk.


so what you need to do is:
	- create an "almost" full iso9660 image of whatever you want
	  to put on the cd (i've used the NetBSD 1.3.2 tree for this).
	- get a bootable (floppy) image
	- rewrite the iso image with (a) a sun disklabel at the start,
	  (b) the image at the end, and (c) with the right offset/size
	  values in the disklabel for the bootloader.

i've done this and it isn't hard.  ignatious souvatzis wrote a program
called mksunbootcd that i've hacked on a bit that does all the above
for you:

	Usage: mksunbootcd [-v] [-c cylsize] cdimage part1 part2...

it rewrites the `cdimage' file, so don't run it multiple times.


(BTW, this is how the sunos4 cdroms work.  the solaris 2 ones put
a UFS filesystem in place, rather than an iso one, and boot directly
from the cdrom, rather than via a special kernel).