Bug 249320 - UEFI boot fails without EFI variables set
Summary: UEFI boot fails without EFI variables set
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 15:55 UTC by Ed Maste
Modified: 2020-09-15 06:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2020-09-14 15:55:02 UTC
We previously installed boot1.efi as EFI/boot/bootx64.efi in the ESP (on amd64), later changing to installing EFI/freebsd/loader.efi and setting EFI variables to make that bootable. Although this change is correct, it introduces some new boot failure cases.

I encountered this just now, after a failed laptop mainboard. After the tech replaced the mainboard FreeBSD did not boot from the NVMe device as the EFI variables did not make it to the nvram on the new board.

For greenfield ESP installations perhaps we can install loader.efi also as EFI/boot/bootx64.efi, or install a startup.sh that loads EFI/freebsd/loader.efi.
Comment 1 Michael Osipov 2020-09-14 17:35:19 UTC
This is samewhat similar to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247845#c0. I'd to point it the special meaning of EFI/boot/bootx64.efi.
Comment 2 Ed Maste freebsd_committer 2020-09-14 18:22:20 UTC
(In reply to Michael Osipov from comment #1)
That looks like a similar problem from the opposite side. My issue here is that, at least when using ZFS from the installer, we have _only_ EFI/freebsd/loader.efi and an EFI variable referencing it.
Comment 3 Michael Osipov 2020-09-14 19:05:33 UTC
(In reply to Ed Maste from comment #2)

Correct, with UFS it is worse, nothing is set at all. I wasted hours for this, but learned a lot about UEFI and FreeBSD ;-)
Comment 4 Ed Maste freebsd_committer 2020-09-14 20:36:25 UTC
(In reply to Michael Osipov from comment #3)

Did UFS mode still install it as EFI/boot/bootx64.efi?
Comment 5 Ed Maste freebsd_committer 2020-09-14 23:15:10 UTC
https://reviews.freebsd.org/D26428
Comment 6 Michael Osipov 2020-09-15 06:17:15 UTC
(In reply to Ed Maste from comment #4)

Yes, it did.