If you make a mistake when uninstalling Ubuntu, Windows will not start or the process until it starts is troublesome, so A memorandum after working with a firm grasp of how to do it.
-Windows 10 64bit (installed on M.2 SSD, installed first) -Ubuntu 18.04 LTS (installed on HDD, which is a disk different from Windows, and installed later when needed) -BIOS is UEFI -Disk partition is GPT
Since the boot loader is different between Windows and Ubuntu, if you delete the Ubuntu partition while leaving it unattended, the boot loader will not work properly and you will end up in an unbootable state at worst. A boot loader is, so to speak, a trigger for booting. When you install Ubuntu, a boot loader called GRUB is installed and enabled. Windows uses Windows Boot Manager as the boot loader. In my case, I installed Ubuntu with Windows installed first and selected the OS to boot from GRUB. Therefore, if you delete Ubuntu and use it with Windows alone, if you just delete the partition of Ubuntu, Ubuntu will be deleted with GRUB information remaining, and GRUB and Windows Boot Manager will be normal. You should never just delete a partition in a dual boot environment, as it will not boot. This is basically the same for dual boot and multi boot.
First, start the Windows command prompt as an administrator and execute the following command.
C:¥WINDOWS¥system32> bcdedit /enum firmware
Then, boot information will appear, so look for the one that says Ubuntu in the description item. (The following is an example)
Firmware application(101fffff
-------------------------
identifier {3850e5k3-351b-95c3-806e6f6e6963}
device partition=¥Device¥HarddiskVolume13
path ¥EFI¥ubuntu¥SHIMX64.EFI
description ubuntu
If you find an item that says ubuntu, delete it, but since you need an identifier at that time, copy it including the {} part. At this time, be careful not to copy other identifiers! If you delete the wrong one, you may not be able to start Windows.
Then execute the following command.
C:¥WINDOWS¥system32> bcdedit /delete {The identifier you copied earlier}
Then, Ubuntu can be deleted from the boot menu, so execute the following command again and confirm that Ubuntu has been deleted.
C:¥WINDOWS¥system32> bcdedit /enum firmware
You have now deleted the boot information about Ubuntu. If you restart here, Windows will start directly without moving to the GRUB screen.
The EFI partition is a partition required to start Ubuntu, and the BIOS reads the EFI partition when the PC starts, enabling the reading of OS such as Windows and Ubuntu.
Since the EFI partition cannot be deleted from the disk management screen, delete it using diskpart on the command prompt. First, execute the following command.
C:¥WINDOWS¥system32>diskpart
Then, the place where it was C: \ WINDOWS \ system32 changes to the notation diskpart. Next, execute the following command to assign a drive letter so that you can operate the EFI partition.
DISKPART>list disk
Disk State Size Free Dynamic GPT
------ ------ ------ ------ ------ ------
Disk 0 Online 1863GB 1024KB*
Disk 1 Online 1863GB 1024KB*
Disk 2 Online 3726GB 1205GB*
Disc 3 Online 465GB 46GB*
Select the disk that contains the Ubuntu EFI partition. In my environment, it's on disk 2, so I chose it.
DISKPART>sel disk 3
Disk 3 is selected.
Next, select the partition.
DISKPART> list vol
Volume### Ltr Label Fs Type Size Status Info
--------- --- ------ --- ------ ----- ------ ------
Volume 0 F data NTFS Partition 1074GB Normal
Volume 1 G Volume NTFS Partition 788GB Normal
Volume 2 FAT32 Partition 488MB Normal Hide
Volume 3 FAT32 Partition 99MB Normal system
Omitted below
Ubuntu (GRUB) information remains in the place where Info says system. Select this Vol.
DISKPART> sel vol 3
Volume 3 is selected.
There is an Ubuntu directory in the selected Vol, and I want to delete it, but I can't see the contents as it is, so I assign a drive character.
DISKPART> assign letter=Z:
Diskpart has correctly assigned the drive letter or mount point.
Once this is done, exit from DISKPART once. Next, move to the Z drive and there should be an EFI directory, so if you enter it, there is an Ubuntu directory, so delete it with the following command.
Z:¥EFI>rmdir /S ubuntu
Confirm with yes because you will be asked if you want to delete it. The drive character needs to be deallocated, so do the following:
C:¥WINDOWS¥system32> diskpart
DISKPART> sel vol 3
Volume 3 is selected.
DISKPART> remove letter=Z
In order to delete Ubuntu's EFI partition itself, you need to format the HDD itself or use software to delete it.
This method is used because the BIOS was UEFI in my environment, but it seems that the method is different for the legacy BIOS, so I recommend you to take a look at here.
For the time being, I just described the work process, and I do not understand it deeply, so I think that there are many parts that are misinterpreted. I would appreciate it if you could let me know if you noticed it.
How to remove Ubuntu GRUB boot loader on Windows 10 UEFI / Legacy BIOS
Other/Procedure to remove Linux from UEFI boot
Recommended Posts