Saturday, May 8, 2004

Some tips to (re)install grub on an HP ProLiant server

HP Logo Yesterday I needed to fix the MBR of a ProLiant (Red Hat Enterprise
Linux 2.1) by reinstalling grub and grub-install just won't work.
grub-install assumes that the boot device is in the form /dev/hda or
/dev/sda and since most ProLiant use a SmartArray RAID controller its
boot device is typically /dev/cciss/c0d0.

So, in order to recover this is what I did:

* In /etc/grub.conf (a link to /boot/grub/grub.conf) uncomment the
line that looks like this:


boot=/dev/cciss/c0d0


* Make sure /boot/grub/device.map is setup right and looks like this:


(fd0) /dev/fd0
(hd0) /dev/cciss/c0d0


* Run grub like this:


/sbin/grub --batch --device-map=/boot/grub/device.map
--config-file=/boot/grub/grub.conf --no-floppy
grub> root (hd0,0)
grub> setup (hd0)
grub> quit


Hope that helps!