Fedora 38 Bootloader install error

Hello!

Trying to dual-boot Fedora 38 and Windows 10.
During the installation the error popped up:
"The following error occurred while installing the boot loader. The system will not be bootable. Would you like to ignore this and continue with installation?

Failed to set new efi boot target. This is most likely a kernel or firmware bug."

I proceed and after rebooting GRUB Menu appears but there’s no Fedora entry
(only Windows and UEFI Firmare Settings).

Already tried to update grub config files with mkconfig.

I am Using UEFI. Tried manual and automatic partitioning.

This issue is in most linux distros which I’ve tried to install (Ubuntu, Manjaro).

What’s the issue, and can i fix this?

My guess would be that you are not booting Fedora’s grub but some other grub you have installed.

Try going into your BIOS and changing the EFI boot priority to put Fedora’s at the top.

It seems likely you have a BIOS/firmware issue that doesn’t let software change the priority.

I have no other grubs installed, after deleting Ubuntu i rebuilt windows boot files

I would still check your BIOS.

Maybe the output of efibootmgr will provide a clue

There have been cases where there was so many entries that you could no longer add another entry. Some UEFI implmentation will aggressively remove boot entries which refers to non-existing files in the ESP. A lot does not do so.

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0001,0000,0002,2001,2002,2003
Boot0000* Fedora HD(4,GPT,2b4d4fc9-8b8b-4566-baac-c80ebc956c17,0x74337800,0x2c0000)/File(\EFI\fedora\shim.efi) File(.䍒)
Boot0001* Windows Boot Manager HD(5,GPT,2b4d4fc9-8b8b-4566-baac-c80ebc956c17,0x74337800,0x2c0000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000026000100000010000000040000007fff0400
Boot0002* Linpus lite HD(2,GPT,596bfe18-6cfc-4880-ba96-298703c7c362,0x3e31d0,0x5d24)/File(\EFI\Boot\grubx64.efi)RC
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0001,0000,0002,2001,2002,2003
Boot0000* Fedora HD(4,GPT,2b4d4fc9-8b8b-4566-baac-c80ebc956c17,0x74337800,0x2c0000)/File(\EFI\fedora\shim.efi)
Boot0001* Windows Boot Manager HD(5,GPT,2b4d4fc9-8b8b-4566-baac-c80ebc956c17,0x74337800,0x2c0000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot0002* Linpus lite HD(2,GPT,596bfe18-6cfc-4880-ba96-298703c7c362,0x3e31d0,0x5d24)/File(\EFI\Boot\grubx64.efi)RC
Boot2001* EFI USB Device RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network RC

This seems that boot0000, boot0001 and boot002 are accessing the ESP (efi file system) on partition 4, 5, 2 respectively. I would expect them to refer to the same partition.

And what do i need to do?

It appears that you are trying to boot Fedora from the wrong place in the ESP it should be /boot/efi for Fedora to be able to boot using Grub2.

You also do have another Linux booting from \EFI\Boot\.

There are times when the flash ram that the Bios is residing on (usually two chips it seems) can fill up with items, not just boot entries and prevent the addition of another OS, even Windows. To clean it up you do need to mount the system. I haven’t tried this on a dual boot system, but had to do it on my Lenovo E530 when trying to switch it from Windows to Silverblue, or Guix.

In your case I would strongly recommend trying to reinstall Fedora with the installation media or if this is WS there should be the ability to select Repair an Installed System from the installation media at the beginning of the process.
Mine looks like this …

Screenshot from 2023-05-28 07-22-08
As you can see the mount point needed by Fedora is /boot/efi

What’s WS and how to clean up it?
Also i don’t have any other linuxes(atleast i build a new efi partition after deleting Ubuntu)

Hi, WS (Work Station) so not the variants like Silverblue etc… Remnants of your previous install are showing what you posted above as I noted. The Live Image I believe is also able to provide recovery, but since I haven’t had to use it recently, I cannot say for certain. So If I was doing the install myself, and intending to dual boot Windows with Linux, I would mount my efi partition with possibly the live image and delete manually the EFI/Boot dir and create a /boot/efi dir. Then I would unmount it and restart the Fedora installation. If it fails at the same point, I would look at what the specific failure was (ie it has no space to install the bootloader, or the ESP is not laid out as Fedora expects.) To see the failure you will need to do it while in the installation (don’t answer the dialog and use a terminal), or mount the Fedora root of your install to see what is in /tmp since there should be a file holding the pertinent debug info. The reason it failed. Without the specific reason, no one here can give you any more detailed answers to help recover. Note that it is important that the ESP partition is mounted as /boot/efi for Fedora to boot correctly.

I am a real noob so not fully understood.
Wouldn’t deleting EFI/boot brake anything?

I need to run

mount dev/sda*
rm EFI/Boot
mkdir /boot/efi
unmount dev/sda*

And then restart and try to install?

Result of ls /tmp after mount -a:

anaconda.log
dbus.log
dbus-xS19S3Sm
dbus-XtKVCucj
dnf.librepo.log
packaging.log
program.log
storage.log
storage.state
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-bluetooth.service-aDOUCN
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-bolt.service-IlOjYi
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-chronyd.service-5EfXCV
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-colord.service-zFiZVG
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-dbus-broker.service-HYGwRy
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-low-memory-monitor.service-bICYHM
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-ModemManager.service-hQDvb7
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-power-profiles-daemon.service-uCXtD3
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-rtkit-daemon.service-cAztGf
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-switcheroo-control.service-Vq7lrQ
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-systemd-logind.service-dj6s4r
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-systemd-oomd.service-nGr1hG
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-systemd-resolved.service-sFO7mJ
systemd-private-505d91d3d1914eb0a5206dbd75954ca1-upower.service-AzKVZs
Temp-451dafc8-3c8e-406e-8fc8-08114c7dc67c

First, if you are not comfortable with what I suggested, please don’t start removing anything. So the anaconda.log file should have the results of the installation process to review. You’ll want to look at the part that shows writing the bootloader to see the actual error.

how to copy in NANO

how to copy in nano

I would use cat anaconda.log | grep "grub" to just get the grub related items. It should be the last couple of lines of the file I would think.

Just restarted and the anaconda.log disappeared. I need to reinstall?

Sorry, but that is not correct. The file names here are relative to the mountpoint, that is, when the full path name is /boot/efi/EFI/fedora/shim.efi and the mount point is /boot/efi/ the file path name as seen from the UEFI firmware will be /EFI/fedora/shim.efi and as it wants backslashes, \EFI\fedora\shim.efi. Think of it, the UEFI firmware doesn’t care how you mount the ESP file system, or if you mount it at all.

So how i fix the error?