I installed CentOS 5.9 x64 on a fresh server with hardware RAID level 5.

In my ignorance, I told it not to install Grub. The next reboot, I got a blinking cursor. So, I went back to the installer and without reinstalling everything got it to put Grub on /dev/cciss/c0d0. Now, whenever it boots, I get a grub> (0.9.7, I guess not Grub2) prompt.

When I do this:

root (hd0,0)
setup (hd0,0)  (or "setup (hd0)")

Everything is done successfully, but the next boot brings me to the same place again. So I went to follow these directions, but when I get to less menu.lst it tells me that it doesn't exist. Doing ls shows me neither menu.lst nor grub.conf in /boot/grub after chroot /mnt/sysimage.

Do I have to manually create grub.conf, or is there a better/more automated way that I'm less likely to botch, to get past this step?

UPDATE: I just tried creating grub.conf myself using vi. Then I did grub-install again, at which point I noticed that hd0 is my USB stick (from which I'm booting into the installer with linux rescue to do this) and hd1 is the RAID. I guess that remains true even when I reboot without the USB stick. So maybe I should have done root (hd1,0) etc.? No, when I try that, it boots to an error Selected disk does not exist. But, at this point it gives me a handy grub.conf editor. So I try (hd0,0) and boot, and it finds the ext filesystem there okay, but now says File not found. I've tried the following lines and all yield File not found:

kernel /boot/vmlinuz-2.6.18-384.el5 root=/dev/cciss/c0d0
kernel /boot/grub/vmlinuz-2.6.18-384.el5 root=/dev/cciss/c0d0
kernel /grub/vmlinuz-2.6.18-384.el5 root=/dev/cciss/c0d0
kernel /dev/cciss/c0d0/vmlinuz-2.6.18-384.el5 root=/dev/cciss/c0d0

This one finally got it to boot, but then it gave me a kernel panic after it failed to mount /sys and then tried to unmount the old /sys:


title CentOS 5.9
  root (hd0,0)
  kernel /vmlinuz-2.6.18-384.el5 ro root=/dev/cciss/c0d0
  initrd /initrd-2.6.18-384.el5.img

So I booted the stick again without doing linux rescue, and chose "Upgrade an existing installation", and to reinstall Grub. At first the option in /dev/sda for where to install it, but I tell it I want to modify/advanced. The next screen lets me choose between /dev/sda and /dev/cciss/c0d0p1. If I modify the boot order first to put the RAID array first (instead of matching how it currently is in the BIOS in order to boot to the stick), my choices become /dev/cciss/c0d0p1 and /dev/cciss/c0d0. If I pick the latter, it says something went wrong installing packages, and no kernel image was loaded, and rebooting gets me back to my custom grub.conf fail (where if I modify it I can get it to kernel panic.) If I don't modify the boot order and pick /dev/cciss/c0d0, same thing.

1 Answer 1


You also need to, in rescue mode, edit /boot/grub/device.map and change the map to reflect what will be true when you boot without the USB key. I.e., delete the /dev/sda line, and change the /cciss line to be called hd0. Save that then grub-install /dev/cciss/c0d0 and reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .