Skip to content

Add basic support for the Boot Loader Interface - #117

Closed
osteffenrh wants to merge 3 commits into
rhboot:fedora-38from
osteffenrh:uki-1-impl-boot-loader-interface
Closed

osteffenrh wants to merge 3 commits into
rhboot:fedora-38from
osteffenrh:uki-1-impl-boot-loader-interface

Conversation

@osteffenrh

Copy link
Copy Markdown
Contributor

Add a module for the Boot Loader Interface

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. 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 to find the root partitions (and others
    too), via partition type IDs.

This module is only available on EFI platforms.

Add a function to the EFI module that allows setting EFI varaibles
with specific attributes.

This is useful for marking variables as volatitile, for example.

Signed-off-by: Oliver Steffen <[email protected]>
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 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/

Signed-off-by: Oliver Steffen <[email protected]>
@osteffenrh
osteffenrh force-pushed the uki-1-impl-boot-loader-interface branch from 7b299a6 to 579633b Compare February 10, 2023 13:59
Add a new drop-in file that adds statementes to the grub config file to
load the boot-loader-interface module and run the command in case we are
generating a config for the EFI platform.

Signed-off-by: Oliver Steffen <[email protected]>
@osteffenrh

Copy link
Copy Markdown
Contributor Author

@osteffenrh
osteffenrh marked this pull request as draft February 27, 2023 08:00
@osteffenrh

Copy link
Copy Markdown
Contributor Author

-> #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant