Home arrow Wiki arrow Recover/Reinstall grub bootloader
Main Menu
Home
Help Docs
Newbies
Corporates
Gnu/Linux Distros
Programming
Databases
Links
Search
Regular
News
Interviews
Aaj Ka Tip
Aaj Ka Command
Community
Blogs
Wiki
Forums
Services
Free Software

Recover/Reinstall grub bootloader Print E-mail
To recover the boot loader for Ubuntu Linux or any other linux after the boot loader has been erased due to a dual windows installation or some other reason.

We need a bootable CD or USB to boot into a Linux shell.
Once looged in a Linux shell on the same machine, these steps are to be followed.

1. mount the / (root) partition of the Linux installation for which the grub boot loader has to be resintalled.

2. chroot into the Linux environment

3. run grub-installation

So the following command were run for 1 case where I reinstalled the grub bootloader from the /dev/sda2 partition

1. mount /dev/sda2 /media/linux
2. chroot /media/linux
3. grub-install /dev/sda


during grub-install, I got a message similar to 
'grub-probe: error: cannot find a device for /. (in chroot)'

So I ran this command also before chroot
mount --bind /dev/  media/linux/dev
and then rest of the commands

Next >



gnulinuxclub
Join Us
About Us
Contact Us
Support Us
Acknowlegdement
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!




Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org