December 8

Linux: Reinstalling Grub

Boot into a live Linux CD or USB
(Note: It is safest to us the same version of OS that is on your PC, but at minimum match the 32bit or 64bit and the Grub version)

Start a terminal session
Type: sudo fdisk -l
Find the boot partition of you linux installation (In this example we have it install on /dev/sda5)

sudo mount /dev/sda5 /mnt *****Using the linux installation on your hard drive instead of /dev/sda5
Create some neccessary hardlinks
sudo mount –bind /dev /mnt/dev
sudo mount –bind /proc /mnt/proc
sudo mount –bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda *****Using your boot device instead of /dev/sda
CTRL-D
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

 

By: Nixie modified by Nighthawk


Copyright 2021. All rights reserved.

Posted December 8, 2011 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B