efibootmanager -o changes are lost on reboot
Solution 1:
This problem is often caused by a flaky EFI implementation, although sometimes it could be argued that it's an efibootmgr
bug. Possible solutions include:
- Upgrade your firmware -- Check with the manufacturer to see if a firmware upgrade is available, and if so, apply it and try again. Note that the upgrade might wipe out the NVRAM pointer to GRUB (or whatever you're using to boot Ubuntu), so you should be prepared with an emergency boot plan (Boot Repair or rEFInd on a removable disk, for instance).
-
Use another tool -- Sometimes another tool, such as a boot-order option in the computer's built-in setup utility, the
bcfg
command in an EFI shell, thebcdedit
tool in Windows, or the third-party EasyUEFI tool in Windows, will get the job done whenefibootmgr
in Linux won't. - Return the computer for one that works -- If you get this far and are still having problems, I recommend you return the computer for one that works. This is obviously only an option if the computer is new enough to be within the store's free-return period. If you go this route, be sure to write to the manufacturer to tell them why you've returned the computer; they won't be motivated to actually fix problems like this unless they feel some pain from returns and know why those returns occurred.
-
Hack the boot files -- As a last resort, you can move/rename boot files so that the Windows boot loader (
EFI/Microsoft/Boot/bootmgfw.efi
on the ESP) lives somewhere else and GRUB, Shim, rEFInd, or whatever you're using lives at that name instead, with any follow-on or configuration files it needs in the same directory. Boot Repair has an option to set this up semi-automatically on its Advanced area; and you can do it semi-automatically for rEFInd with themvrefind
command that comes with rEFInd, once rEFInd is installed. - Re-install in BIOS/CSM/legacy mode -- OK, I lied; the above wasn't quite the last resort, but it's the last semi-easy solution. It's also often possible to re-install all your OSes in BIOS/CSM/legacy mode, or at least to convert them to boot in this way. This task is likely to be very tedious, though, so it's not something I recommend unless you want to re-install for some other reason anyway.