Page MenuHomeFreeBSD

loader.efi: devinit() just after parsing args instead
ClosedPublic

Authored by kevans on Wed, Oct 7, 11:31 PM.
Tags
None
Referenced Files
F175296150: D60449.id189002.diff
Fri, Oct 9, 6:22 PM
F175270518: D60449.id189015.diff
Fri, Oct 9, 3:01 PM
F175270513: D60449.id189002.diff
Fri, Oct 9, 3:01 PM
F175258791: D60449.diff
Fri, Oct 9, 12:25 PM
F175231193: D60449.diff
Fri, Oct 9, 7:08 AM
Unknown Object (File)
Thu, Oct 8, 4:55 PM
Unknown Object (File)
Thu, Oct 8, 6:55 AM
Unknown Object (File)
Thu, Oct 8, 6:53 AM
Subscribers

Details

Summary

c4640126f1160 ("loader.efi: Apply command-line DHCP overrides earlier")
was really good, but moving it just one statement earlier is even
better. polarian on Libera describes a GELI setup on a system that
doesn't advertise a serial console via ConOut. They don't have serial
input at the point that they would get prompted for the GELI passphrase,
but if we parse args just before devinit() then he can override the
console with efibootmgr -e. This gives UEFI one advantage over BIOS
loader, as /boot.config isn't available to provide that kind of override
if your impediment is GELI.

We also considered reading loader.env earlier, but we have a chicken/egg
problem in that we must have probed for the ESP to be able to open() it.
We would instead need a devinit_early() and devinit_late() scheme that
allows GELI probing to be deferred until the later pass, after reading
loader.env to pick up the console override. That's an idea I'd still
like to discuss because it's more robust than hoping that firmware won't
wipe out our efibootmgr(8) entries.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable