Subject: Re: RAID1 Mirror Boot Support
To: Luke Mewburn <lukem@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 10/18/2001 18:02:47
On Thu, Oct 18, 2001 at 12:14:16PM +1000, Luke Mewburn wrote:
> 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'.
It always tries to load from the first partition (wd0a) unless told
otherwise on the command line. Since 1.5.1 the boot loader is able
to load a kernel from a 4.2BSD type partition, or a RAID type
partition (provided it's a raid-1 and the kernel is on the first partition
of this raid).
So you only need /boot in wd0h; the kernel can be on raid0a.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--