Uninstall Linux from computer

On the example of the Ubuntu distribution. In this article we will consider the reverse process, which sooner or later will have to be resorted to by those users, whom Linux did not have in spirit. How to remove Linux installed on the same computer with Windows? How to return the Windows bootloader?

To completely get rid of Linux, you need to restore the Windows boot loader, remove the Linux files and resolve the issue of the further fate of the disk space that was set aside for installing this operating system (swap partition and partition with the Linux files themselves). Below are 3 ways to remove Linux and return the Windows bootloader. Two of them are ways for computers based on the usual BIOS, they will differ in the tools used. The third way is to remove the Linux bootloader from the UEFI BIOS boot list. All operations described below are carried out inside Windows.

1. Bootice Utility and Windows Disk Management

For the first method of removing Linux and restoring the Windows bootloader, you will need two utilities — a third-party free Bootice and a regular diskmgmt.msc (disk management).

1.1. Repair Windows Boot Loader with Bootice

First of all, download the Bootice utility from its official website. For computers based on the usual BIOS 32-bit or 64-bit edition of the utility does not matter. After unpacking Bootice run it. On the first tab, select from the drop-down list the desired hDDif there are several of them. And click the "Process MBR" button.

In the appeared window for Windows 7, 8.1 and 10, select the option "Windows NT 6.x MBR". In the case of Windows XP, you need to select the option above - "Windows NT 5.x MBR". Next, click the button "Install / Config".

We confirm.

Windows boot loader restored.

1.2. Removing Linux partitions in Windows Disk Management

After the recovery of the Windows bootloader, we go to the regular disk management utility. Click the Win + R keys and enter its name:


In the utility window, remove two Linux partitions - specially prepared before installing it manually or automatically created by this system. In the latter case, as a rule, the Linux partitions on the hard disk are immediately behind the Windows system partition. Without understanding the Linux file system, the Windows operating system does not give a letter to its sections, and, accordingly, they cannot be displayed in Windows Explorer. But in any case, it is better to focus on these signs and the size of the Linux partitions. To delete the Linux partitions on each of them, you need to call the context menu and select "Delete Volume".


The free disk space can then be placed here in the disk management utility acceptable for Windows (in the format file system   NTFS) partition or multiple partitions. Details on creating simple partitions using standard Windows tools can be found in.

2. AOMEI Partition Assistant

An alternative way to get rid of Linux and return the Windows bootloader to users of computers based on the usual BIOS can offer a functional program to work with disk space   AOMEI Partition Assistant. All the necessary tools for this purpose are available in the free edition of the Standard Edition program. In the AOMEI window Partition assistance   On the sidebar of the toolbar, in the "Operations with disk" block, select "Repair MBR".


In the appeared window from the drop-down list, select the type of boot loader for the corresponding versions of Windows.


The program will warn you that after the planned operation, Linux will stop loading. Click "Yes."


Then we apply the operation with the green button at the top of the "Apply" window.


We pass a couple of stages in order to confirm intentions.


Everything, operation is applied.



Deletion of each section is confirmed.


And we make out the vacant space in the section (or sections) with clear for Windows file   by the system. AT context menu   on unallocated space, select "Create Partition".


If only a part of the space is allocated for the section, we indicate the required size. Click "OK".


Apply scheduled operations.




3. Remove the Linux bootloader in the UEFI BIOS boot queue

To remove the Linux bootloader on computers with UEFI BIOS, we will resort to the help of the Bootice utility mentioned in paragraph 1 of the article. But in this case, you need to download its 64-bit edition. In such a special tab provides "UEFI". Go to this tab, click the button "Edit boot entries".


On the left, select the Linux boot loader, in this case Ubuntu. And click on the button "Del" below.


The boot loader is removed from the UEFI boot queue.


Operations to remove Linux partitions and form new partitions with an understandable Windows file system can be done in any of the ways described above - in p. 1.2 and 2 articles.

I think many users install Linux as a second system next to Windows.

Although I personally do not like this option, but it is quite viable and very popular. And I don’t like this option with potential problems that you will certainly encounter, for example, when reinstalling Windows.

For a better understanding of the situation, I will delve a bit into theory, namely the process of loading the operating system.

So, when the computer is turned on, control is transferred to the BIOS and after standard self-testing operations, the contents of the so-called MBR (Master boot record   - the main boot record). It is always in the same place - in the first sector of the first hard drive   computer.

MBR   occupies only 512 bytes and contains all the service information about the media, for example, about partitions or the type of file system. Most MBR   takes the program loader, which is responsible for further loading the computer.

Usually 512 bytes are not enough for operating systems to load normally; therefore, MBR   they put instructions that allow the operating system loader to run and transfer all the permissions to it.

The most popular Linux downloader is GRUB2 (GRand Unified Bootloader). This program is fully responsible for the entire process of booting Linux on a computer.

Well, now, actually, about the problem ...

Windows was installed on the computer and we installed Linux as the second operating system. When installing Linux, I found another operating system and put it on my list, which allowed us to select the operating system with which we want to work at the moment from the special menu when the computer boots.


But for some reason you decide to reinstall Windows. Windows Installer erases MBR   and writes there your data, which means instructions Grub   disappear and the ability to run Linux also becomes inaccessible.

Quite logical ways out of the situation are two:

  • save content MBR   before re install windows   and then restore it
  • after reinstalling Windows reinstall Grub.

These options are both viable, and for each option there are several ways to implement. In many ways used exclusively Terminalthat for most Linux users is the norm, but for a newbie, all these actions will be incomprehensible, but I personally think that in such situations it is necessary to have full view   about what you do. Therefore, I will talk about the recovery of the bootloader using a special utility that has a more familiar graphical interface for beginners.

So, we reinstalled Windows and Linux stopped loading. We will need a bootable USB flash drive, from Linux, which we created when installing the operating system, as well as an internet connection, since we will need to download the recovery utility.

Boot from the flash drive and run the Terminal.

Now we will consider another useful terminal command - add-apt-repository. It allows you to connect to any additional repository. In our case, we need a program. Boot repair   and we will connect to one of the Linux Ubuntu repositories to download and install the utility from there.

Here is a list of commands that we will use:

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

After installing the utility, you can run it directly from the terminal by entering the name boot repair, or through the main menu - Administration section.

After running the utility, it will scan the hard drive, and then the program window will open. Click on the button "Recommended Repair" to proceed with the restoration.


After the end of the recovery restart the computer. Everything should work as before.

Well, in conclusion, I will say a few words about removing Linux.

The removal process for Linux is as simple as installing it. All you need to do is to delete its sections and add them to windows partitions. This can be done, for example, using the standard Windows PC management console (disk management) or free program EaseUS Partition Master.

The problem can only occur with the bootloader Grubsince his instructions will still be in MBR. Therefore, to solve the problem will need to be restored MBR.

This is done very simply, but we will need boot disk   with your windows version. If you have a laptop with Windows preinstalled, look in the documentation for how to get into recovery mode (usually it is called by pressing one of the function keys when the computer boots). There is no general algorithm, as laptop manufacturers usually do as they prefer. In general, we need the command line mode, so look for how it can be run exactly in your situation.

I will demonstrate the process on windows example   7. I boot from a disk or flash drive and at the beginning of the installation I select “System Restore”



I enter two commands in order on the command line:

bootrec / fixmbr
bootrec / fixboot

After that, I restart the computer and everything should work.

Well, on this note it is logical to complete this overview video course on operating system   Linux

I hope that I managed to lift the curtain in the world of Linux and contribute to the popularization of this family of operating systems.

If you were interested in this course and you are already using Linux, then I am sure that you now have a lot of questions, the answers to which you did not find in my course.

This is how the computer world works, that questions will always and in the overwhelming number of situations you have to look for an answer or solution to a problem yourself.

I believe that it is worth learning to work with Google or Yandex, because using search engines   You can gain access to the knowledge of hundreds of thousands and millions of other users around the world.

Just know that if you have a problem, then it’s very likely that someone has already had it before and has solved it, told about it on his blog, some topic forum or Yotube video. Well, this information you can find by asking Google or Yandex.

The site has a forum that already focuses a lot of responses to fAQ, well, if you don’t find a solution to your problem there, you can always create a new topic and ask a question. More experienced users will help you solve it.

If you have never worked with Linux before, then after installation everything will probably seem unusual, and you will want to remove this system. We will consider several options for removing Linux.

The easiest way to remove a system is to install Windows over Linux by formatting the disk. Consider this option on the example of Windows 7. At the time of choosing the type of installation, after accepting the license agreement, you will need to specify the partition where the system will be installed. You will need to select "Disk Setup", then select the partitions on which the program to be installed is installed and start formatting the disk. You can leave the existing partitions or split the disk again. After you install Windows, Linux will be removed from your computer. If you want to install another version of Linux, then you need to act in the same way - mark up the disk, delete the old data.



If Windows is installed, then to remove Linux, you must remove the hard disk partitions that correspond to the system to be deleted.



How is this process carried out?

You need to load Windows (log in account   administrator). Next, click Win + R, and then open the "Disk Management" utility by entering "diskmgmt.msc". it is now necessary to select partitions that belong to Linux. Click on each of them with the right button and delete.

Not only the section is deleted, but all information stored in it.



The board

If any important files are stored on the deleted system, then copy them to a flash card, or transfer them to partitions belonging to Windows.

After the partitions are deleted, a space will appear that needs to be allocated to the Windows environment. To expand the section, you must right-click on the desired section and select "Expand". Next, specify the volume to which you want to expand the section. If you do not want to expand the existing sections, you can simply create new ones.



Bootloader recovery

After that, the computer must be restarted, but Windows will not start. Together with Linux, the boot loader was removed. This is not an error, but only a consequence of installing Linux in windows environment. During the installation, you can see that there is a second system, therefore, removing Linux will also remove the bootloader. And now it needs to be installed through the installation windows disk. We connect a disk on which the distribution kit is stored. Go to the "System Restore" section, where you need to select " Command line". To restore the bootloader, you must enter two commands:

  • To create bootrec / bootmbr boot entry
  • To write the boot sector to the bootrec / fixboot system partition

After each command, you must press the "Enter" key. Now the bootloader is restored, and the system will be started. In case of installation new version   Linux, you will need to do the same steps.

Conclusion:

You can remove the system in several ways. The simplest is to install a new one on top of the old system. If you need to remove Linux in the Windows environment, then you need to remove partitions that belong to Linux in disk management and reallocate free space on Windows.


   Uninstalling linux and reinstalling Windows

If you installed Linux, and then realized that you are not yet ready to work in an unknown environment, then you will definitely have a question about how to get rid of new system. Let's see how to remove Linux if it was installed next to Windows or was the only installed system on the computer.

Uninstall Linux

The easiest way to get rid of Linus is to install it on top of Windows using disk formatting. Consider the procedure on the example of installing Windows 7 (details about this can be found in the article how to install Windows 7 from a USB flash drive). After choosing the type of installation and accepting the license agreement, the wizard will offer to specify the partition where the system will be installed.

You can re-partition the disk or use existing partitions. In any case, after installing Windows, no Linux traces will remain on the computer. Instead of Windows, you can put another version of Linux. The principle is the same: during installation, you need to re-partition the disk, deleting all old data.

Uninstall on Windows

If you have Windows installed, then to uninstall Linux, you need to remove the corresponding sections of the hard disk. This is done like this:



When deleting a section, all information stored on it will be destroyed. Therefore, if you had some important files on Linux, discard them on a USB flash drive or transfer them to those partitions that are used windows system. After deleting partitions, unallocated space will appear. To start using in the Windows environment, it is necessary to expand one of the remaining sections by adding free space to it.

  1. Click on the section that you want to expand, right click.
  2. Select the option "Expand".
  3. Specify the volume to add to the existing section.

Optionally expand existing volume — you can simply create new sectionby assigning him another letter. In any case, the main difficulty awaits you ahead - after a reboot. computer windows will not start. The reason is described above: together with Linux, the bootloader has been removed. You can fix this error using the Windows installation disk.

We have already discussed in detail how to recover start windows   7. Let's try to apply this knowledge to solve a specific problem - after removing Linux, Windows does not load.

  1. Connect the installation flash drive (disk) with the distribution installed by Windows.
  2. Go to the "System Restore" section.
  3. Select the command line tool.

To restore the bootloader, you must enter two commands. After entering each command, do not forget to press Enter:

  • bootrec / fixmbr - a boot record is created.
  • bootrec / fixboot - write the new boot sector to the system partition.

The Windows boot loader has been restored, there should be no more problems when trying to start the system. If you decide to install another version of Linux, then the whole story will repeat: the Windows startup parameters will be written in the general bootloader of the two systems.

Finally, a bit of theory.

Deleting the boot entry is not an error. This is a consequence of installing Linux next to Windows.

Linux, during the installation, sees that there is a second system, and puts it into the list, so that when users turn on the computer, they can choose which environment to boot into. By removing Linux, you are also erasing the boot loader in which the boot file was stored. windows record. Therefore, you have to then use installation disk   to restore the download.

Like this article? Share with friends: