[systemd-devel] EFI loader partition unknown

Lennart Poettering lennart at poettering.net
Fri May 10 14:56:03 UTC 2019


On Do, 09.05.19 14:50, Chris Murphy (lists at colorremedies.com) wrote:

> > mounting logic only works if the boot loader tells us which partition
> > it was booted from. This is an extra check to ensure that we only
> > mount the correct ESP, the one that was actually used. In other words,
> > this only works with a boot loader that implements the relevant part
> > of https://systemd.io/BOOT_LOADER_INTERFACE.html i.e. the
>
> I'm willing to bet 99% of the world's computers have one ESP. In fact
> I'd be surprised if it's even 1% that have 2 or more. I'm not
> convinced the UEFI spec really sanctions 2 or more ESPs even if it's
> not outright proscribed. The language of the spec consistently says
> there's one.

That's not the issue really. It's not protection against having two
ESPs on the same disk. It's protection against having multiple disks
each with an ESP. i.e. consider you forgot to unplug that usb stick
with the usb fedora installer image you just dd'ed onto it. We need to
make sure we don't get confused by that.

> > LoaderDevicePartUUID efi var. We probably should document that better
> > in systemd-gpt-generator(8) though, could you please file a bug about
> > that?
> >
> > In other words: use sd-boot, and all that stuff just works. With grub
> > it doesn't, it doesn't let us know any of the bits we want to know.
>
> OK requiring a specific bootloader really isn't consistent with the
> language used in the discoverable partitions specification. If in
> reality what's needed to automatically mount to /efi is not only a
> partition type GUID but some bootloader specific metadata inserted
> into memory at boot time, that's not a generic solution like the other
> discoverable partition types.
> https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/

Well the spec is intentionally generic and minimalist, so that any
boot loader could implement it, with minimal effort. The fact that
only sd-boot supports it is not great, but it's the only spec for
things like this there is, and we support it hence.

Would be great if somebody with interest in grub could work with their
community to maybe support the spec too, or at least some parts of
it.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list