Wednesday, September 23, 2009

Recover Your Grub Bootloader After Windows Installionation On Fedora Or Ubuntu

It usually happens that after installing Linux you need Windows again for some specific application which is not meant to used on Linux. So you need to install Windows again. And when you do so you will loose your bootloader and will not be able to login into your Linux account. Here is the method to recover the bootloader and use both Windows and Linux together.

  1. Boot into any Linux using Linux Live CD. Here we are using Ubuntu Live CD.
  2. Open the Terminal. It is present in Accessories sub-menu of Application menu.
  3. Type sudo grub.
  4. Next we find the stage1 file of the boot loader. To do so type find /boot/grub/stage1. The output will be something like (hdX,Y), here X and Y are digits depending upon the hard disk and partition.
  5. Now type root (hdX,Y)
  6. Next type setup (hdX). Be careful regarding spaces.
  7. finally write quit.
Your boot loader is recovered successfully. Now reboot and remove the live CD.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.