This is a step towards supporting unified kernel images (UKI) in Grub. Add a new module named boot_loader_interface, which provides a command with the same name. It implements a small but quite useful part of the Boot Loader Interface [0]. This interface uses EFI variables for communication between the boot loader and the operating system.
This module sets two EFI variables under the vendor GUID 4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: - LoaderInfo: contains GRUB + <version number>. This allows the running operating system to identify the boot loader used during boot. - LoaderDevicePartUUID: contains the partition UUID of the EFI System Partition (ESP). This is used by systemd-gpt-auto-genereator [1] to find the root partitions (and others too), via partition type IDs [2]. This is especially useful for UKIs, where the kernel command line is fixed and usually does not contain any information about the root partition. This module is only available on EFI platforms. [0] https://systemd.io/BOOT_LOADER_INTERFACE/ [1] https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html [2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Oliver Steffen (2): efi: add grub_variable_with_attributes Add a module for the Boot Loader Interface grub-core/Makefile.core.def | 6 + grub-core/commands/boot_loader_interface.c | 217 +++++++++++++++++++++ grub-core/kern/efi/efi.c | 19 +- include/grub/efi/efi.h | 6 + 4 files changed, 242 insertions(+), 6 deletions(-) create mode 100644 grub-core/commands/boot_loader_interface.c -- 2.39.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel