Subject: mirrored root w/ raidframe - howto install bootblock?
To: None <port-sparc@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: port-sparc
Date: 05/14/2006 01:37:18
I'm trying to follow the NetBSD Guide in installing a 3.0/sparc system 
with two identical harddisks to have them mirrored with RAIDframe.
I've setup the system, and the second disk has a RAID partition with a 
root filesystem, swap/dump are also configured.

The next step at 
http://www.netbsd.org/guide/en/chap-rf.html#chap-rf-moving-files is to 
install boot blocks, and this is where I'm having problems. The 
disklabels look like this:

 	# disklabel sd0
 	#        size    offset     fstype [fsize bsize cpg/sgs]
 	 a:  17781520         0       RAID                     # (Cyl.      0 -  11509*)
 	 b:   1049026  16732350       swap                     # (Cyl.  10830 -  11508*)
 	 c:  17781520         0     unused      0     0        # (Cyl.      0 -  11509*)

 	# disklabel raid0
 	#        size    offset     fstype [fsize bsize cpg/sgs]
 	 a:  16732159         0     4.2BSD   1024  8192 46480  # (Cyl.      0 -  16339*)
 	 b:   1049216  16732160       swap                     # (Cyl.  16340 -  17364*)
 	 c:  17781376         0     unused      0     0        # (Cyl.      0 -  17364*)

Looking at the sparc installboot(8) manpage, it suggests the following 
command to install boot blocks:

 	installboot /dev/rsd0c /usr/mdec/bootxx /boot

and following the Guide, I use rsd0a instead of rsd0c. But this gives:

 	# installboot -v /dev/rsd0a /usr/mdec/bootxx /boot
 	File system:         /dev/rsd0a
 	File system type:    raw (blocksize 8192, needswap 0)
 	Primary bootstrap:   /usr/mdec/bootxx
 	Secondary bootstrap: /boot
 	installboot: Need `-B bno' for raw file systems
 	installboot: Set bootstrap operation failed

I guess that installboot can't find /boot inside the RAID volume on sd0a,
but how do I figure out the block number of that file for -B?

Or am I missing something fundamentally, and mirrored root filesystem 
can't be done on sparc?

Thanks!


  - Hubert

P.S.: Please CC: me on replies