Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I updated my BIOS while in Windows. After that the machine won't boot. Gives me grub-rescue> prompt.

Tried boot-repair and Advanced Options but it did not work. The only thing that worked was MBR Option.

My Windows is on sdb2 and Ubuntu on sdb3. I have an sda disk as well. I restored MBR of sdb. My grub was originally set to Windows as a default OS. That's where it now goes, no matter whether sda or sdb MBR is restored.

grub.cfg shows 30 seconds time delay; but the grub menu never displays. So the only way I can get into Ubuntu is by booting to Live CD and choosing to boot an existing Ubuntu installation.

My boot config is posted at here.

Will appreciate your help in restoring grub menu if possible.

share|improve this question
    
Are you telling BIOS to boot from the first disk or the second disk? I don't understand whether you are seeing grub-rescue> or if it is booting Windows. Which is it, or are you doing somthing from the prompt to get into Windows? –  John S Gruber Sep 30 '12 at 18:37
    
If you are seeing a grub-rescue> command please enter the ls command and add the output to your question. –  John S Gruber Sep 30 '12 at 19:02
add comment

1 Answer 1

Diagnosis

The bootinfo script isn't reporting some important details, maybe because you have installed syslinux MBR's rather than grub ones. If you are getting grub-rescue that may not be an operational problem, but it hinders diagnosing this problem.

In particular, under these circumstances, it would be handy to get grub to tell us the root and prefix settings it is using with the set command and to learn grub's view of which drive is which by using ls from the grub-rescue prompt and seeing which hard disk it describes. (Since you are eventually booting Windows, and Windows is on disk 2, that may be a signal that the way you are booting is telling grub that your disk 2 is hd0.) In any case I think there is a mismatch between the prefix and grub's understanding of which drive is which.

I've also had trouble with putting grub on drive b--it's a bit tricky.

I believe that seeing the grub-rescue prompt is a sign that the MBR is loading the next sector of grub, and that sector is loading the grub core.img.

The next, and failing, step would be to load the menu, environment, and modules from the directory described by the prefix setting. If the prefix is wrong, or if what grub thinks is hd0 and hd1 doesn't match grub's assumptions when assigning the prefix I believe you will get the problem you are seeing. With my BIOS whatever disk I boot from becomes my grub hd0. Perhaps upgrading your BIOS affected this one way or the other.

Repair

The repair, however, would be to boot your Ubuntu using the live CD, and, while running your Ubuntu system, reinstall grub, installing it to the drive you want to use for booting. Be careful about where grub installs its working directory (usually /boot/grub). Before booting run the bootinfoscript to print out the prefix and other information in case there is still a mismatch between drive order and the prefix. There can be a device.map file that can either help or cause problems.

Once you get past this point grub now uses UUID's to find partitions, so which drive is which is no longer relevant.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.