I'm having an issue setting the boot order as I want it to be on my multi boot computer containing Windows 10 - Ubuntu 15.10 - Fedora 23.

Here is what I've done : I use to have only a dualboot with Windows 10 and Ubuntu 15.10 that was working as expected :

  • I could configure it, and for example set up a theme.
  • I could easily boot on an USBLive.

As I was wanting to try other linux distributions, I've installed Fedora 23.

It occured that Fedora take the power upon the boot. I've first needed to change Fedora boot config, remplacing linux and initrd by linuxefi and initrdefi in order to boot on Ubuntu, as explained here.

I can then access to all of the OS installed on my computer. But I want to give back the boot power to Ubuntu.

So I've first try boot-repair launched from Ubuntu, but it is not efficient.

I've then try to use efibootmgr :

$ sudo efibootmgr 
Mot de passe [sudo] pour xavier : 
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0004,0006,0000,0007,0001,0002,0003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002  UEFI: IP4 Qualcomm Atheros PCIe Network Controller
Boot0003  UEFI: IP6 Qualcomm Atheros PCIe Network Controller
Boot0004* Fedora
Boot0006* grub
Boot0007* ubuntu

Then I've tried on both Ubuntu and Fedora to change the order :

$ sudo efibootmgr --bootorder 0006,0004,0000,0001,0007,0002,0003
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0006,0004,0000,0001,0007,0002,0003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002  UEFI: IP4 Qualcomm Atheros PCIe Network Controller
Boot0003  UEFI: IP6 Qualcomm Atheros PCIe Network Controller
Boot0004* Fedora
Boot0006* grub
Boot0007* ubuntu

But on reboot, the change I've made with efibootmgr don't apply, and if I ask again efibootmgr for the bootorder, it will give me the one with Fedora...

I think the issue may come from differents parameters that I don't really understand such as :

  • What is the difference between efi boot, grub and grub2
  • What is the impact of the secureboot ?
  • What is the legacy boot ?

Thank to anyone that can give me some help to obtain a clean set-up.

EDIT : Rod Smith's answer make me realise that I can obtain more information with the -v argument :

$ sudo efibootmgr -v
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0004,0006,0000,0007,0001,0002,0003
Boot0000* Windows Boot Manager  HD(2,GPT,e0e2d47c-9086-47d6-b1e5-0ec248d9d6f0,0x12c800,0x96000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.}...3................
Boot0001* ubuntu    HD(2,GPT,e0e2d47c-9086-47d6-b1e5-0ec248d9d6f0,0x12c800,0x96000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0002  UEFI: IP4 Qualcomm Atheros PCIe Network Controller    PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(448a5b4783b6,0)/IPv4(<->,0,0)..BO
Boot0003  UEFI: IP6 Qualcomm Atheros PCIe Network Controller    PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(448a5b4783b6,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0004* Fedora    HD(2,GPT,e0e2d47c-9086-47d6-b1e5-0ec248d9d6f0,0x12c800,0x96000)/File(\EFI\FEDORA\SHIM.EFI)
Boot0006* grub  HD(2,GPT,e0e2d47c-9086-47d6-b1e5-0ec248d9d6f0,0x12c800,0x96000)/File(\EFI\GRUB\SHIMX64.EFI)
Boot0007* ubuntu    HD(2,GPT,e0e2d47c-9086-47d6-b1e5-0ec248d9d6f0,0x12c800,0x96000)/File(\EFI\UBUNTU\GRUBX64.EFI)

Thanks to this post from Rod Smith, I've understand the role of both ubuntu entries. But the grub one, seems to be unwanted as the file doesn't exist :

$ ls -a
.  ..  Boot  fedora  Microsoft  MSI  ubuntu

I should maybe erase it ?

I've then try an different order :

$ sudo efibootmgr --bootorder 0001,0004,0000,0006,0007,0002,0003

But sadly, the changes doesn't work.

Then if I well understand Rod Smith answer, the unique solution is to wipe fedora entry ? That would maybe cause some problems if one day I want to keep only fedora, but until that time, it would allow me to boot on USBLive ?

Thank again !


I'll begin by answering the questions at the end of your post:

  • EFI-mode booting uses the firmware's native boot mode, whereas BIOS/CSM/legacy-mode booting uses the Compatibility Support Module, which permits booting older BIOS-mode boot loaders. See this question and my answer to it on superuser.com for more on this subject.
  • GRUB is one of several EFI-mode boot loaders for Linux. (There are also versions of GRUB for BIOS and other firmware types.) GRUB Legacy, aka GRUB 1, was never officially supported for EFI, although Fedora did have a heavily-patched version that's now abandonware. Thus, most references to GRUB in an EFI context refer to GRUB 2.
  • Secure Boot is an optional EFI feature intended to improve system security by blocking an EFI from launching binaries that are not cryptographically signed by a trusted authority. In principle, this authority could be you; or it could be somebody else. In practice, Microsoft holds the only commonly-available keys for Secure Boot, and so controls the process. Fortunately, Microsoft will sign third-party binaries, and Ubuntu has used this to have Microsoft sign a binary called Shim that, in turn, includes Canonical's key, which is used to sign GRUB and the Linux kernel in Ubuntu. Note that, when dual-booting two Linux distributions, neither distribution's Shim will include the key for the other distribution. Thus, you must register the other distribution's key with the Machine Owner Key (MOK) list, which you can do with the MokManager.efi utility under EFI. I think the sb-updatevar utility can do this in Linux, too, but I have less experience with it. See here for several keys in one handy place; you'd need .cer or .der keys. See my page on Secure Boot for more on this subject.

As to your main problem, the efibootmgr -o (or efibootmgr --bootorder) command should give control to whatever boot program you specify. Note, however, that you probably meant to give to control to Boot0001 or Boot0007, not Boot0006 -- Ubuntu uses the name ubuntu, not grub, to describe its own boot entries. You can better identify each of these by typing sudo efibootmgr -v, which produces complete paths to the boot entries (identified using EFI path identifiers, which are long and complex and refer, among other things, to partitions' GUID numbers, which you can get with gdisk or some versions of blkid). Thus, before you do anything else, you might want to try changing the boot order to the correct value, rather than to Boot0004.

In practice, efibootmgr changes sometimes fails to work because of buggy EFIs or corrupted data in the machine's NVRAM (which is where the data that efibootmgr displays and adjusts is stored). Three solutions to such problems are commonly employed:

  • Wipe unwanted entries -- Sometimes deleting an unwanted or duplicate entry, as in sudo efibootmgr -b 0004 -B to delete Boot0004, will fix a problem. (You might or might not actually want to delete this entry, though.) Sometimes you may need to delete multiple boot entries to get the system working again. Do not delete entries you need to boot, though. Also, most computers have entries that the firmware itself creates, like the two Network Controller entries in your output. Deleting those entries is generally inadvisable.
  • Reset the firmware to its defaults -- Most EFIs provide an option to reset all settings to their defaults in the firmware setup utility. (What some people call the "BIOS setup screens" or something similar -- although EFIs are technically not BIOSes, despite the fact that many people, and even manufacturers, often refer to them as such.) The drawback to this approach is that it's likely to wipe out all the EFI entries, rendering the system unbootable until you use an emergency disk to restore at least one working entry.
  • Piggyback your boot loader on another entry -- This approach involves copying or moving/renaming your desired boot loader to use the filename of whatever the EFI insists on launching. It's generally used when an EFI refuses to launch anything but the Windows boot loader, so it shouldn't be necessary in your case.

Stepping back a bit further, though, I'll say that it really shouldn't matter which GRUB you use (Fedora's or Ubuntu's); they're basically the same software. If you're having problem configuring Fedora's GRUB to do what you want, you could always tweak its settings -- but OTOH, GRUB 2 configuration is notoriously difficult once you move beyond some very basic things. For this reason, many people who dual-boot multiple Linux distributions prefer to have a distribution-independent boot loader -- either their own GRUB or something else. My own rEFInd boot manager has several advantages for such configurations, such as a lack of reliance on configuration files to detect kernel updates and its independence from any given OS's configuration scripts. That said, if you're having trouble getting efibootmgr to switch from one GRUB to another, you might also have problems getting rEFInd (or any other boot loader) to launch. Also, if you're using Secure Boot, you may need to register at least one Secure Boot key with your MOK to get rEFInd to work. For that matter, if the reason you want to switch to Ubuntu's GRUB is that Fedora's GRUB won't launch Ubuntu's kernels, then the issue is most likely Secure Boot; adding the Secure Boot key for Canonical/Ubuntu should overcome that problem.


Boot0001 is the entry that's most likely to do what you want, so it should go at the start of your boot list; but it sounds like that's not working for you.

If you can live with leaving Fedora in charge of the boot process, it might be best to do so, lest you end up creating a cascade of new problems. Certainly outright deleting the Fedora entry is risky, since if you then can't get anything else to work, you may be left unable to boot anything.

You might try disabling Secure Boot, assuming it's currently enabled, since that feature can cause problems, particularly on complex setups.

  • Thank you very much for such a complete answer ! What really bother me with this actual configuration, is that I can't boot easily on a LiveUSB, and that it appear that I'm not really able to choose how it is configurate... As you propose, I've use efibootmgr -v to obtain some more information. Therefore I've edited my question, and that would be very nice, if you could, once again, answer it. – Xavier C. Apr 26 '16 at 16:32
  • Please see my edit, above. – Rod Smith Apr 26 '16 at 22:42

I've finally, thank to Rod Smith's help, found a solution to choose the boot order that I want.

As he mentionned to disable the Secure Boot, I've access the bios settings, and as expected, the Secure Boot was already disable, but I've taken the opportunity to be in the bios/uefi settings to change without efibootmgr the boot order.

Then I have choosen to boot first on usb device, and then I've set an order for the boot on the hard disk, with ubuntu first, and it work !

So I clearly think that when efibootmgr is not able, for whatever reason, to change the order, going directly into the bios/uefi settings might be the best options, and not a really difficult one.

I hope this could help others.

Thanks again for your help.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.