Subject: Indy install how-to (or How I Managed It)
To: None <port-sgimips@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: port-sgimips
Date: 10/29/2001 21:05:11
The following is how I built my system to boot on the second drive (SCSI ID 2, as
I have IRIX 6.5 running on SCSI ID 1).  This does not involve using IRIX or anything
other than what is available from NetBSD along with the sgivol program posted to the
list and the ftp site.

After performing the following, I am now running a fully self-supporting (albeit
serial-only console) system free of any IRIX or other dependancies.  I have experienced
no problems whatsoever, except for a buggy serial console that stops accepting 
input.

The following list of instructions is based on my recollection of the process I
used.  Later this week, I'm adding two more 4.5gb drives to my Indy and I'll be
refining the instructions, reposting more detail, and providing access to more
current snapshots to allow installation without having to rebuild the latest
sources in the second step.  Additionally, I'll be creating a bootable CD image
next weekend (hopefully) to make all this much easier.

My hearty congratulations and appreciation to all those who have brought the sgimips
port to this point and for their further efforts.

Regards,
-scott

Note: I highly recommend running multi-user networking on the booted DHCP/NFS root
      as I've had problems with the serial console being dropped--you won't be able
      to recover the console without somehow resetting the serial line.

o	Set the following environment in the Indy System Maintenance
	Menu (option 5):
	-	Your desired IP address
		netaddr=1.2.3.4
o	Set up and boot the Indy via DHCP and NFS using the kernel and snapshots
	at ftp://ftp.netbsd.org/pub/NetBSD/arch/sgimips/snapshot/20011002
	I perform a full root install on the NFS host to allow multi-user and I
	CVS'd and built the full sources prior to proceeding.  This will be necessary
	again after performing the disklabel mods below to ensure that the kernel
	and disklabel program (and other stuff) operate properly with the mods.
	See http://www.netbsd.org/Ports/sgimips/faq.html for netbooting how-to.
o	Compile a kernel with the new disklabel mods
	See: http://mail-index.netbsd.org/port-sgimips/2001/09/23/0002.html
o	build sgivol and the boot image
o	boot the new kernel via dhcp and nfsroot
o	run: sgivol -i sdN
	see: http://mail-index.netbsd.org/port-sgimips/2001/10/17/0003.html
o	run: sgivol -w boot <bootimage> sdN
o	create the desired disklabel with: disklabel -i sdN
	-	Ensure that partition c is the whole disk
	-	Ensure that partition i is the first three cylinders
		(sgivol likes to make mine 3135 sectors in size)
	-	Ensure that partition k is the whole disk
	-	Ensure that partition a is the root partition, starting at
		the sector after partition i.
	-	Ensure that partition d I keep the same as partition k for
		possible compatibility reasons (may not be necessary)
o	newfs the new NetBSD partitions
o	Load 'em up.  I set up separate root, /var, /tmp and /usr partitions
	(see below) and transferred my running NFS root as follows:
	# mkdir /nroot
	# newfs /dev/rsd1a; newfs /dev/rsd1e; newfs /dev/rsd1f; newfs /dev/rsd1g
	# mount /dev/sd1a /nroot; mkdir /nroot/usr /nroot/var /nroot/tmp
	# mount /dev/sd1e /nroot/tmp; mount /dev/sd1f /nroot/var; mount /dev/sd1g /nroot/usr
	# mount <NFSROOTIP>:/<NFSROOTPATH> /mnt
	# cd /mnt; find . -depth -print | cpio -pdmv /nroot
	This all set up my partitions, mounted the structures under /nroot, remounted
	root as /mnt (to avoid an accidental loop into the mounted /nroot) and cpio'd
	the whole NFS root filesystem onto /nroot, populating /var and /usr properly.
o	halt
o	set up the following environment settings in the Indy System Maintenance 
	Menu (option 5) using setenv, i.e. setenv OSLoader boot
	-	SystemPartition=scsi(0)disk(2)rdisk(0)partition(8)	(drive 2, partition h)
	-	OSLoadPartition=scsi(0)disk(2)rdisk(0)partition(0)	(drive 2, partition a)
	-	OSLoader=boot		(the boot program installed by sgivol)
	-	OSLoadFilename=/netbsd	(the kernel to load)
	-	AutoLoad=Yes		(Supposed to effect an autoboot into multi)
	-	TimeZone=CST6CDT	(I'm Central timezone)
	-	console=s		(set s for serial)
	
My disklabel, ST34573 4.5gb Seagate:

type: SCSI
disk: ST34573N
label: fictitious
flags:
bytes/sector: 512
sectors/track: 237
tracks/cylinder: 5
sectors/cylinder: 1185
cylinders: 7501
total sectors: 8888924
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:    262305      3135     4.2BSD   1024  8192    16   # (Cyl.    2*- 223)
 b:    524955    265440     4.2BSD   1024  8192    16   # (Cyl.  224 - 666)
 c:   8888924         0     4.2BSD   1024  8192    16   # (Cyl.    0 - 7501*)
 d:      3135         0     4.2BSD   1024  8192    16   # (Cyl.    0 - 2*)
 e:    263070    790395     4.2BSD   1024  8192    16   # (Cyl.  667 - 888)
 f:    263070   1053465     4.2BSD   1024  8192    16   # (Cyl.  889 - 1110)
 g:   7572389   1316535     4.2BSD   1024  8192    16   # (Cyl. 1111 - 7501*)
 i:      3151         0     4.2BSD   1024  8192    16   # (Cyl.    0 - 2*)
 k:   8888924         0    unknown                      # (Cyl.    0 - 7501*)


Partition assignments:
	a		root
	b		swap
	c		full disk
	d		SGI boot partition
	e		/tmp
	f		/var
	g		/usr
	i		Duplicate SGI boot partition entry, for sanity
	k		SGI's idea of the whole disk -- probably unnecessary


The sgivol output after the last disklabel(1) editing:

# ./sgivol sd1
disklabel shows 8888924 sectors
checksum: 00000000
root part: 0
swap part: 1
bootfile: 

Volume header files:
boot     offset    2 blocks, length   255199 bytes (499 blocks)

SGI partitions:
 0:a blocks   262305 first     3135 type  4 (BSD4.2)
 1:b blocks   524955 first   265440 type  3 (Raw)
 2:c blocks  8888924 first        0 type  4 (BSD4.2)
 3:d blocks     3135 first        0 type  4 (BSD4.2)
 4:e blocks   263070 first   790395 type  4 (BSD4.2)
 5:f blocks   263070 first  1053465 type  4 (BSD4.2)
 6:g blocks  7572389 first  1316535 type  4 (BSD4.2)
 8:i blocks     3151 first        0 type  0 (Volume Header)
10:k blocks  8888924 first        0 type  6 (Volume)