GRUB & RAID have me Stumped

Bill McGonigle bill at bfccomputing.com
Thu Jun 22 15:27:01 EDT 2006


Some notes I have on this:

On Jun 16, 2006, at 17:22, Ben Scott wrote:

>  Hmmm.  Okay, you might try doing it again, but *without* the "device
> (hd0) /dev/md0" line.  That will leave "(hd0)" at the default, which I
> gather would be "/dev/sda" on this system.  GRUB will install itself
> into the MBR, which is fine, since the MBR isn't mirrored.

I have in my notes from last time:

   device (hd0) /dev/hda
   root (hd0,0)
   setup (hd0)

You do also want to install the MBR on subsequent disks in a RAID 
mirror in case you lose the one with Grub.

>  Now, I'm not sure if GRUB also needs to write inside the boot
> partition.  I don't think it goes.  But if it does, the above won't
> work.  But neither would anything else, and I know GRUB works with
> RAID.  So I'm pretty sure it doesn't need to write to the partition.

Right, it's just read-only.  The theory of operation seems to be:

   Load the MBR from a raw disk.  	
   Boot /boot from raw disk (read-only, will be part of raid mirror 
later) to get the initrd.
   Load the md.o module
   Pivotroot to / on a md device
   Remount your /boot md device as read-write

I have as a grub entry on my home machine:

   default=0
   timeout=10
   splashimage=(hd0,0)/grub/splash.xpm.gz
   title Fedora Core (2.6.16-1.2115_FC4)
           root (hd0,0)
           kernel /vmlinuz-2.6.16-1.2115_FC4 ro root=/dev/md1 
hdc=ide-scsi acpi=off vga=795
           initrd /initrd-2.6.16-1.2115_FC4.img

/vmlinuz and /initrd are relative to /boot of course since that's / at 
boot time.

If you have RAID-5 you need to have a RAID-1 boot partition on those 
disks because you can't do the raw-disk part above on RAID-5.  I don't 
use RAID-5 much.

I know grub confuses me, and if it even challenges Ben the design has 
to be broken.

-Bill

-----
Bill McGonigle, Owner           Work: 603.448.4440
BFC Computing, LLC              Home: 603.448.1668
bill at bfccomputing.com           Cell: 603.252.2606
http://www.bfccomputing.com/    Page: 603.442.1833
Blog: http://blog.bfccomputing.com/
VCard: http://bfccomputing.com/vcard/bill.vcf




More information about the gnhlug-discuss mailing list