[CentOS] Re: Stuck at GRUB

Thu Nov 29 20:15:38 UTC 2007
Scott Silva <ssilva at sgvwater.com>

on 11/29/2007 7:53 AM Les Mikesell spake the following:
> Christopher Chan wrote:
> 
>>> Is there a way to know where grub is installed?  I have a few servers 
>>> running in RAID 1 software for /boot, I gotta fix this.  If I can't 
>>> tell whether it is installed or not, is it dangerous to re-install it 
>>> using the command above?
> 
> It won't hurt to re-install.  The tricky part is knowing where the 2nd 
> drive in the set will appear when the first fails so you can do the 
> configuration correctly.
> 
This isn't as tricky as you think. It just takes some thought.
PATA disks always will be where they are. They are set by their jumpers for 
master/slave. But since most pata controllers lock when a drive dies, it is 
less than optimal. You can get a little safer by either using only the master 
part of the controller, or have each drives mate on the opposite controller 
and opposite channel, IE pair primary master with secondary slave and so on.
Not for a production system, but will work OK for a home backup system.
Sata usually will move to the next detected drive. IE... sdb will become sda 
 >IF< all drives are on the same controller. If the system has multiple sata 
controllers, it could be a guess, or remove one and see what happens.
SCSI usually also moves to next drive because of the drives ID setting.

One of the safest methods is to create a grub boot cd and boot from that.
That way it won't matter which drives fail unless too many fail to maintain 
parity.

>> So long as you have all the necessary grub files, there is not much 
>> danger. Even if you are missing a config file on this side of the 
>> mirror (impossible...) so long as you load grub stage 2, you will have 
>> the power you need to continue if you have access (eg: via serial)
> 
> Worst case: boot the install cd with 'linux rescue' at the boot prompt,
> let it detect and mount the system partitions, do the chroot it 
> suggests, then 'grub-install /dev/sda' (or wherever the boot drive 
> appears now), exit twice, and remove the CD as you reboot.
> 


-- 
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!