How to remove dual-boot ghost entry from UEFI
After trying dual-boot of Windows 11 and Ubuntu, I decided to remove Ubuntu due to unknown but likely hardware driver issue causing my laptop's fan to be constantly running noisily regardless of nearly zero CPU or low Memory usage. Following the steps from guides available all over the internet, I deleted the Ubuntu partition and extended the Windows partition back to original volume from Disk management tool. However, there is a leftover issue that is the UEFI (BIOS) now has a ghost boot entry for Ubuntu which does not seem to have a straightforward way to be deleted. After searching on the internet for awhile and finally I found below proved to be working reliably.
Steps taken from the original post with notes
- Run the command prompt (
cmd.exe) with administrator privileges- Type
diskpartcommand- [Optional, only if you have multiple disk drives] Type
list diskand thensel disk XwhereXis the drive your boot files reside on- Type
list volto see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)- Select the EFI volume by typing
sel vol YwhereYis the SYSTEM volume (this is almost always the EFI partition)- For convenience, assign a drive letter by typing
assign letter=Z:whereZis a free (unused) drive letter- Type
exitto leave disk partition- While still in the cmd prompt, type
Z:and hit enter, whereZwas the drive letter you just created- Run
dirto list directories on this mounted EFI partition- If you are in the right place, you should see a directory called
EFI- Type
cd EFIand thendirto list the child directories insideEFI- Type
rmdir /S ubuntuto delete the ubuntu boot directory
After these steps, boot into UEFI and confirm from the Boot tab the Ubuntu ghost boot entry is gone.
Check Uninstall GRUB and use Windows bootloader for the original post and many thanks.