UEFI boot GRUB instead Windows Boot Manager

  • The EFI setup utility — Most EFIs provide setup utilities that you can access by hitting a special key at boot time (Esc, Del, or a function key, typically; but what key it is varies from one system to another). These often, but not always, provide a way to adjust the boot order. If your firmware provides such an option, you should be able to use it to move GRUB to the top position. (GRUB is likely to be called ubuntu, given that you installed it from that distribution.)
  • An EFI shell — You can use the bcfg command in an EFI version 2 shell, as described on the Arch Linux wiki. If your system isn’t already set up with an easy-to-access shell, this approach is likely to be harder to use than the others, but it is OS-agnostic.
  • EasyUEFI — The third-party Windows EasyUEFI program is likely to be the easiest way to do what you want. You can click the ubuntu entry in EasyUEFI’s list and move it to the top.
  • bcdedit — The Windows bcdedit command can alter the NVRAM-based boot order. Specifically, opening an Administrator Command Prompt window and typing bcdedit /set "{bootmgr}" path \EFI\ubuntu\shimx64.efi (optionally followed by bcdedit /set "{bootmgr}" description "ubuntu" to keep the description sensible) should do the trick.
  • efibootmgr — This Linux tool can adjust the boot order. Begin by typing sudo efibootmgr alone to see the options. Note the number (Boot####) associated with the ubuntu entry, and the current boot order (on the BootOrder line). You can then enter a new boot order with the ubuntu entry at the top by using the -o option. For instance, if the current boot order is 0000,0003,0007,0004 and ubuntu is 0007, you’d type sudo efibootmgr -o 0007,0000,0003,0004 to adjust the boot order.
  • refind-mkdefault — This script comes with rEFInd, and it’s a way to automate the preceding procedure. If you’re not using rEFInd, you’d need to download the script here and make it executable (chmod a+x refind-mkdefault). You’d then run it as sudo ./refind-mkdefault -L ubuntu or sudo ./refind-mkdefault -L shimx64 to make GRUB the default boot entry.

There are potential problems and complications with any of these options. The most likely complicating factor is if there are old or alternative ubuntu boot entries. It’s important that you move the correct one to the top position in the boot order; if you move the wrong one, you’ll end up with either no change in behavior or something non-functional booting, which would make it harder to boot. If you use efibootmgr, the BootCurrent line may help you to tell which option you should set as the default.

There are other ways to do it that are overkill. Re-installing GRUB (via Boot Repair or grub-install) should do the trick, for instance. These approaches run the risk of damaging a known-working GRUB configuration, though.

Note also that some EFIs are buggy and there are other issues that can make it difficult to get GRUB to boot reliably. You may want to check out these questions and answers on AskUbuntu if you run into such problems: