GRUB & RAID have me Stumped

Ben Scott dragonhawk at gmail.com
Fri Jun 16 17:23:01 EDT 2006


On 6/16/06, Paul Lussier <p.lussier at comcast.net> wrote:
> >> Ahhhh, so I want to do something like:
> >>
> >>  grub> devive (hd0) /dev/md0
> >>  grub> root (hd0)
> >>  grub> setup (hd0)
> >
> >   I think that is correct.
>
> Except it doesn't work :(

  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.

  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.

  You might also try creating a GRUB boot floppy, booting from the
floppy, and using *that* to install GRUB.  This is the recommended
way, according to some, because it guarantees that GRUB is seeing what
the BIOS sees.  (When running the "GRUB shell" from under an OS, it
has to guess at what the BIOS will see.)

On 6/16/06, Paul Lussier <p.lussier at comcast.net> wrote:
>>> I have set up a 4-way mirror of my OS partions.
>>
>> Four-way?  Are you really, really afraid of data loss or something?  ;-)
>
> No, trying to increase overall system reliability.

  Well, right, it's just one usually sees it done with just two disks.
 But hey, whatever floats your boat.  ;-)

> root       (hd0,0)

  That's definitely the right thing.  I just checked against a working server.

> kernel     /boot/vmlinuz-2.4.32pcore-a.15 root=/dev/md0 ro console=tty0 nosmp noapic

  The "root=/dev/md0" is, I'm pretty sure, also the right thing.  Said
working server is using LVM, too, so it uses
"root=/dev/mainvg/rootlv", but the concept is the same.  You tell the
kernel to use the storage as the kernel sees it.

> And my system did indeed come up (apparently on /dev/md0) but it
> remained read-only ...

  I don't suppose the fix is as simple as "remove the 'ro' from the
kernel boot line"?

  You don't say what version of Debian you're running.  On my Debian
"etch" box, with kernel 2.6.something, I think... lemme check... oh.
No, I've got an "ro", too.

> ... to the point where nothing else was mounted
> because /etc/mtab couldn't be changed?

  I doubt that's the root cause.  If, indeed, the root filesystem is
normally mounted read-only, then the initscripts will take that into
account, and handle (re)mounting as needed to get the system working.

  Can you check to see if the RAID device (/dev/md0) is in a read-only
state?  It may be the device is RO, which would keep the initscripts
from re-mounting the root RW.

> Something's wacky.

  At the least.  :)

> This is a lab system, not production ...

  Ahhh.  Okay.  >phew<  I was worried there for a minute.  :)

-- Ben



More information about the gnhlug-discuss mailing list