Red Hat Bugzilla – Bug 466375
grub doesn't correctly install MBR into /dev/mdX software raid array
Last modified: 2009-08-10 04:48:34 EDT
Description of problem:
in every Fedora release I always seen that grub doesn't install correctly the MBR into software raid1 /dev/mdX.
Let's me explain:
for example consider the following simple scenario where installing Fedora:
/dev/sda = first sata HD
/dev/sdb = second sata HD
/dev/sda1 + /dev/sdb1 = /dev/md0 (raid1)
/dev/sda2 + /dev/sdb2 = /dev/md1 (raid1)
/dev/sda3 + /dev/sdb3 = /dev/md2 (raid1)
/dev/md0 mounted as /
/dev/md1 mounted as /var
/dev/md2 used as swap
I make a raid1 for swap also.
let's grub select the boot device automatically (it autoprobe /dev/md0 of course) where install the MBR.
Finish the installation and reboot.
when the synchronization is over, shut down the system, disconnect the /dev/sdb from the sata port, power on the system: the system boot correctly (great!).
cat /proc/mdstat show a degraded array (right, we have just removed one drive from the array)
reconnect the sdb to the sata port, boot the system and re-add the sdb1, sdb2 sdb3 to the corresponding array, wait resync finish, shut down the system and this time remove the sda. poweron, the screen remain black with "GRUB" text into upper left.
To solve this annoying problem I use the following procedure (every time I install a new system with raid1 software)
after the first successful boot, login as root, run the 'grub' command and insert into grub shell:
device (hd0) /dev/sda
device (hd1) /dev/sdb
after installing grub into /dev/sda and /dev/sdb, you can boot the system even if the /dev/sda (first drive) completely crash.
I don't know how anaconda install grub into a RAID1 arrays, but surely doesn't install it very well, because from a default installed Fedora, if the first HD crash, the system become unboottable.
Version-Release number of selected component (if applicable):
Last test made when installing Fedora 9: grub-0.97-33.fc9
install fedora into raid1 software and remove the first hd, the system doesn't boot any more.
Steps to Reproduce:
1. install fedora into a software raid1 array
2. install grub using default proposed options
3. wait finish arrays resync, shut down and remove the first hard disk (tipically /dev/sda)
the system doesn't boot
boot the system from the second HD (of course the bios must be configured to try others HD before hangup the boot process)
Should be great if this problem will be addressed before the upcoming Fedora 10.
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.
More information and reason for this action is here:
This has been fixed in rawhide for a couple of anaconda release now, closing.