Ubuntu – Wiped Ubuntu files, bootloader still there, how can I remove it and restore Windows?

bootloaderuninstallwindows 7

Possible Duplicate:
How to remove Ubuntu and put Windows back on?

I had Ubuntu installed through the Windows 7 dual boot option. Not knowing exactly what I was doing, I just deleted the files from my computer. Now each time I boot up the computer, it still asks me which operating system to boot. How can I restore Windows?

Best Answer

1 - Live CD

First, you'll need to boot from a Ubuntu Live CD.

2 - Resize the Windows partition

Using the Gparted Partition Editor, you can resize your Windows partition so that it uses the whole disk again, if you wish to do so.

To resize a partition in Gparted, select the disk that contains the partition in the dropdown list in the top-right corner of the Gparted main window.

Click on the partition's graphical representation, then go in the Partition menu and click on Resize/Move.

You can now resize the Windows partition by dragging its graphical representation to your desired size. Alternatively, you can also type in the exact size you want.

  • The yellow portion represents used space on the partition.

When you're satisfied, click on the Resize/Move button.

And now, to apply the resize action, go in the Edit menu and select Apply All Operations.

3 - Restore the Windows bootloader

To restore the Windows bootloader, follow these steps.

Open a terminal from the Live CD, and run the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair

After a few seconds, Boot Repair's main window will open.

Select Advanced options.

In the Main options tab select Restore MBR.

In the MBR options tab, select the drive and the partition that contains your Windows installation. By default, all the options should be correct, but double-check anyways.

Finally, click on Apply.

You're done!

Reboot to test everything out. :)

Related Question