Re: UEFI, loader.efi and /boot.config

From: Warner Losh <imp_at_bsdimp.com>
Date: Fri, 18 Jan 2019 10:10:50 -0700
On Fri, Jan 18, 2019 at 8:27 AM Rodney W. Grimes <
freebsd-rwg_at_pdx.rh.cn85.dnsmgr.net> wrote:

> > On Fri, Jan 18, 2019, 12:49 AM Kurt Jaeger <pi_at_opsec.eu wrote:
> >
> > > Hi!
> > >
> > > > With a recent change I made for UEFI, we now install loader.efi onto
> the
> > > ESP and don???t run boot1. That means that /boot.config is no longer
> read,
> > > and so console settings need to be put in /boot/loader.conf
> > >
> > > Which change is that ?
> > >
> >
> > Moving from boot1.efi to loader.efi. loader.efi never looked at it.
> > loader.efi honors the uefi env vars to set the console which replaces the
> > old way.
> >
>
> So it sounds like what we need is some documentation that covers:
>
> a)  If your using mbr/bios boot and /boot.config you need to move
> your settings from /boot.config to /boot/loader.conf
>

You don't need to do that. There's good technical reasons you might want to
keep what you have because of order of evaluation. The legacy BIOS handoff
need not change at all.


> b)  If your using uefi boot and /boot.config you need to migrate
> your settings from /boot.config to uefi env vars foo bar and zep
>
> Or did I get loss in the twisty maze of changes?
>

If you migrate from using boot1.efi (which is on the way out: 13 will be
its last release and it won't be used by default anymore) to loader.efi
(which is used by default as of recently) you need to do something if you
set your console via /boot.config (or /boot/config). Both boot1.efi and
loader.efi automatically honor whatever the console is set in UEFI to.
loader.efi has always allowed you to change it when loader.conf is read in.
loader.efi has been further enhanced to guess the proper FreeBSD device
from the UEFI variables for the console when not overriden by loader.conf.
It's all a cluster of a mess, to be honest, and what the handoff formats
are between the different stages is, at best, poorly defined.

Oh, and to add "fun" to the mix, you can get the same /boot.conf behavior
from loader.efi (and I think boot1.efi) if you pass load options into the
BootXXXX variable (though I don't think that efibootmgr does that now: it
can display them, but I don't think it encodes them). This is done because
of the current handoff between boot1.efi and loader.efi. Chances are good
we should (a) document this and (b) enhance efibootmgr to grok setting
options here because that would be the natural successor to /boot.config
for people that have super-special needs that the defaults don't cover.

Nailing down all the issues like this is why I didn't retire boot1.efi in
12.

Warner

> Warner
> >
> > > I was wondering if people will expect /boot.config to still be read and
> > > so code should be added to loader to continue to parse it, or if
> > > loader.conf can be considered the correct place and boot.config
> forgotten
> > > about?
> > >
> > > I have quite a few systems using /boot.config, but can cope if I know
> > > about this.
> > >
> > > --
> > > pi_at_opsec.eu            +49 171 3101372                    One year to
> go !
>
> --
> Rod Grimes
> rgrimes_at_freebsd.org
>
Received on Fri Jan 18 2019 - 16:11:03 UTC

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