Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had Windows 7 installation, and my drive had following partition structure as I found in Gparted in Ubuntu LiveCD session.

  • 100 mb system partition (Primary)
  • Windows 7 partition (60 GB) (Primary)
  • Data partition 1 (Primary)
  • 25 GB unallocated space.
  • Extended Volume.
    • Data Partition 2.
    • Data Partition 3.

Now, I attempted to Install Ubuntu in 25 GB partition, but installer didn't allowed me to install saying that I cannot have any additional primary partitions. Hence, I thought that 100 mb partition (which was primary) is not needed since it is created when we install Windows on a clean computer without any partitions existing. So I deleted that partition, and than proceeded with Ubuntu installation.

Everything went fine and I was even asked by Ubuntu installer to import any settings from existing Windows installation. But, when I restarted to boot into newly installed Ubuntu, I was not presented with boot menu to choose from booting into Ubuntu or Windows, and was directly booted into Ubuntu. I tried running sudo update-grub2 but it didn't found my Windows installation. So, I booted from Windows install CD and tried to repair it from there, but it was unable to find my Windows installation. Also, C: was no longer the Windows partition, instead it was E:.

I know I might have made a mess, but how can I recover my Windows installation back as it was before Ubuntu installation, I'm fine in removing Ubuntu for now if it is required to get Windows back.


share|improve this question… suggests a repair, but it looks like you already tried that? – john May 1 '12 at 20:12
@john: Yes I've already tried that, as well played with Bootrec utility too. – Kushal May 3 '12 at 10:44

This can be done.

While in Ubuntu copy the file /boot/grub/boot.img to Windows 7 partition "\" folder.

  1. Use any Disk management tool and mark Windows partition as active.
  2. Run Windows 7 StartUp Repair (from DVD/USB) up to 3 consecutive times with rebooting after each run.

Now you will have a booting Windows 7.

To add Ubuntu as boot choice to Windows 7 boot menu:

  1. Download and install Visual BCD Editor.
  2. Create boot sector loader and amend device and path to point to file \boot.img (copied earlier from Ubuntu)
share|improve this answer
I had Ubuntu installed in a dedicated partition, adding its entry to Windows Bootloader will work? as per my knowledge, Windows Bootloader doesn't support any non-Windows OS (but now I doubt since this could be a workaround to copy boot.img to Windows). But I'll definitely give a try to your suggested method. – Kushal May 3 '12 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .