linux poison RSS
linux poison Email

How to reinstall GRUB 2 in Ubuntu using Live Distribution CD

GRUB 2 introduces many new changes. GRUB 2 has better portability and modularity, supports non-ASCII characters, dynamic loading of modules, real memory management, and more and is totally different from its predecessor, menu.lst doesn't even exist, it is replaced by grub.cfg which have little resemblance with menu.lst.

Using a Live distribution
The first thing to do is start the live-cd and open a terminal type the following command to see the partitions on different hard disks:
$ sudo fdisk-l
Figure out the Ubuntu partition and mount it on /mnt using following command:
$ sudo mount  /dev/sda1  /mnt
Now mount the other devices:
$ sudo mount - bind  /dev  /mnt/dev
And run the chroot command:
$ sudo chroot  /mnt
Finally load the Grub in the MBR by running the following command:
# grub-install - recheck  /dev/sda
(you should replace the /dev/sda with your hard drive used to boot operating systems)

Remove the live-cd and reboot the system and refresh the grub2 menu using following command:
$ sudo update-grub2
Note. If you have the / boot on separate partition
After mounting the file system on /mnt (with the command sudo mount /dev/sda1  /mnt), you must also mount the boot partition with the following command:
sudo mount  /dev/sda2  /mnt/boot


2 comments:

Anonymous said...

Hi There,
Really helpful instructions, thank you. Only small thing is that a "--" in your commands isn't displayed correctly. As a noob it got me.
Cheers,
Donal

Mohammed AbdelRahman said...

and what will happen to my Windows installation?

Post a Comment

Related Posts with Thumbnails