Subject: Re: mirrored root w/ raidframe - howto install bootblock?
To: Hubert Feyrer <hubert@feyrer.de>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-sparc
Date: 05/14/2006 10:57:46
I have not tried this myself.  I think the challenge is to get bootxx
put in sectors 2-15 (I think, but I'm not usre) of the disk (and hence
d0c/sd0a, and later also in sd1 of course).  My handy running sparc
system is 1.6.2, so I may be off, but I believe bootxx has to have
poked into it the block numbers of /boot, since it lacks ffs traversal
code like the i386 bootblocks.  This matches your error output about
-B.

I think what's needed is to augment installboot to understand raid1,
or easier to be able to give it two fs arguments, one for the place to
put bootxx and the other to look for block #s of /boot.

Finding the block numbers of /boot isn't hard, though, as long as they
end up contiguous.  In my case they aren't, so I don't know how -B
would work.

Two methods follow: use installboot -v installing into sectors 2-15 of
raid (which won't lead to a bootable system), and using fsdb.
There's some perhaps confusion between ffs blocks, frags and sectors.

I don't understand what the PROM does - it seems like it must read
bootxx and run it, which will then notice type RAID and += 64 to find
the root.


root 2 /usr/mdec #> installboot -nv /dev/rsd0a bootxx /boot
File system:         /dev/rsd0a
File system type:    ffs (blocksize 8192, needswap 0)
Primary bootstrap:   bootxx
Secondary bootstrap: /boot
Bootstrap start sector: 1
Bootstrap byte count:   6724
Bootstrap block table:  118 entries of 8192 bytes available, 8 used: 14560 14576 14592 14608 14624 14640 14656 546
Not writing bootstrap



gdt 8 /usr/mdec > fsdb -f /dev/rsd0a
** /dev/rsd0a (NO WRITE)
Editing file system `/dev/rsd0a'
Last Mounted on /
current inode: directory
I=2 MODE=40755 SIZE=1024
        MTIME=Mar  8 10:54:04 2005 [140881000 nsec]
        CTIME=Mar  8 10:54:04 2005 [140881000 nsec]
        ATIME=May 14 03:18:39 2006 [338970000 nsec]
OWNER=root GRP=wheel LINKCNT=27 FLAGS=0x0 BLKCNT=0x2 GEN=0x0
fsdb (inum: 2)> lookup boot
component `boot': current inode: regular file
I=12 MODE=100644 SIZE=62008
        MTIME=Dec  6 18:09:07 2000 [220000000 nsec]
        CTIME=Dec 16 15:02:04 2000 [943304000 nsec]
        ATIME=Aug 22 14:13:15 1998 [280000000 nsec]
OWNER=root GRP=wheel LINKCNT=1 FLAGS=0x0 BLKCNT=0x7a GEN=0x1
fsdb (inum: 12)> blocks
fsdb: unknown command `blocks'
fsdb: rval was 1
fsdb (inum: 12)> 
fsdb (inum: 12)> blks
I=12 8 blocks
Direct blocks:
0: 7280 7288 7296 7304 7312 7320 7328 273 

-- 
        Greg Troxel <gdt@ir.bbn.com>