Setup grub with RAID1 root.

From: Dylan Griffiths <dylang_at_no.spam.please>
Date: Thu Jun 29 2006 - 14:54:13 CST

        Ubuntu did this automagically for me (very nice of it), but I recently
had to setup a CentOS machine with this, and it didn't work so well. I
found a nice guide that went over exactly the kind words you need to
speak to Grub to get it to play nicely with root RAID1 (/dev/md0 in my
case), and how to set it up to fail over to alternate drives if there is
an issue:
http://www.linuxsa.org.au/mailing-list/2003-07/1270.html

The meat is this step (#6):
# grub
grub> root (hd0,0)
  Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)
  Checking if "/boot/grub/stage1" exists... yes
  Checking if "/boot/grub/stage2" exists... yes
  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are
embedded.
succeeded
  Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p
(hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.

grub> root (hd1,0)
  Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
  Checking if "/boot/grub/stage1" exists... yes
  Checking if "/boot/grub/stage2" exists... yes
  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
  Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 16 sectors are
embedded.
succeeded
  Running "install /boot/grub/stage1 (hd1) (hd1)1+16 p
(hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.

grub> quit

Which I found very instructive (being a Slackware guy, I'm used to lilo,
a decidedly 1996 bootloader, which doesn't have the same fancy
configuration interface).
Received on Thu Jun 29 14:54:40 2006

This archive was generated by hypermail 2.1.8 : Fri Sep 08 2006 - 23:26:38 CST