dualboot linux operating systems tips windows windows 7

Repair Windows 7 after removing a Linux partition (Dual Boot)

I have seen the appear alot in the forums of people are running a dual boot scenario on their computers, dual-booting Windows with Linux, and no longer want the Linux system. Simply removing the paritions causes Windows to longer boot. In this article I explain how you can fix this problem.

In this article, I will show you how to repair Windows 7 after removing Ubuntu 11.10. Although, this will work regardless of the distribution of Linux you are using.

When you remove the Linux partition(s) you essentially remove the boot loader and screw up the master boot record. This need to be repaired for Windows to work again.


  1. Removing the Linux Partitions
  2. Repairing Windows Boot Loader

Removing the Linux Partitions

Boot to Windows 7 and open Computer Management. Do this by either right-clicking My Computer and selecting Manage, or simple search for Computer Management from the Start Menu. Once open, select Disk Management.

Here you will see the layout of the Hard Drive. Right-click and delete the Linux partitions. In the above screenshot, the Linux partitions are the two on the right. Windows 7 partitions are the System Reserved and C: Drive.

Once you have deleted these partitions, the space will become a logical partition, indicated by the green, remove this also.

With the now Unallocated space, you can resize the Windows 7 C: Drive partition to occupy this space. Right-click on the C: partition and select Extend Partition.
This will start the wizard that will guide you through extending the partition. At the main screen it will ask you by megabye (MB) how much you want to extend the partition by. For me, I extended it for the entire of the available space. Once you have done this, Windows is now the only OS on the Hard Drive.
Repairing the Boot Loader
Once you have successfully removed the Linux partitions, we now have to repair the Windows Boot Loader. Insert and boot from you Windows 7 DVD.
At the above screen select Repair you computer. This will take to the System Recovery Options screen.
From this screen, select Command Prompt. In this scenario, the Startup Repair function does not work. Although it detects there is a problem with the system, it does not repair the Master Boot Record or the Boot Loader.
Once at the Command Prompt, type the following:
  • Bootrec /fixmbr
  • Bootrec /fixboot
These commands repair the Master Boot Record which contain information regarding the Hard drives partitions and then repairs the Windows Boot Loader.
Once these commands have completed, reboot the computer and Windows will now boot.
If this article helped you, please leave a comment below. Also consider making a donation to keep this blog going.