How to restore GRUB

Discussion in 'QnA (read only)' started by firewall, Sep 17, 2004.

Thread Status:
Not open for further replies.
  1. firewall

    firewall New Member

    Joined:
    Mar 31, 2004
    Messages:
    299
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Kolkata - INDIA
    It's happened to almost every GNU/Linux and Windows dual boot user at some point: You have a nice installation GNU/Linux cross-booted with Windows. So far so good. But then, at some point, you reinstall Windows, perhaps because you upgraded to a new version, or perhaps you just did it to "clean up" Windows, reinstalling the original system files to make it a little more stable. When you reboot, however, you'll find that if you had LILO running from your hard disk's MBR, it has been killed, and Windows has claimed the MBR as its own. How will you reinstall your boot manager so you can get into GNU/Linux?

    here is small tutorial on how to reinstall your gnu boot loader in that case. I chose GRUB here as now a days it's very popular and powerful too.
    ----

    Boot into the rescue mode using install CD1 by typing "linux rescue" at the boot prompt. When it asks you if you want it to find your installation and mount it, let it by selecting "Continue". Once you get to the sh prompt chroot into you installation with:

    # chroot /mnt/sysimage

    If the disk you boot from is /dev/hda then you should be able to reinstall grub with:

    # grub-install /dev/hda

    Just remember to exit the chroot'ed shell before you reboot. If you reboot by "Ctrl-Alt-Del" the installer will unmount your partitions. Although it probably wouldn't hurt to try to unmount as many as you can yourself with something like:

    # umount /dev/hd?[1-9]*


    ----- :)
     
  2. tuxfan

    tuxfan New Member

    Joined:
    Feb 4, 2004
    Messages:
    2,653
    Likes Received:
    9
    Trophy Points:
    0
    Location:
    Mumbai
    Cool!! Some newbie has a thread here on the same problem. Why not post it there too!! :) Or shall I quote you there?
     
  3. thouchin

    thouchin New Member

    Joined:
    Aug 5, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    very cool!! I had the same problem once and because of the problem i did reinstall whole linux...
    hope that won't happen again... :)
     
  4. OP
    OP
    firewall

    firewall New Member

    Joined:
    Mar 31, 2004
    Messages:
    299
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Kolkata - INDIA
    Oh ! i missed that....

    btw just redirect that person to this thread.... simple...

    :)
     
  5. it_waaznt_me

    it_waaznt_me Coming back to life ..

    Joined:
    Nov 30, 2003
    Messages:
    2,023
    Likes Received:
    10
    Trophy Points:
    38
    Location:
    A bit closer to heaven
    Thanx ...
     
  6. hard_rock

    hard_rock Salieri Family

    Joined:
    Feb 24, 2004
    Messages:
    365
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Somewhere in Internet.......Have dynamic IP addres
    I think Tuxfan, ur talkin abt me...........I have similar problem with grub loader..........Thanx 4 ur solution yaar.......
     
Thread Status:
Not open for further replies.

Share This Page