Subject: Re: [OT] Making bootable disk for diskless SPARC
To: None <kazk@yyy.or.jp, port-mac68k@netbsd.org, port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-mac68k
Date: 02/29/2000 03:09:07
> No, I just wondered if I could create NetBSD/SPARC bootable disk with
> Mac.

I'd say this is almost certainly possible, without even too much pain.

First step: use sunlabel or moral equivalent to label the disk with a
Sun-compatible label (and install the label, a la mbrlabel).  I haven't
updated it for the new sticky label stuff, so it may need a little
ioctl tweaking.

Second step: make the filesystem and populate it.  Since mac68k is the
same endianness as the SPARC, this is very straightforward: newfs the
partition(s) and unpack the set(s).  You don't even need FFS_EI in your
kernel. :-)

Third step: put a kernel and second-stage booter into the filesystem on
the desired boot partition.  Use a tool that doesn't create holes (cp
does fine in my experience); I've had bad experiences with holes in
/boot and/or /netbsd.

Fourth step: go to sys/arch/sparc/stand/installboot/ and build that
program.  You may need to play with -I options to get the right mix of
.h files.  I have never tried to build the sparc installboot on a
mac68k, but I've built the sun3 installboot on a sparc and I wouldn't
expect this to be all that different.

Fifth step: use the resulting installboot binary to install boot blocks
on the disk.  Run it as normal, but be sure to get bootxx off the
/usr/mdec you just unpacked in step 2, not from the mac68k /usr/mdec.

You should then have a sparc-bootable disk.

> Well, seems netboot is the best way.

If practical, it probably is.  What I sketched above is probably how
I'd do it, but that's largely because I have much more experience
playing fast and loose with filesystems and partitions than I do with
diskless booting.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B