Restore grubloader

When can dual-boot your computer to run any of Linux and Windows OS. But sometime the booloader get disturbed and we need to restore it. In such case you can simply load Linux OS from live CD/Pendrive and use following commands. [set X & Y with appropriate value according to where you have installed linux. In my case XY were a1]

Commands –
sudo mount /dev/sdXY /mnt
sudo mount –bind /dev /mnt/dev
sudo mount –bind /proc /mnt/proc
sudo mount –bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdX
grub-install –recheck /dev/sdX
update-grub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s