Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I think I have messed this one up royally...

I have done a clean install of centOS 5.6 (x86_64) on my system. I got through the installation process successfully and rebooted. Now I am greeted with a blinking cursor on a black screen. No grub, no menu, no nothing (the system does POST).

I did wipe the hard drive completely before doing the install. I am wondering if I wiped the MBR too, but I thought the centOS install would fix that. I am able to use bootable media with no issues. I have a copy of RIP Linux on a bootable USB so I am able to access the CentOS install files.

At this point Im not sure where to go from here. What should my next step be to troubleshoot this? How would I do a fix or even a check on the MBR?

share|improve this question
Do you have more than 1 HDD? – Tog Jun 10 '11 at 18:12
nope... just the one hdd... it is on a laptop. The centOS install created a boot partition and put the rest of the drive in a logical volume. – Hari Seldon Jun 10 '11 at 18:41
up vote 2 down vote accepted
  1. Boot from your LiveUSB. Note that you may need one from CentOS to make sure your GRUB versions match.
  2. Become superuser if necessary by running su or prefixing the following commands with sudo.
  3. Run blkid and figure out your primary hard drive's device (most likely /dev/sda), boot partition (something like /dev/sda1) and root directory partition (something like /dev/sda2).
  4. Create a mount point directory for and mount your root partition: mkdir /mnt/myroot && mount /dev/sda2 /mnt/myroot
  5. Mount your boot partition where it belongs in your root partition: mount /dev/sda1 /mnt/myroot/boot
  6. Reinstall GRUB using the hard drive's device (without the partition number) and root directory, as follows: grub-install --root-directory=/mnt/myroot /dev/sda
share|improve this answer
Thank You, it worked for me. CentOS installed a boot partition into the first partition, but grub had to be installed to the second partition containing the actual OS for it to work. I was going nuts trying to figure out why grub installed into the boot partition didnt work. – Hari Seldon Jun 11 '11 at 16:19

If you bootable Linux has the same grub installed as your CentOS install, you could boot into it, and try grub-install /dev/hda1 (or whatever your boot partition is). You could also chroot into the installed system, and try reinstalling grub using YUM. You also might be able to repair from the boot menu from the original CentOS install media.

share|improve this answer
If you chroot, remember to pass /bin/bash as the second argument, and don't forget to mount /proc and /dev/ on your target, and copy over a current /etc/resolv.conf before chrooting. Further details in the Gentoo install instructions. The nice thing about chroot is that you don't have to have the same GRUB on your rescue disk as your real disk. – Mike DeSimone Jun 11 '11 at 4:28

You must log in to answer this question.

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