2

I just installed fedora 30 on my laptop which has EFI. Before that, Windows was installed, and after the installation of fedora, the boot just disappeared. I am sure that fedora is installed correctly, since I see the bootloader of it (in the partitions section) when I try to reinstall it. Now there is just one message on the black screen saying:

Reboot and Select proper Boot device Or Insert Boot Media in selected Boot device and press a key

I tried to change the BIOS settings. But there is no boot option for fedora. How should I fix this?

Update: I reinstalled fedora, and the problem was fixed. However, the question still remains. Was there a way to fix this without reinstallation?

2 Answers 2

0

I can't post a comment, so let me post this as an answer to be deleted soon instead: I had this exact same problem last week. Could it be the case that you installed Windows in UEFI mode and Fedora in Legacy mode or vice versa?

4
  • I am not a professional user. I am not even sure of that... Aug 12, 2019 at 18:36
  • How did you install Fedora? E.g. Did you use a bootable USB drive?
    – user366662
    Aug 12, 2019 at 18:37
  • Yes, exactly. I used a bootable USB. Aug 12, 2019 at 18:45
  • Did you chose your USB drive in your computer's BIOS before starting Fedora or did your computer just boot to Fedora directly? If the first, do you recall there being two options---say something like "Generic Flash Drive" and "UEFI Generic Flash Drive" (make the substitution "Generic Flash Drive" ---> your USB drive name)---in the BIOS screen?
    – user366662
    Aug 12, 2019 at 20:32
0

This looks like the UEFI NVRAM boot variables were somehow wiped out. There are several ways to recover from that without a reinstallation.

The simplest is probably boot (in UEFI mode) from a Fedora installation media in rescue mode, chroot into the existing installation, and run grub2-install. That will rewrite the GRUB bootloader (+ the Secure Boot shim, if installed) in the EFI System Partition (which is unnecessary in this case but should not hurt) and recreate the NVRAM boot variable pointing to it (which is the actual fix).

If you want to make a future recovery from a similar situation even easier, and are not dual-booting, you could add the --force-extra-removable option. This will add a second copy of the GRUB bootloader/Secure Boot shim as /boot/efi/EFI/BOOT/BOOTx64.efi, which is the UEFI removable-media/fallback boot path for 64-bit x86 hardware: if there are no valid NVRAM boot variables, or you use the BIOS menu to tell the system to boot from a particular disk in UEFI mode, this path is what the system firmware will be looking for.

Another way would be to boot from any Linux media that allows you to use the efibootmgr command. With that, you could rebuild the boot variable with a command like:

efibootmgr -c -d /dev/sdX -p Y -l \\EFI\\fedora\\shimx64.efi -L Fedora

where:

  • /dev/sdX is the disk containing your EFI System Partition (ESP)
  • Y is the partition number of your ESP
  • \\EFI\\fedora\\shimx64.efi is the path to the bootloader .efi file the firmware should be loading, represented as a Windows-style pathname starting from the root directory of the ESP partition. The backslashes are doubled because a single backslash is a special escape character for Unix-style shells.
  • and Fedora is just the human-readable label that will be visible in the BIOS menus.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .