For some reason on upgrading my kernel on a Fedora 11 install just now, I found on reboot that my grub install was no longer working.
I think possibly the offending laptop went into standby instead of a proper reboot (not my fault of course!)
Anyways a bit of research and use of a linux boot disk and I was able to restore grub.
- I had to boot from the Fedora 11 install DVD I originally installed with.
- I then went into rescue mode rather than going through with an install
- I asked the rescue mode to search for my local Fedora installs and mount them under /mnt/sysimage
- Using fdisk and blkid /dev/sdaX I figured out which was my boot partition .. sda5 in this case
- I then mounted proc and dev and boot under /mnt/sysimage
- Then I changed root into /mnt/sysimage
- I ran grub, pointed it at the boot partition from my hard drive (the find part didn’t work for me, might for you, but I carried on regardless)
- and ran setup to correct the broken grub boot stages
After a reboot, everything was hunky dory ( except I needed to update my proprietory graphics drivers still for the new kernel but that’s not the point )
# mount -t proc none /mnt/sysimage/proc
# mount -o bind /dev /mnt/sysimage/dev
# mount -t ext3 /dev/sd5 /mnt/sysimage/boot
# chroot /mnt/root /bin/bash
# grub
grub> find /boot/grub/stage1
grub> root (hd0,4)
grub> setup (hd0)
grub> quit
# exit
# exit
My boot partition was on sda5, but in grub speak that is hd0,4 as it counts from zero. hd0 just represents the boot drive and should be used verbatim.
And now for some light relief as grub is maintained by GNU and GNU need lots of attention and Stephen Fry is probably a better face for GNU than that weird horned thing…
Check out this highly informative video
References:
http://ubuntuforums.org/showthread.php?t=224351
http://stallman.org/fry/