Uninstalling GRUB from UEFI laptop
Solution 1:
I realize you've fixed the problem, but I want to point out what went wrong and how it should be fixed (both by end users and by Ubuntu's developers).
First, Ubuntu's developers have decided -- most unwisely -- to create a GRUB configuration that relies on files in the Ubuntu root (/
) partition, as well as on the EFI System Partition (ESP). This makes GRUB vulnerable to removal of or damage to the Linux partition, and therefore makes it difficult to boot the computer after removing Ubuntu or if the Ubuntu installation is damaged in some way. This vulnerability is unnecessary; it is possible to configure GRUB to look for all its support and configuration files on the ESP. If GRUB were configured in this way (as Fedora does), then deleting Ubuntu would not affect GRUB's ability to redirect to Windows. The system would still boot through GRUB, but it would at least still boot. So, shame on Ubuntu for setting GRUB up the wrong way.
Second, based on the filenames you mentioned, you seem to have run Ubuntu's Boot Repair tool at some point. This tool automatically renames the Windows boot loader, EFI/Microsoft/Boot/bootmgfw.efi
, and places a copy of GRUB in its place. It does the same thing with the EFI fallback boot loader, EFI/BOOT/bootx64.efi
, and drops another copy of GRUB in as EFI/Microsoft/Boot/bootx64.efi
, for reasons that I don't claim to fathom. This is a done as a workaround for a bug in a handful of EFIs. The trouble is that Boot Repair does this by default. On most computers, it is not necessary. When it's subsequently desirable to make changes to the boot configuration, this renaming and replication of GRUB becomes a complication, since users are left guessing about what's going on. So, shame on Boot Repair's developers for being unsubtle about their repairs. (In their defense, though, it would be very difficult for Boot Repair to reliably detect which computers have the bugs that require moving boot files in the way that it does by default.)
One more point is important: In a properly-functioning EFI system, a list of boot programs is held in NVRAM. The EFI tries each of the programs in this list in sequence; if one fails or is absent, the next one is tried. When Ubuntu installs, it adds its version of GRUB to the top of the list. Most EFIs also enable users to specify which boot program to use from a built-in boot manager, but this built-in boot manager is crude on most EFIs.
Sum all these factors up, and the simplest solution to the original problem becomes:
- Undo the Boot Repair tool's changes. This can be done using the Boot Repair tool itself; it has an Advanced Options menu with a check-box called "Restore EFI Backups". Use that and the multiple copies of GRUB will be removed and Windows' boot loader will be restored. Alternatively, this can be done manually. Most importantly, the backup of
bootmgfw.efi
(probably calledbkpbootmgfw.efi
, although some versions of Boot Repair have used other names) should be copied toEFI/Microsoft/Boot/bootmgfw.efi
on the ESP. - Delete GRUB in its official/proper location --
EFI/ubuntu/grubx64.efi
for Ubuntu. If Secure Boot was active, deletingEFI/ubuntu/shimx64.efi
would be necessary instead. In fact, deleting the wholeEFI/ubuntu
directory, or at least renaming it, would do the job in any case.
That's it. With those two things accomplished, the EFI will skip the Ubuntu boot option because it's not longer valid and go on to boot Windows. Some EFIs will also automatically remove the Ubuntu boot option from their boot managers' menus, too, although this practice is not universal.
Note that in your case, Matthew, I don't recommend doing these things; you've got a working configuration, and as they say, "if it ain't broke, don't fix it." You may have a few stray files left on your ESP, but they aren't doing any harm, so it's best to just leave it alone. I've presented my answer in the hope that somebody else will find it useful.
EDIT: The above was correct when I first wrote it, and the principles remain the same; however, Boot Repair no longer automatically renames the Windows boot loader and replaces it with another copy of GRUB. (Boot Repair can do this optionally, but the option is buried on an advanced options menu, so it's no longer done by default.) This fact makes recovery from this problem easier today than it was in 2013. In most cases, you need only delete the EFI/ubuntu
directory on the ESP to make the system boot directly to Windows. If GRUB still appears after you do this, you may have used the Boot Repair option to back up and rename boot files, in which case using it to undo those actions is in order, as noted earlier.
Another option is to use the computer's built-in boot manager (usually accessed by hitting a function key, Esc, or Enter soon after you turn on the computer) to bypass GRUB and boot to Windows. You can then use EasyUEFI to adjust the boot order and/or delete the ubuntu
entry from the boot list. This action won't delete GRUB from the ESP, but it will bypass GRUB.
Solution 2:
I know this thread is old, but I came across it in my own search when trying to solve this problem for myself, and I found a solution that worked for me when none of the other answers had so I needed to share!
I had dual-booted Ubuntu on my laptop alongside Windows 10. I decided to remove Ubuntu, and had deleted it's partition, but grub still kept interrupting my boot loader. After trying numerous suggestions left on forums, I finally just came across an insanely simple, and graphical way to remove it on my own lol. (So, disclaimer, I have no idea if any other versions of Windows has this option or not)
But all I did was F12 while the computer was booting to get into the boot options. And under Other Options I selected BIOS Setup. On the left-hand side I selected Boot Sequence and right there it listed my different boot options, and I could select them to change their order or remove them or whatever I wanted. All I had to do was make sure only "ubuntu" was marked, and then I clicked Delete Boot and exited. It continued to the log-in screen and I restarted my laptop just to double check it solved my problem and it had!
Solution 3:
Okay, so this won't work for every computer I assume, but this is what fixed it for me.
First, I booted to "System Recovery" through the BIOS options on my laptop. This allowed me to get into Windows, however whenever I booted after that I got a message saying No partition active
for a second before Windows booted. I got rid of this by doing the following:
- Booting into Windows
- SHIFT + Clicking "Restart"
- Troubleshooting
- Advanced
- Command prompt
- Running
bootrec.exe /fixmbr
and rebooting. Now the message no longer appears and everything seems normal.