Removing Linux from a computer with Windows 10

Let’s say you have a computer that have Windows 10 as its default operating system (OS). Then you manage to install a Linux distribution (e.g., Ubuntu) alongside Windows 10. But then you change your mind and you want to restore the system as it was, only with Windows 10, removing Linux and the multi-OS selector bootloader (called GRUB) from the system.

This tutorial assumes user has Ubuntu OS installed. Instructions should be similar for most Linux distributions.

How are we achieving it?

The summarized processs is as followed.

  1. Deletion drive containing Ubuntu and free the disk space related to it
  2. Merge the remaining free/allocation space to Windows drive
  3. Finally, fix bootlooader so it loads Windows directly

Step-by-step Procedure

1. Run Windows

Start computer and select Windows OS from bootloader.

Log in, if necessary, and wait until Windows is loaded.

2. Delete Linux drive

Right-click on “Start” button and select “Data Management”.

“Data Management” application will be open. It is very important to identify with no doubt which drive contains Linux OS and Windows OS respectively. Windows drives, should match in size with the drive displayed on “Computer”. Linux drives are usually not visible from “Computer”.

Data Management

Right-click on Linux drive and select “Delete volume…”. Confirm decision in the pop-up dialog, warning that the drive was not created by Windows.

If the space becomes “Free space”, you may have to delete it again to make it become “Unallocated space”

After confirming, the partition will become unallocated space.

3. Assign unallocated space to Windows 10

Still with the Disk Management application open, right click on the Windows drive (usually C: drive) and click on “Extend volume…”.

“Extend volume” wizard opens. Click on “Next” until the process is finished.

4. Open Command Line in Boot mode

Go to Start and click “Restart” while holding “Shift” button. Then Troubleshoot blue window should appear.

Troubleshoot blue screen

It may happen that system reboots normally, and when it tries to run GRUB it finds it has been removed so grub rescue is run. If this is the case, get a Windows 10 Live CD/USB (instructions here), boot system from it and when Windows 10 installer has been loaded click “Next”, then “Repair” system.

Note: a command prompt is also displayed when pressing Shift + F10 once Windows 10 installer start screen is loaded, but it seems it does not allow to do bootrec. It says “Access denied”.

In any case, you must arrive to the Troubleshoot blue screen.

Then go to “Troubleshoot” > “Advanced options” > “Command Prompt”.

5. Fix MBR

Type this command:

bootrec /fixmbr

It fixes the master boot record (MBR), that is a special type of boot sector at the very beginning of any partitioned computer mass storage devices.

6. Fix boot

Type this command:

bootrec /fixboot

In my case, I always got the message “Access denied”, so it was not successful. However, after completing the rest of steps and rebooting computer twice Windows 10 was loaded correctly.

Bootrec CMD screenshot

7. Scan Windows disks

Type this command in prompt:

bootrec /scanos

This command scans Windows operating systems looking for errors.

It may take some time.

8. Rebuild BCD

Type this command:

bootrec /rebuildbcd

This command rebuilds the Boot Configuration Data (BCD).

9. Test that Windows is loaded when booting

Reboot computer.

If it is not successful, repeat the previous steps in Troubleshoot blue screen cmd.

You might also be insterested in…

External references

Leave a Reply

Your email address will not be published. Required fields are marked *