Tag Archive: os deletion



 

Linux is a great operating system and more often than not, it’s the installation of Linux that is the matter of discussion.

For a change, I will be talking about how touninstall Linux Ubuntu (or other operating systems) from a dual boot windows pc, and still being able to boot into other OS without much work. So let’s get started right away.

Backup your Linux files

It pops up everytime, but backup really is very important. If you have been using your Linux system for some time, chances are you would have created files you wouldn’t want to loose. In such a case, you can boot into Linux, backup your files (check out your Home directory) on an external device or onto a Windows partition.

Alternatively if you somehow managed to mess up and can’t boot into Linux, you can use ext2 IFS which allows you access to your Linux paritions. It can only read ext2 and ext3 filesystems though. If you are using other filesystems, you would have to look around a bit for a similar application. In any case, you can always boot from a Linux live CD to backup files if everything else fails.

Delete Linux Partitions

Next step: delete every Linux partition. That would include everything – boot, swap, home, whatever way you set up your system, it is time to delete all Linux partitions. There are a couple of ways to achieve this, easiest being from within Windows’ Computer Management. You need to:

how to uninstall ubuntu from dual boot windows pc

  • Log in to an account with administrative privileges.
  • Right click on My Computer, click ‘Manage’.
  • Choose ‘Disk Management’ listed under ‘Storage’ and you will see all of your partitions listed there.

how to uninstall ubuntu from dual boot windows pc

Next, you need to identify Linux partitions. The Linux partitions generally don’t have a file system listed with them if Windows doesn’t recognize it, so this can serve as a clue. Other ways can be identifying by size or partition number. You can use partition managers, these are generally better at identifying filesystems. Go ahead, delete the partitions, just make sure you delete the correct ones. Linux is gone and so is GRUB, which allowed you to choose operating system to use at boot time. So currently, you cannot boot into any other operating system, without some help. We are going to fix that soon.

Restore MBR

As we noted, GRUB is gone and so is the ability to boot into Windows. You would now need to boot from the Windows CD/DVD to restore the Master Boot Record. You can also use other Live CDs like one of my absolute favorites and highly recommended HBCD just in case you don’t have Windows installation media handy. Here are the steps:

  • Boot from Windows CD/DVD and choose “Repair” when it shows up.

uninstall ubuntu from dual boot pc

  • Choose command prompt on the resulting screen and run the following two commands:
    • bootrec /fixmbr
    • bootrec /fixboot

XP users need to run the recovery console from Windows XP CD and then type fixmbr when at the command prompt.

Reclaim free space

Restart now, remove the CD and you should be able to boot into your Windows installation. Once there, you should go ahead and reclaim the unpartitioned free space which was previously occupied by Linux. Doing so is simple and straight forward:

  • Fire up Disk Management as before.
  • Right-click on the unparitioned space, choose new partition or new logical drive.
  • Specify the size and other options according to your needs and you are done.

The free space should now be accessible from My Computer like any other partition. Alternatively, you can create multiple partitions from the free space or resize existing partitions to suit your needs.You can use utilities like GPartedEasues Partition Master or any one of the many partition managers on HBCD to perform such advanced tasks easily.


When you are having OS and you are going to delete the OS through windows you have to download the software EASYBCD

Step 1 – Check where the bootmgr resides

Open Disk Management and find the partition that is marked “active”. That is the partition that contains the bootmgr.

The active partition is usually from the OS that was on the system first – e.g. if you installedWindows 7 on an XP system, the XP system would be the active partition. But there are also other cases.

If Windows 7 was the first OS on the system, then your bootmgr resides most likely in a separatesystem partition which is usually small.

If you installed Windows 7 as first OS to a disk that was not attached to the Sata port0, it can very well be that the bootmgr resides on an arbitrary partition on the disk that is attached to port0.

If you have e.g. a Dell system, your bootmgr may be on the recovery partition. Other OEMs may do the same, but I was not able to verify that.

This is the example of my current system. Note the two last partitions which are Windows 7 and Windows 8. The Windows 7 partition is marked as active. You also see that I have no small system partition because I have eliminated that partition after I moved the bootmgr from that small system partition to the Windows 7 partition.

Dual Boot - Delete a OS-pic-1.png

If I would delete the Windows 7 partition, my Windows 8 would not boot any more because it would have lost it’s bootmgr that is in cohabitation with the Windows7 bootmgr.

In order to avoid such an unfortunate situation, we launch the system that we want to retain and move the bootmgr to that system’s OS partitionHere is how.

Step 2 – Delete the unwanted OS partition and reuse the space

Stay in the OS that you want to keep and open Disk Management. Right click on the partition that contains the OS you want to delete and Delete Volume. Then right click on the deleted volume and Delete Partition. Now you should have “Freespace” where this partition originally was.

With Disk Management, you can define a new partition in that freespace or you can add it to the partition that shows to the left of that freespce. Just click on the partition which is to the left and Extend Volume.

If, however, you want to add that freespace to a partition that is to the right of the freespace, then you have to use an external tool. I suggest the bootable CD of Partition Wizard. Here is how.

A word of caution: before you manipulate partitions with Partition Wizard, make an image of all partitions on that disk. I once lost all my partitions on a disk because I made a small mistake manipulating one partition with Partition Wizard. For imaging I recommend Free Macrium. Here is how.

Step 3 – Cleanup the bootmgr

Now that we removed one OS, we have a surplus entry in the bootmgr. We will remove this entry with EasyBCD. As you can see in the picture, the operation takes only 4 clicks.

EasyBCD is a very handy tool for a variety of operations on the bootmgr. You should have that in your toolkit anyhow.

Dual Boot - Delete a OS-pic-2.png

If you stop at this step, the MBR is still in a double boot configuration and when you boot, the BIOS will present you the black screen where you have to choose the operating sytem – although only one operating system is present. This is not a disaster, but it is an unnecessary step that requires your intervention.

The next two steps will reset the MBR to your current OS and then your system will automatically boot into that.

Important: You absolutely have to execute both Steps 4 and Step 5. If you only do Step 4, your system will not boot any more. 

Step 4 – Clean the MBR

Dual Boot - Delete a OS-pic-3.png

Step 5 – Reset MBR with the entry of the current OS

Dual Boot - Delete a OS-pic-4.png

%d bloggers like this: