Archive

Posts Tagged ‘grub’

How to recover grub in Ubuntu

September 16, 2011 Leave a comment

Sometimes after a kernel upgrade, I don’t know why, the grub is not updated properly and then it is not possible to boot the system. Here it comes the way to solve this problem quite easily.

Use a LiveCD or a Rescue Mode to have access to the hard drive that holds the OS you are not able to boot.

Once logged in, chroot your former system.

$ sudo -i
# mkdir /mnt/chroot
# mount /dev/sda1 /mnt/chroot                <--- replace sda1 for your system partition
# mount -o bind /dev /mnt/chroot/dev
# mount -o bind /sys /mnt/chroot/sys
# mount -o bind /proc /mnt/chroot/proc
# chroot /mnt/chroot
# grub-install --recheck /dev/sda1
# update-grub

Then reboot and cross-fingers.

Categories: Linux Tags: , ,