Ask Your Question

How can I create a EFI Boot Menu Entry using efibootmgr?

asked 2017-09-27 09:45:39 -0500

florian gravatar image

updated 2017-09-27 12:14:12 -0500


I have a dual boot computer with Windows 8 and Fedora 25 using (U)EFI firmware. Something happened so that my BIOS firmware does not show the GRUB bootloader during startup. (I accidentally disconnected power to the sda drive when cleaning the inside of my computer and then turned on the computer - maybe the firmware didn't like that action. At the same time Windows did an update, maybe that's the cause).

By not showing, I mean it doesn't not recognize the GRUB loader at all - when pressing F12 before boot, I see only the Windows Boot Loader.

What I've done so far:

  1. deactivated the "fast boot" option in Windows
  2. started a Fedora 25 Live system
  3. mounted my Fedora installation (/, /boot, /boot/efi)
  4. chrooted into my system and reinstalled packages grub2-efi grub2-efi-modules shim according to the wiki page
  5. created a new GRUB config: grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

The BIOS just doesn't see my grub located in EFI/fedora. What's going on here and how can I fix this issue?

EDIT: I didn't understand the instructions here on how to Create a boot menu entry but it seems that efibootmgr needs to used to add a boot loader to the firmware. Currently it doesn't show Fedora's grub as boot entry.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-09-27 10:36:14 -0500

florian gravatar image

updated 2017-09-27 12:21:16 -0500

One has to use efibootmgr to create a new boot entry for Fedora's grub:

Arch Linux wiki suggests the following, and

efibootmgr --create --disk /dev/sda --part 2 --loader /EFI/fedora/grubx64.efi --label "Fedora Grub" worked fine.

(In my case I use --part 2 because that is my EFI system partition (ESP), --disk is probably not necessary since /dev/sda is already the default).

edit flag offensive delete link more


The command grub2-install would call efibootmgr internally, if I understand correctly.

villykruse gravatar imagevillykruse ( 2017-09-27 11:40:23 -0500 )edit

I was thinking about it but then read on the GRUB2 wiki page that "grub2-install shouldn't be used on EFI-systems".

florian gravatar imageflorian ( 2017-09-27 12:19:31 -0500 )edit

So it does indeed:

grub2-install shouldn't be used on EFI systems. The grub2-efi package installs a prebaked grubx64.efi on the EFI System partition, which looks for grub.cfg on the ESP in /EFI/fedora/ whereas the grub2-install command creates a custom grubx64.efi, deletes the original installed one, and looks for grub.cfg in /boot/grub2/.
villykruse gravatar imagevillykruse ( 2017-09-27 13:15:34 -0500 )edit

answered 2017-09-28 11:48:59 -0500

Do you have two harddrives? In that case both needs to be partitioned using GPT instead of MBR. If not then you only get Windows or if you boot in legacy mode you only get Fedora. This took me quite awhile to figure out. If you boot installation media from a usb drive, then make sure you select the EFI boot. Then I think the installer will do the rest. Otherwise you can specify a boot parameter


to force it to use GPT.

edit flag offensive delete link more


Maybe my question didn't make it clear. All hard drives were and are GPT format, and it is and has always been UEFI-only boot. That wasn't the issue here. Moreover, after a working install, i would not recommend to change between Bios vs. uefi boot process.

florian gravatar imageflorian ( 2017-09-28 21:01:50 -0500 )edit

Question Tools

1 follower


Asked: 2017-09-27 09:45:39 -0500

Seen: 19,145 times

Last updated: Sep 27 '17