Re: UEFI: How to go about updating the ESP with loader.efi during installworld

From: Warner Losh <imp_at_bsdimp.com>
Date: Sun, 4 Nov 2018 15:56:25 -0700
On Sun, Nov 4, 2018 at 2:43 PM Rebecca Cran <rebecca_at_bluestop.org> wrote:

> On Sunday, 4 November 2018 14:36:13 MST Toomas Soome wrote:
>
> > it is reasonable to have efi/freebsd directory, the efi/boot/bootx64.efi
> is
> > hard one of course. But then again, it is problem only when we can not
> > setup EFI bootmanager variables ? the bootx64.efi is default when bootmgr
> > is not set up.
>
> Yes, I think we should only create efi/boot/boot{x64,ia32,aa64,arm}.efi if
> it
> doesn't already exist in which case we're likely the only OS on the system.
>

I think that's a really really bad idea. We should *NEVER* create them by
default. We are only sliding by on the coat-tails of compatibility by using
efi/boot/boot*.efi. We shouldn't use those at all, unless there's a
compelling reason (like BIOS bogosity) for doing so. I had no plans to
update or use those, at least by default. We should *ONLY* be using those
for *REMOVABLE* media, since that's the only place they are well defined in
the standard.

We should only create files in efi/freebsd and using efibootmgr(8) to point
at those. That was my end-goal and it was how to get there that tripped me
up and got me distracted from finishing things up.

Now, if people want to also create those files, to work around bogus BIOS
interpretations of the standard[*], that's fine. We shouldn't preclude
that. We maybe should have a script to do it even, but we shouldn't do it
by default. We should assume that things can be done the right way and only
enable fallbacks on an opt-in basis (and likely not part of installworld,
though I can see it is a tempting idea).

Warner

[*] I'm looking at you Supermicro
Received on Sun Nov 04 2018 - 21:56:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC