Subject: Re: RAID1 Mirror Boot Support
To: Lalor, Chris <LalorC@mtvi.com>
From: Luke Mewburn <lukem@netbsd.org>
List: port-i386
Date: 10/18/2001 12:14:16
On Wed, Oct 17, 2001 at 06:45:13PM -0400, Lalor, Chris wrote:
> As per Luke's changes committed 20001030, the -current bootblocks have
> support for booting off of a RAID1 mirror. The commit also mentions that
> installboot(8) does not yet have support for installing bootblocks to
> such a mirror. Has this support been added (as I see no such
> announcements) or is there a way to get around this and install the
> bootblock in some other manor?
installboot(8) hasn't been hacked to install the first stage booter
on the underlying physical component and the second stage boot
(/boot) on the raidXa device; I took a look at this and solving
this is non trivial and ugly.
My workaround was to create a small 4.2BSD partition near the physical
start of the disk on the underlying device (e.g, `wd0h', starting at
offset 63), installboot to wd0h, have the kernel on raid0a (disklabel
type `4.2BSD') which is composed of wd0a/wd1a (disklabel type `RAID'),
and use raid autoconfig. The boot sequence is:
- The MBR bootblock in MBR executes the bootblock in
NetBSD 0xA9 partition
- The first stage NetBSD bootblock then loads /boot from
hard-coded sectors (which happen to be physically located
in wd0h)
- /boot - the second stage bootblock - searchs for the kernel
off the boot device and loads it. I can't recall if I
had to put a kernel in wd0h or if /boot assumes the kernel
is on the first partition of the boot device and therefore
uses wd0a; it's been nearly 12 months since I used this
setup (I now use hardware raid cards). `Suck it and see'.
- The kernel fires up, finds the disks, autoconfigures the
raid devices, and sets the root device to raid0a.
fstab has / on /dev/raid0a, etc. Things work from there.
Luke.
PS: I think I sent a message to current-users or port-i386 about this
a while ago; check the email ;-)