Support
Center
 CentOS RAID-1 - Second Drive Boot Failure Patch
Solution

RAID1 - First Drive Failure, Second Drive will NOT Boot

Introduction

This article addresses an issue with the bootloader configuration on CentOS RAID-1 installations. The bootloader (GRUB) installed to the second drive was configured to read its configuration from the first drive. If the first drive should fail or be removed, the bootloader was unable to read its configuration leaving the system in an unusable and un-bootable state. All data was mirrored and RAIDed properly, only the bootloader was affected.
This issue is endemic to all CentOS, Fedora, and Red Hat-installed software raids. The Anaconda installer is where the core of the problem lies. There is a quick fix listed below that will take care of the issue with no server downtime, and can be performed remotely using an SSH or other terminal connection.
All systems purchased from Rhino as of January 2010 and later do not require this patch and will boot as expected in the event of a primary drive failure.


Resolution
The BOLD text represents commands/text that you type.

[Command Prompt]# grub

GNU GRUB version 0.95 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]

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)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 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)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done.

grub> quit

Prevention Tips

If you are using a kickstart to configure and install a system with a RAID-1 configuration, you should add the following block to the %post section. Alternatively, you can run the above commands by hand.
grub --batch <<EOT 1>/dev/null 2>/dev/null
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)
quit
EOT


Applies To

All Rhino systems with RAID1 purchased prior to January 2010, all CentOS/Fedora/Red Hat RAID1 kickstart installs, and all CentOS/Fedora/Red Hat RAID1 "interactive mode" installs.

Keywords

centos,raid,raid1,grub,bootloader,drive,failure,fedora,red hat,kickstart



 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options