Ubuntu – How to uninstall ubuntu and grub from pre-installed windows 8


I am about to install ubuntu to dual-boot on my pre-installed windows 8 laptop. Before I do, I really need to know how to uninstall ubuntu safely if I don't like it, or if I have to for some reason. I've been searching for an answer to this, but I do not have any sort of windows 8 disc. At all. This laptop came with windows 8, and I have no way to repair anything or things like that.

So how would I go about uninstalling Grub and Ubuntu completely from my computer and restore the windows 8 boot manager with the circumstances that I'm in? I cannot find any solution except booting into the installation CD and repairing things – which I don't have.

Best Answer

Most instructions are for BIOS installs, but if you have pre-installed Windows 8 then you have an UEFI install.

With UEFI, grub does not overwrite Windows boot loader in efi partition but all boot loaders co-exist in efi partition as separate folders.

You need to first check that Windows will directly boot from UEFI menu. If you used tools to reconfigure dual booting or had a system that was not UEFI compliant and forced file renaming to dual boot then you may need to restore Windows efi file.

Best to have Windows 8 UEFI compatible repair flash drive. Windows 8 UEFI repair USB must be FAT32




Windows UEFI install should have backup of bootmgfw.efi here if needed: C:\Windows\Boot\EFI\bootmgfw.efi from a working Windows x86_64 installation.

Generally once you can directly boot Windows from UEFI menu, you have to edit UEFI menu to remove ubuntu entry with either UEFI or with command line efibootmgr. You will have to remove ubuntu folder from efi partition and maybe recovery partition if also copied there. Then you can delete Linux & swap partitions with your favourite Windows partition tools or gparted and use Windows partition editor to expand the Windows NTFS partition or reuse space as a NTFS data partition.

Related Question