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 18:59:28
Hubert Feyrer <hubert@feyrer.de> writes:

> Can you please explain that '64' to me?
> As far as I understand, I need to find the block that /boot from
> raid0a is placed at, relative to the start of the physical
> disk. fsdb(8) told me the file is in blocks 1560 and up relative to
> raid0a, so I cannot imagine how this fits together so that the first
> stage bootloader that I'd like to put onto sd0a finds it at block #64?
> Or is my picture plain wrong?

I think you are correct about these blocks being relative to the start
of the physical disk.  See
src/sys/arch/sparc/stand/bootxx/bootxx.c:loadboot().

So bootxx does not have any RAID-1 support; you should take the
addresses from fsdb, multiply by 2 to get sectors, and then add 64
(because the filesystem in raid0a starts 64 sectors after the start of
the sd0[ac] partition).

So I think you need to use 64 + 2*fsdb, and then install into sd0a.
What it takes to get the prom to load bootxx from sd0a I don't know.

You might try a tiny sd0a with just /boot and then in sd0d put the
RAID.  From reading src/sys/arch/sparc/stand/boot/boot.c I can't see
how the 2nd-stage boot skips over the raid header.  It seems to be
only in ofwboot, but boot calls fdloadfile that I can't find.

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