Results 1 to 10 of 12

Thread: Restoring windows 7 mbr from ubuntu

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Beans
    3

    Restoring windows 7 mbr from ubuntu

    Hi,

    Till recently,my computer dual booted Vista and Windows 7.After trying Windows 7 for a while,I decided to remove Vista and install Ubuntu.So I (very naively as I later found out)formatted the primary partition which had Vista and installed Kubuntu 8.10.Then I switched to Ubuntu installing GNOME.Then I realised that I could not boot into Windows 7.Its not showing up in the boot menu.After googling for a while,I found out that I might have removed the MBR on the primary partition.Is there anyway I can recover MBR and use Windows again without re-installing it?

    Things I have already tried(if it is of any help)

    1.Recovering from windows CD.I tried both Vista and Windows 7 DVD.Vista directly started installing it.My laptop is not recognising Windows & DVD(and a few others)

    2.I've tried ms-sys.But it says:
    "/dev/sda5 has an x86 boot sector,
    it is an unknown boot record"
    I guess windows 7 is too new for it

    I would be very grateful for any help.Thanks

  2. #2
    Join Date
    Feb 2007
    Location
    Kernow, England
    Beans
    382
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restoring windows 7 mbr from ubuntu

    I have recoverd a bootloader before using VMWare (on the same computer). If you have an ISO then that could work for you.
    Dell Vostro 1500: Intel T7250, 4GB RAM (800MHz), nVidia 8600M GT, Intel 3945AGB Pro Wireless.
    Ubuntu 10.04 + Windows 7 dual boot (damn games!)

  3. #3
    Join Date
    Jan 2008
    Location
    Romania
    Beans
    70
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Restoring windows 7 mbr from ubuntu

    Quote Originally Posted by neo|oen View Post
    /dev/sda5 has an x86 boot sector,
    I would try (but with no promises that it will work) to add the following code to the /boot/grub/menu.lst file
    First of all backup the file.
    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
    Then add this at the end of the file (/boot/grub/menu.lst):
    Code:
    title		Windows 7 (loader)
    root		(hd0,4)
    savedefault
    makeactive
    chainloader	+1

  4. #4
    Join Date
    Jan 2009
    Beans
    3

    Re: Restoring windows 7 mbr from ubuntu

    Originally Posted by Gulyan
    --------------------------------------------------------------------------------

    Quote:
    Originally Posted by neo|oen
    /dev/sda5 has an x86 boot sector,

    I would try (but with no promises that it will work) to add the following code to the /boot/grub/menu.lst file
    First of all backup the file.

    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bakThen add this at the end of the file (/boot/grub/menu.lst):

    Code:
    title Windows 7 (loader)
    root (hd0,4)
    savedefault
    makeactive
    chainloader +1
    I have tried that.It didn't work.
    It said something like unknown device requested.

    Anyways,I reinstalled Vista again(I know I should have waited )

    Thanks for the advice.

    @marshall.robert:Thanks.I Should have waited.

  5. #5
    Join Date
    Jan 2009
    Beans
    3

    Re: Restoring windows 7 mbr from ubuntu

    My hastiness be cursed()

    I reinstal on led Vista.As expected grub was lost.Using a live cd.I could restore Grub.But now Vista does not boot.Back to the same problem.

    @marshall.robert:Can you elucidate using VMWare please?

    Thank you

  6. #6
    Join Date
    Jan 2006
    Beans
    27

    Re: Restoring windows 7 mbr from ubuntu

    I have almost the exact same problem:

    I was away from ubuntu for while on main laptop, had WinXP and Win7 installed dual booting with windows' booter-majjig

    then, dropped xp and installed ubuntu..

    so, I have kgrub editor installed (excellent program)

    set it up the way I wanted, changed windows entry to Win7, and pointed in the right direction, but when I boot I get the "NTLDR is missing" etc...

    (I suspect when I installed win7, it detected xp and decided to use certain files there instead of installing it's own)

    so, I just got an idea from an earlier post in this thread, so I'll install Win7 in a virtual machine (Qemu, or vmware) and copy some files from virtual machine root (the boot files) to my Win7 partition...


    I'll check back later and post if it worked...

  7. #7
    Join Date
    Mar 2009
    Beans
    1

    Re: Restoring windows 7 mbr from ubuntu

    Quote Originally Posted by banjo man View Post
    I have almost the exact same problem:

    I was away from ubuntu for while on main laptop, had WinXP and Win7 installed dual booting with windows' booter-majjig

    then, dropped xp and installed ubuntu..

    so, I have kgrub editor installed (excellent program)

    set it up the way I wanted, changed windows entry to Win7, and pointed in the right direction, but when I boot I get the "NTLDR is missing" etc...

    (I suspect when I installed win7, it detected xp and decided to use certain files there instead of installing it's own)

    so, I just got an idea from an earlier post in this thread, so I'll install Win7 in a virtual machine (Qemu, or vmware) and copy some files from virtual machine root (the boot files) to my Win7 partition...


    I'll check back later and post if it worked...
    How'd this go? I'm having the same problem.

    I had an old hard drive, that I had xp installed on, and windows 7 was installed on my secondary drive. I recently bought a new hard drive, and replaced my windows xp drive with this new one, which I now have ubuntu and xp installed to. Problem is I can't get windows 7 to boot. This is what I'm using in the grub:

    title Microsoft Windows 7
    root (hd1,0)
    savedefault
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1

    But when I select that, I get the "NTLDR is missing" error. If I replace my new hard drive, with my old one, I get the old boot menu, and I can easily boot into either my old ****** copy of XP that's on that old hard drive, or Windows 7 that is installed on my secondary drive. I'd like to be able to boot into Windows 7, without having to reinstall it on my new drive. But I'm having trouble finding a solution to this problem. Hopefully someone might have the answer here?

  8. #8
    Join Date
    Mar 2011
    Beans
    8

    Re: Restoring windows 7 mbr from ubuntu

    If you can manage to get Windows running from the GRUB bootloader, install EasyBCD and go to advanced > change boot drive > [newDriveHere]

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Restoring windows 7 mbr from ubuntu

    Old thread closed.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

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
  •