2

This question already has an answer here:

I just installed Ubuntu onto my hard drive from a USB drive. When I reached the partitions screen, I noticed it listed the full hard drive as "free space" even though I already had Windows 7 installed.

I knew I had about 50 GB of free space on the hard drive, so I partitioned sda1 for 35 GB and installed Ubuntu onto it, and partitioned sda2 for 4 GB of swap space.

The installation went fine, but when I reach the GRUB boot menu, there is no option for Windows 7 -- only Ubuntu. It seems as though my Windows 7 installation has completely disappeared. This would be very unfortunate, as I had aplenty of files on Windows, so your help is much appreciated.

marked as duplicate by karel, Fabby, Charles Green, Eric Carvalho, Thomas Nov 17 '18 at 9:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    It is not clear if you still have Windows in your hard drive. Can you post the output of sudo fdisk -l from terminal. – Noble P. Abraham Sep 6 '12 at 6:33
3

I think you destroyed the disk partition, but it's possible to rescue some files.

Use a Rescue CD and try testdisk in console. This program scans the hard disk for lost files and partitions.

Good luck.

  • 1
    I agree with this. If you had important documents on Windows, don't write any more on your disk! And use TestDisk to try recovering some documents. Then you can reinstall Windows , then reinstall Ubuntu. – LovinBuntu Sep 6 '12 at 8:05
1

If you have the Windows 7 rescue CD, boot from it and try fixing the MBR.

1

if you have a windows boot repair disk, and the automatic repair doesn't work like mine (it was picky I had a windows xp repair disk while I had windows 7 and demanded I buy the windows 7 version...) then get to the command prompt while using the repair disk. It's not clear how you access it, I think you try to repair it, then push cancel or something.

Anyways, once you have the cmd prompt, run this command:

bootrec.exe /FixMBR

If you still have windows, this will reset the master boot record and allow you to access it.

1

I think that the files of Windows 7 is still existing on the hard drive, but the MBR is broken. So you can build a new MBR.

0
  1. Boot your computer to the Windows 7 DVD (or to a "Repair CD"). At this screen choose to install now.
  2. Select your language and click next.
  3. Then select the first option I think "Startup Repair" then some processing will done
  4. Then restart your computer. Even after that if it doesn't boot to windows 7 then your partition might be lost.
0

Since you have your ubuntu installed. I would suggest to try this method as it is faster and easier than getting a repair CD IMHO.

open a new Terminal CtrlAlt+T, then type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  • Press Enter.

  • Then type:

    sudo apt-get install -y boot-repair && boot-repair

  • Press Enter

Now after the Installation has finished:

launch Boot-Repair from either :

the Dash (the Ubuntu logo at the top-left of the screen)

or System->Administration->Boot-Repair menu (Ubuntu 10.04 only)

or by typing 'boot-repair' in a terminal

You will see window :

enter image description here

Click on "Recommended Repair" and it will search for all the exisitng OS in your PC (windows and linux)

Boot-repair wiki page

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