Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EFI load option UUID #415

Merged
merged 5 commits into from
Sep 12, 2024
Merged

Update EFI load option UUID #415

merged 5 commits into from
Sep 12, 2024

Commits on Sep 10, 2024

  1. tests: Require pytest

    It's now 2024. Pytest is superior to unittest and has been available in
    Debian since at least buster. Just use it. While here, invoke it as a
    module to avoid whatever Debian is naming the CLI entrypoint these days.
    
    https://phabricator.endlessm.com/T31604
    dbnicholson committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    9a7b653 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    795fa23 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. tests: Add EFI variable data

    This is from an Endless VM using TianoCore with Secure Boot enabled
    (and throwaway keys in the databases). A pytest fixture is provided to
    make testing with the data safer.
    dbnicholson committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    b4081f9 View commit details
    Browse the repository at this point in the history
  2. Add eos-update-efi-uuid for updating EFI load option partition UUIDs

    When the partition UUID for the ESP is updated, any load options
    referencing the partition become invalid. Add a tool to update all load
    options using the old partition UUID to the new partition UUID. This
    uses the libefivar and libefiboot packages to access EFI variables and
    interpret the data appropriately.
    
    https://phabricator.endlessm.com/T31604
    dbnicholson committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    26753f0 View commit details
    Browse the repository at this point in the history
  3. repartition: Update partitions in EFI load options

    When the ESP partition ID is regenerated, any EFI load options
    referencing the old partition ID become invalid. While shim's fallback
    will generate a new load option on the next boot, a downstream patch is
    needed to make sure the invalid option is removed.
    
    Rather than having shim cleanup this situation, update the load options
    at the time the partition UUID is changed. Since both the old and new
    UUIDs are known, eos-update-efi-uuid can update only the affected load
    options without changing or deleting load options that aren't affected
    by the UUID change.
    
    Note that this runs eos-update-efi-uuid in verbose mode, which is pretty
    noisy. When we have confidence this is doing the right thing, we can
    drop the -v option.
    
    https://phabricator.endlessm.com/T31604
    dbnicholson committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f2e5767 View commit details
    Browse the repository at this point in the history