Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Restore GRUB after Windows 7 installation

  1. #1
    Join Date
    Oct 2009
    Beans
    22
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Restore GRUB after Windows 7 installation

    Hey,

    I would like to recover my old GRUB menu after installing Windows 7. I had Windows 7 and Ubuntu 9.04 options, but after reinstalling Windows, it has disappeared.

    I've spent the past hour with googling, and found a lot of info about how to restore GRUB after a Windows reinstall, but due to my Linux knowledge (been using Ubuntu 9.04 for 9 days) I'm not sure what to do, and I would like to ask for help here.

    I have 4 partitions, Ubuntu is on thw 4th (hd0,3), Windows 7 is on the primary one (hd0,0 = C: ). I installed Ubuntu after Windows, and everything was fine, but today Windows crashed and I had to reinstall it, and it has deleted GRUB.

    I tried EasyBCD, created a NeoGRUB bootloader, it said the menu file is on C:\NST\menu.lst . I have my menu.lst backed up, I overwrote it with the old one, but it doesn't work. After selecting NeoGRUB from the boot menu, I see my old boot menu, but Linux doesn't boot. Tried adding Linux aswell with both options ('GRUB isn't installed on the bootsector' ticked and unticked), but it just doesn't work. The sites say it's really simple and all, but I just can't get it working and it's starting to **** me off, since I'm not a noob otherwise, I just dno Linux (yet).

    I would really appreciate any help, thank you.

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Restore GRUB after Windows 7 installation

    restore boot loaders Ubuntu Win xp Vista
    http://ubuntuforums.org/showthread.php?t=1014708

    If your ubuntu is (hd0,3) then this should do it from a liveCD:

    In terminal
    sudo grub
    root (hd0,3) <-- this must point to location of 'stage1', else see nb:
    setup (hd0) <-- installs grub IPL to MBR of first hard drive.
    quit
    Reboot

    nb: if location of 'stage1' is unknown,
    find grub/stage1
    or
    find /boot/grub/stage1
    is needed, after step #1

  3. #3
    Join Date
    Oct 2009
    Beans
    22
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Restore GRUB after Windows 7 installation

    Thank you, though I already reinstalled Ubuntu :\

    I tried this before: booted from the Live CD, opened a terminal, logged in as root, then:

    sudo grub
    find grub/stage1 - it said (hd0,3)
    root (hd0,3)
    setup (hd0,3)
    quit

    And it didn't work. I guess what you said would have worked (setup (hd0)). It means I have to install GRUB to Windows's MBR?

  4. #4
    Join Date
    Feb 2009
    Location
    Le Petit Rocher
    Beans
    1,549
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Restore GRUB after Windows 7 installation

    post the output of

    sudo fdisk -l (that is the lower case letter L)

    This will verify what partitions are are your computer and we can go from there.
    Six Saturdays a week for me.

  5. #5
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Restore GRUB after Windows 7 installation

    The computer start process loads the MBR from the first disk in BIOS. You have to have Grub in the MBR for the compter to boot and find grub and the menu.lst that lets you choose what to boot from.

    Your installed grub to the third partition, If it is Ubuntu it would allow you to chainboot from another Grub install.

    You installed to the third partition
    setup (hd0,3)
    you should have installed to the MBR of the first drive.
    setup (hd0)

  6. #6
    Join Date
    Oct 2009
    Beans
    22
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Restore GRUB after Windows 7 installation

    Thanks, next time I will use (hd0).

    Btw, the output of 'sudo fdisk -l' is:

    /dev/sda1 * 1 3187 25599546 7 HPFS/NTFS
    /dev/sda2 3188 9561 51199155 5 Extended
    /dev/sda3 9562 35966 212094032 7 HPFS/NTFS
    /dev/sda4 35967 38913 23671777+ 83 Linux
    /dev/sda5 3188 9561 51199123+ 7 HPFS/NTFS

  7. #7
    Join Date
    Jun 2006
    Beans
    1

    Re: Restore GRUB after Windows 7 installation

    Just wanted to add my two cents, since I spent almost an hour fighting this problem. In my case, there was a Win7 boot partition at (hd0,0) and when following the directions, it was never "fixing" that one. I eventually got it to work by running:

    >setup (hd0,0)

    This wrote the grub config back to the little Win7 boot partition.

    Hope that helps someone...

    Kenny

  8. #8
    Join Date
    Dec 2010
    Beans
    3

    Re: Restore GRUB after Windows 7 installation

    Quote Originally Posted by richark View Post
    Just wanted to add my two cents, since I spent almost an hour fighting this problem. In my case, there was a Win7 boot partition at (hd0,0) and when following the directions, it was never "fixing" that one. I eventually got it to work by running:

    >setup (hd0,0)

    This wrote the grub config back to the little Win7 boot partition.

    Hope that helps someone...

    Kenny
    GRUB4DOS 0.4.4 2009-4-20,memory 639k/ 1788m Menu End 0×434CE
    [Minimal BASH -like line is
    supported. For the first word, TAB list possible command completions.
    Anywhere else TAB lists the possible completion of a
    device/filename.ESC at any time exists.]
    GRUB>root (hd0,1)
    FileSystem type is ntfs,partition type 0×07
    GRUB>setup (hd0)
    Error 15 file not found
    GRUB>setup (hd0,1)
    Error 15 file not found


    please help me immediately....................


    your's obediently

    A.Nijamudeen

  9. #9
    Join Date
    Dec 2010
    Beans
    3

    Re: Restore GRUB after Windows 7 installation

    Quote Originally Posted by oldfred View Post
    restore boot loaders Ubuntu Win xp Vista
    http://ubuntuforums.org/showthread.php?t=1014708

    If your ubuntu is (hd0,3) then this should do it from a liveCD:

    In terminal
    sudo grub
    root (hd0,3) <-- this must point to location of 'stage1', else see nb:
    setup (hd0) <-- installs grub IPL to MBR of first hard drive.
    quit
    Reboot

    nb: if location of 'stage1' is unknown,
    find grub/stage1
    or
    find /boot/grub/stage1
    is needed, after step #1
    GRUB4DOS 0.4.4 2009-4-20,memory 639k/ 1788m Menu End 0×434CE
    [Minimal BASH -like line is
    supported. For the first word, TAB list possible command completions.
    Anywhere else TAB lists the possible completion of a
    device/filename.ESC at any time exists.]
    GRUB>root (hd0,1)
    FileSystem type is ntfs,partition type 0×07
    GRUB>setup (hd0)
    Error 15 file not found
    GRUB>setup (hd0,1)
    Error 15 file not found


    please help me immediately....................


    your's obediently

    A.Nijamudeen

  10. #10
    Join Date
    Dec 2010
    Beans
    3

    Angry how to solve

    GRUB4DOS 0.4.4 2009-4-20,memory 639k/ 1788m Menu End 0×434CE
    [Minimal BASH -like line is
    supported. For the first word, TAB list possible command completions.
    Anywhere else TAB lists the possible completion of a
    device/filename.ESC at any time exists.]
    GRUB>root (hd0,1)
    FileSystem type is ntfs,partition type 0×07
    GRUB>setup (hd0)
    Error 15 file not found
    GRUB>setup (hd0,1)
    Error 15 file not found


    please help me immediately....................


    your's obediently

    A.Nijamudeen[/QUOTE]

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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