Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thanks.

share|improve this question
    
answers.microsoft.com/en-us/windows/forum/windows_7-system/… 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. –  Kush May 3 '12 at 10:44

1 Answer 1

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. –  Kush May 3 '12 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.