Subject: Re: grub and RAIDframe?
To: Steven M. Bellovin <>
From: david l goodrich <>
List: port-xen
Date: 12/29/2006 21:50:39
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 29, 2006 at 10:03:04PM -0500, Steven M. Bellovin wrote:
> I want to install grub on a RAIDframe-based system.  (I'm preparing the
> RAID set per the instructions in the NetBSD guide.)  Do I need to do
> anything in particular, or do I just point grub-install at both RAIDed
> disks?  I have two particular concerns: the files in /grub, and what
> partition do I refer to in the menu.lst file to get raid0a?

Okay.  This is done with the help of and, and some stuff from the internet kula@ dug

First, don't follow the guide[1] to the letter.  The instructions
for bringing up a mirror are useful, but you should quit sysinst
to get a shell prompt, then use the raidctl binary included with
the install boot to just create the array and then install to
raid0 instead of wd0.   This saves you having to copy the
contents of the drives around once you've installed the OS.

Don't forget to run `raidctl -A root raid0`.  Do this BEFORE you
reboot.  This caused me all manner of pain.

Once you've booted NetBSD from the raid array, install grub from

Don't run grub-install.  Make /grub and
copy the contents of  /usr/pkg/lib/grub/i386-/ to /grub.

Create /grub/menu.lst.  Mine looks like this:

default 1
timeout 3

title NetBSD (wd0)
  root (hd0,0)
  chainloader +1

title Xen (wd0)
  root (hd0,0)
  kernel (hd0,a)/usr/pkg/xen3-kernel/xen.gz dom0_mem=3D65536 noapic nosmp
  module (hd0,a)/netbsd-XEN3_DOM0 console=3Dtty0

title Xen (wd1)
  root (hd1,0)
  kernel (hd1,a)/usr/pkg/xen3-kernel/xen.gz dom0_mem=3D65536 noapic nosmp
  module (hd1,a)/netbsd-XEN3_DOM0 console=3Dtty0

The "NetBSD Wiki" entry about xen[2] was helpful.  The point is,
you want one entry for wd0 and one for wd1.

You'll also want to follow the netbsd's guide setup for putting
entries for raid0a into the disklabel for wd0 and wd1.  For my
setup, i made wd[01]f the RAID partition, and added wd[01]a to
indicate which blocks were raid0a.

That done, run `grub`.

within grub, run these commands:
root (hd0,a)
setup (hd0)
root (hd1,a)
setup (hd1)

If raid0a isn't mapped to wd{0,1}a, substitute the apropriate
letter above.

and that should be sufficient.  Reboot.

of course, this is a rough guide, drawn up from memory.  i think
this worked for me.  there's no warranty or guarantee this will


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.6 (NetBSD)