Monday, September 20, 2010

Recovering Grub 2 using Ubuntu/Mint Live CD:

Most Linux distributions use Grub as default boot manager/boot loader, when we install Linux it changes the MBR(master boot record) by writing a small piece of code so that it can point to the Grub files installed inside the /boot/grub directory.
In some cases, like in a dual-boot system having both Linux and Windows, reinstalling windows overwrites the MBR, and Linux becomes no longer boot-able. To boot again into Linux we need to recover the lost link to Grub.
Here is a method for recovering Grub using Ubuntu 10.04 live CD and is only applicable to Grub version 2.
First boot from Ubuntu Live CD and mount root partition on your Live CD's /mnt directory using following command:

sudo mount /dev/sda6 /mnt    #here sda6 is my root partition.

After the successful mount, type:

sudo  grub-install --root-directory=/mnt/ /dev/sda

On success you will see a message like this:

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)   /dev/sda

To include a link to Windows in Grub menu issue this command:

sudo update-grub2

Thanks with Regards!

3 comments:

  1. It is an acheivement when it shows the message finally that your are successful n installation. Outsourcing

    ReplyDelete
    Replies

    1. purchase win 7 product key , buy windows 8.1 pro key , office 2016 pro plus key , buy windows 7 ultimate upgrade key , windows 7 ultimate activation key , buy windows 7 ultimate , windowd 7 keys , window 7 professional product key generator , l3OLqc

      office project 2013 keys

      windows 7 ultimate sp1

      windows 10 pro key

      windows 10 pro key free

      Delete

Follow me

Join me on the New Digg Follow ur_sunny on Twitter

Translate

Labels

Followers