[puduvailug] Solution for recovering boot loader after installing Windowz

  • From: Praveen Singh <praveen.ifet@xxxxxxxxx>
  • To: vlug <vlug@xxxxxxxxxxxxx>, puduvailug <puduvailug@xxxxxxxxxxxxx>
  • Date: Fri, 13 Jan 2012 19:01:26 +0530

Hi linux users. It worked for me. If u got the same problem don't
reinstall linux. Just try these things out

Recovering Ubuntu After Installing Windows
How to restore or recover the boot-loader (GRUB) after installing
Windows. Some reasons to repair your boot-loader might include
installing Microsoft Windows after you have installed Ubuntu, adding
or removing a hard drive, or changing hard drive settings.

Using the Ubuntu CD (Recommended)

The graphical way

    Insert your Ubuntu CD, reboot your computer and set it to boot
from CD in the BIOS and boot into a live session. You can also use a
LiveUSB if you have created one in the past.

    Install and run Boot-Repair
    After this, click "Recommended repair" and apply. If you are
willing to use the advanced options, make sure you leave the
"Reinstall GRUB" checkbox ticked.
    Now reboot your system. The usual GRUB boot menu should appear. If
it does not, hold Left Shift while booting. You will be able to choose
between Ubuntu and Windows.

The terminal way

* Open a terminal. As of Ubuntu 11.10 and 11.04, this can be done by
opening the Unity Dash (you can click the Ubuntu logo in the top panel
or use the Windows key on your keyboard) and typing in "Terminal", and
clicking what comes up. On earlier versions, you can achieve this by
going to Applications -> Accessories -> Terminal.

    You are then presented with a standard bash prompt, type:

sudo grub-install /dev/XXX

where XXX is the device of your Ubuntu install. (eg: grub-install
/dev/sdb). Hint: You can also use /dev/disk/by-label/ if the partition
you installed on has a label. You can determine the /dev node for such
a device by running:

ls -l /dev/disk/by-label/

This will give the output of something like:

lrwxrwxrwx 1 root root 10 Oct 16 10:27 data -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 data2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 16 10:27 fat -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct 16 10:27 home -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 16 10:27 root -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 16 10:27 swap -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 16 10:27 windows -> ../../sdb1

From here, find only the drive name, ignore the partition number, that
is, for partitions labeled "root", "data2", "fat", "home" and "swap"
it's all still just sda. This is due to the fact that GRUB is
installed in the MBR of the drive, and not on a partition.

    Now reboot your system. The usual GRUB boot menu should appear. If
it does not, hold Left Shift while booting. You will be able to choose
between Ubuntu and Windows.

-- 
with regards,
               Praveen singh(Villupuram LUG)

Other related posts:

  • » [puduvailug] Solution for recovering boot loader after installing Windowz - Praveen Singh