Tuesday, 19 July 2011

Repair GRUB

After doing a dist-upgrade to Ubuntu Natty I was left with a machine that simply booted to the grub menu and went no further.

This is how I fixed it.

First, boot up into a live CD and open a shell prompt.

Change to superuser

sudo -i

Issue the following commands;

mkdir ~/tmp
mount /dev/sda1 ~/tmp
mount -o bind /dev ~/tmp/dev
mount -o bind /sys ~/tmp/sys
mount -o bind /proc ~/tmp/proc
chroot ~/tmp bash
grub-install /dev/sda
update-grub

Reboot the system and you should be OK.

No comments: