Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: grub and RAIDframe?



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 kula%tproa.net@localhost and
jakllsch%kollasch.net@localhost, and some stuff from the internet kula@ dug
up.


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
pkgsrc.

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:

==[menu.lst]==
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=65536 noapic nosmp
  module (hd0,a)/netbsd-XEN3_DOM0 console=tty0

title Xen (wd1)
  root (hd1,0)
  kernel (hd1,a)/usr/pkg/xen3-kernel/xen.gz dom0_mem=65536 noapic nosmp
  module (hd1,a)/netbsd-XEN3_DOM0 console=tty0
==[end]==

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)
quit


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
work.
  --david



1. http://www.netbsd.org/guide/en/chap-rf.html
2. http://wiki.netbsd.se/index.php/How_to_set_up_a_guest_OS_using_xen3

Attachment: pgpMsZcMnnZmi.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index