[CentOS] Failed boot drive

Thu May 22 14:51:56 UTC 2008
Hakan Koseoglu <hakan.koseoglu at gmail.com>

On Thu, May 22, 2008 at 3:42 PM, Dean Maluski <dmaluski at n1ety.com> wrote:
> Unclear on how to recover from failed boot drive?
> SDA has failed but I'm still able to boot.
> I need to replace primary boot drive. Upon initial build I created a
> RAID 1 mirror of /boot dir/partition.
> How do I get system to boot off second or third drive so that I can
> replace /sda?

If you have mirrored /boot, when grub kicks in, go into edit mode and
replace root (hd0,0) with (hd1,0) or so on.

If you want to do this automatically, you should have had fallback
parameter in the menu.lst and two or more copies of the kernel entries
but the change above will let you boot from one of the other drives.

Right now I am converting a system that was incorrectly set up to
software RAID1. Hope it works, the server is in the wrong continent.
:-) If only the sysadmin installed it with RAID1 to start with.

So the grub should look like:

default=0
fallback=1
and then two blocks of the same kernel configuration, one with root
(hd0,0) and one with root (hd1,0).

The rest should be logical volumes or /dev/md references so the kernel
will pick up the right one, hopefully.
-- 
Hakan (m1fcj)