Subject: Experimental olume header utility and boot loader
To: None <port-sgimips@netbsd.org>
From: Michael L. Hitch <mhitch@lightning.msu.montana.edu>
List: port-sgimips
Date: 10/17/2001 21:08:50
As Hubert alluded to, I wrote a little volume header utility program.  [I
had overwritten the one originally on my disk and needed to get a valid
volume header to install NetBSD, and later to hold a boot loader.]  It
can be used to initialize a minimal volume header - enough for the PROM to
recognize and access, and to get allow partitioning.  It also will read
and write the volume header files (I first used it to read sash from the
IRIX disk and write it to the NetBSD disk), including a NetBSD boot
loader.

I also took the pmax boot loader and mashed it into working with the ARCS
PROM to the point where it will load and start a NetBSD kernel.

I've made these available if anyone wants to play with them.  The file
ftp://ftp.netbsd.org/pub/NetBSD/arch/sgimips/sgimips.tgz contains the
stand directory tree to be untarred into sys/arch/sgimips.  The volume
header utility is in stand/sgivol; the Makefile hasn't been NetBSDified
yet.  The boot loader is in stand/boot and is built by running make in
stand.  The resulting file, boot, can theb be written to the volume header
using sgivol.  Using that file instead of sash, NetBSD can be booted
directly from a NetBSD ffs partition.

This has only been tested on Challenge S (or equivalent), and may need
some tweaking on other machines.

Example usage:

o Creating initial volume header:
	sgivol -i sd1
  This creates a volume header on sd1, and makes a 3135 block header (3135
  is just from the size of the volumen header on the IRIX disk I have) and
  the rest of the disk as the 'a' partition.  The size just needs to be
  large enough to hold the volume header and any files in the volume
  header.

o Displaying the volume header:
	sgivol sd1
  Just dumps out some information about the volume header, including any
  files in the directory and the partition data.

o Write the boot program to the volume header:
	sgivol -w boot <path-to-boot-loader> sd1
  This will take the boot loader specified by the path and write it to the
  volume header with the name 'boot'.

o Read a file from the volume header:
	sgivol -r sash /tmp/original.sash sd1
  Reads the file sash (SGI stand-alone shell) and writes it to the file
  /tmp/original.sash.

--
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA