Find the answer to your Linux question:
Results 1 to 3 of 3
I am using Ubuntu 10.04. Yesterday when I installed widows7, I lost my grub .Every time I tried to install windows running on Ubuntu machine, the grub is lost . ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    2

    Exclamation Restoring grub


    I am using Ubuntu 10.04. Yesterday when I installed widows7, I lost my grub.Every time I tried to install windows running on Ubuntu machine, the grub is lost. Why is it so? How can I restore it?

    Are there separate commands to restore grub in different versions of Ubuntu(for Ubuntu 9.04 or for Ubuntu 10.04)?

    Can any advance setup be made while installing windows, so that the grub is not lost?

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello and welcome!

    Windows doesn't like other bootloaders so it will always overwrite your bootloader when Windows is installed last. The different versions of Ubuntu that you mention above use different versions of GRUB. You can check these two HowTo articles for more info on working with each version under Ubuntu:

    https://help.ubuntu.com/community/GrubHowto

    https://help.ubuntu.com/community/Grub2

    You can reinstall GRUB using the Ubuntu install disk, or the SuperGRUB liveCD.
    oz

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I am using Ubuntu 10.04. Yesterday when I installed widows7, I lost my grub.Every time I tried to install windows running on Ubuntu machine, the grub is lost. Why is it so? How can I restore it?
    Windows Installer has removed Linux Boot Loader (GRUB) and installed its own instructions in MBR.
    Its really easy to restore GRUB. Boot up from Ubuntu LiveCD, mount / partition of Ubuntu and re-install GRUB2.
    Code:
    sudo mount /dev/sdXY /mnt
    sudo grub-install --root-directory=/mnt /dev/sdX
    sudo umount /mnt
    Replace /dev/sdXY with root partition and /dev/sdX with device name assigned to Hard disk.
    Are there separate commands to restore grub in different versions of Ubuntu(for Ubuntu 9.04 or for Ubuntu 10.04)?
    Commands are different in 9.04 and 10.04. 9.04 uses Legacy GRUB and 10.04 uses GRUB2.
    Can any advance setup be made while installing windows, so that the grub is not lost?
    Its not possible. In a few machines, Windows OS doesn't even boot if you install it after Linux.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •