Reinstall grub using Live-CDROM

After a failed upgrade to Ubuntu 14.04 the server complains about missing disk error. The solution was to reinstall grub and reboot. The procedure is loosely described here.

Boot your Ubuntu server using av Live CDROM you have downloaded from Ubuntu. Choose to Test Ubuntu since installation is not the desired option at this time.

Open a terminal window and become root using the sudo command and make the LVM disks available

# lvm vgscan -v
# vgchange -a y vgdisk-for-root-partition 
# mkdir /mnt/rootMount
# mount /dev/vgdisk-for-root-partition/root /mnt/root

Create a chroot environment where you can run the grub-install command

# mount –bind /dev /mnt/root/bind
# mount –bind /proc /mnt/root/proc
# mount /boot /mnt/root/boot
# chroot /mnt/root /bin/bash
# grub-install –root /dev/sda

Always make sure you are working on the right disk before using the grub-install command since it overwrites the boot loader.

Reboot the server when the grub-install command has been successfully run. The server should now be rebooting and working again as it used to.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.