EFI variable LoaderDevicePartUUID

1,002 views
Skip to first unread message

Gylstorff Quirin

unread,
Oct 12, 2022, 7:30:38 AM10/12/22
to efibootg...@googlegroups.com
Hi,

is there a reason why efibootguard currently does not set the efi
variable `LoaderDevicePartUUID`[1]?

If not available Systemd currently prints:

```
[ 35.709366] systemd-gpt-auto-generator[978]: EFI loader partition
unknown, exiting.
[ 35.709371] systemd-gpt-auto-generator[978]: (The boot loader did not
set EFI variable LoaderDevicePartUUID.)
[ 36.226852] systemd-gpt-auto-generator[1011]: EFI loader partition
unknown, exiting.
```


This would allow a mapping between the boot and rootfs partition as
systemd could use the information to mount it to /efi[2].

[1]: https://systemd.io/BOOT_LOADER_INTERFACE/
[2]: https://wiki.archlinux.org/title/systemd#GPT_partition_automounting

Kind regards

Quirin

Jan Kiszka

unread,
Oct 12, 2022, 7:53:49 AM10/12/22
to Gylstorff Quirin, efibootg...@googlegroups.com
On 12.10.22 13:30, Gylstorff Quirin wrote:
> Hi,
>
> is there a reason why efibootguard currently does not set the efi
> variable `LoaderDevicePartUUID`[1]?

First time I hear about, possibly other contributors as well.

Where does this var come from? Only from systemd? It's not part of the
UEFI spec. Does grub-efi or other bootloaders set it as well?

Jan

>
> If not available Systemd currently prints:
>
> ```
> [   35.709366] systemd-gpt-auto-generator[978]: EFI loader partition
> unknown, exiting.
> [   35.709371] systemd-gpt-auto-generator[978]: (The boot loader did not
> set EFI variable LoaderDevicePartUUID.)
> [   36.226852] systemd-gpt-auto-generator[1011]: EFI loader partition
> unknown, exiting.
> ```
>
>
> This would allow a mapping between the boot and rootfs partition as
> systemd could use the information to mount it to /efi[2].
>
> [1]: https://systemd.io/BOOT_LOADER_INTERFACE/
> [2]:  https://wiki.archlinux.org/title/systemd#GPT_partition_automounting
>
> Kind regards
>
> Quirin
>

--
Siemens AG, Technology
Competence Center Embedded Linux

Jan Kiszka

unread,
Oct 12, 2022, 8:26:32 AM10/12/22
to Gylstorff Quirin, efibootg...@googlegroups.com
On 12.10.22 13:53, Jan Kiszka wrote:
> On 12.10.22 13:30, Gylstorff Quirin wrote:
>> Hi,
>>
>> is there a reason why efibootguard currently does not set the efi
>> variable `LoaderDevicePartUUID`[1]?
>
> First time I hear about, possibly other contributors as well.
>
> Where does this var come from? Only from systemd? It's not part of the
> UEFI spec. Does grub-efi or other bootloaders set it as well?
>

Seems to be a systemd-only show and, no, grub does not join it.

Also that spec is a bit unclear /wrt what type this variables should
have. Very likely EFI_VARIABLE_BOOTSERVICE_ACCESS +
EFI_VARIABLE_RUNTIME_ACCESS. But also EFI_VARIABLE_NON_VOLATILE? I would
assume not, and I hope so as well - to avoid writing the variable
storage needlessly.

Problem: Will likely not work with U-Boot as this stage is that one
comes without UEFI runtime services IIUC.

Jan

Gylstorff Quirin

unread,
Oct 12, 2022, 9:13:02 AM10/12/22
to Jan Kiszka, efibootg...@googlegroups.com
we will deactivate `systemd-gpt-auto-generator` to avoid the error
messages during boot up.

Quirin

Jan Kiszka

unread,
Oct 12, 2022, 10:02:34 AM10/12/22
to Gylstorff Quirin, efibootg...@googlegroups.com
What are distributions doing? Most of them are on grub by default and
should see the same issue.

Gylstorff Quirin

unread,
Oct 13, 2022, 2:42:52 AM10/13/22
to Jan Kiszka, efibootg...@googlegroups.com
The systemd-gpt-auto-generator only runs if `root=`[3] is not set in the
commandline. So most distributions do not see the message.


[3]:
https://manpages.debian.org/experimental/systemd/systemd-gpt-auto-generator.8.en.html#KERNEL_COMMAND_LINE

Quirin
Reply all
Reply to author
Forward
0 new messages