5

Trying to install ubuntu on a laptop. The "bios/uefi" has no uefi boot options & the windows boot manager just kicks in. The only "option" is "boot from hard disk". So we tried to use efibootmgr to put grub to boot first.

When we run an efibootmgr -o xxxx,xxxx,xxxx command it seems like the order gets fixed but on reboot the windows boot manager still has control, then when we re-opened the live usb & checked the boot order it remains unaffected.

What are other ways to change the efi boot order? Maybe by mounting the efi partition (in mnt) and doing what?

842Mono
  • 9,790
  • 28
  • 90
  • 153
  • If you use the EFI menu (some function key at power-on) and select Ubuntu (or maybe HDD, then Ubuntu on the next menu), does it boot? What make/model is the laptop? Did your install replace the /EFI/Boot/bootx64.efi with a copy of shimx64.efi or grubx64.efi (it was originally a copy of Windows' bootmgfw.efi)? – ubfan1 Feb 25 '17 at 17:01
  • See also https://unix.stackexchange.com/questions/289527/uefi-firmware-resetting-bootorder – Robin Green May 19 '18 at 13:49

1 Answers1

5

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, the bcdedit tool in Windows, or the third-party EasyUEFI tool in Windows, will get the job done when efibootmgr 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 the mvrefind 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.
Rod Smith
  • 44,284
  • 7
  • 63
  • 105