Replacing Failed Raid Drive and Grub Install
Scenario / Question:
First drive /dev/sda or /dev/hda failed in a RAID 1 configuration and now system will not boot.
System booting but only getting a prompt that shows grub and a flashing cursor.
Prevent system from crashing on reboot if first drive in RAID Array fails.
Solution / Answer:
Use Linux Rescue mode from the install DVD/CD and manually configure Grub.
Boot into Rescue Mode:
Insert Distro CD/DVD and select Rescue mode
Enter Grub Command Line:
# grub grub>
Locate grub setup files:
grub> find /grub/stage1
On a RAID 1 with two drives present you should expect to get
(hd0,0) (hd1,0)
On a RAID 1 with a single drive present you should get
(hd0,0) or (hd1,0)
depending on which drive has failed. (hd0,0) is your first drive, first partition on first drive and (hd1,0) is your second drive, first partition on the second drive.
Install Grub on Master Boot Record (MBR):
grub> device (hd0) /dev/sdb (or /dev/hdb for IDE drives) grub> root (hd0,0) grub> setup (hd0)
We made the second drive /dev/sdb device (hd0) because putting grub on it this way puts a bootable mbr on the 2nd drive and when the first drive is missing the second drive will boot. Note if you already physically removed the drive or the drive doesnt show in the BIOS. Then “grub> device (hd0) /dev/sdb” should be “grub> device (hd0) /dev/sda”
This will insure that if the first drive in the Raid Array fails or has already failed that you can boot to the Operating System with the second drive.
Now you can physically remove the failed drive from your system and replace it with a new one.


