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

check for non-availability of EFI variables #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jan 26, 2023

  1. util: provide function is_efivars_writable()

    Provide a function to determine if UEFI variable can be written.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    c9b75b6 View commit details
    Browse the repository at this point in the history
  2. util: check for non-availability of EFI variables

    Some UEFI firmware does not support EFI variables at runtime.
    In this case directory /sys/firmware/efi/efivars does not exist.
    This would lead to an exception when calling efibootmgr.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    fb7984e View commit details
    Browse the repository at this point in the history
  3. tests: mock is_efivars_writable in TestInstallGrub

    In the GRUB install test mock a writable efivars directory.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    428ac19 View commit details
    Browse the repository at this point in the history
  4. install_grub: check for non-availability of EFI variables

    Some UEFI firmware does not support EFI variables at runtime.
    In this case directory /sys/firmware/efi/efivars does not exist.
    This would lead to an exception when calling efibootmgr.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    0e4c521 View commit details
    Browse the repository at this point in the history
  5. tests: mock is_efivars_writable in TestChrootableTargetMounts

    In test_chrootable_target_default_mounts_uefi() mock a writable efivars directory.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    b543732 View commit details
    Browse the repository at this point in the history
  6. util: is_uefi_bootable() does not imply EFI variables exist

    A system may be booted via UEFI but not provide EFI variables at runtime.
    
    In this case directory /sys/firmware/efi exists
    but directory /sys/firmware/efi/efivars does not exist.
    
    We should not try to mount the non-existent directory.
    This implies that we should not add an efibootmgr command in
    gen_uefi_install_commands().
    
    Suggested-by: Dan Bungert <[email protected]>
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    fc7ae57 View commit details
    Browse the repository at this point in the history
  7. curthooks: check for non-availability of EFI variables

    Some UEFI firmware does not support EFI variables at runtime.
    In this case directory /sys/firmware/efi/efivars does not exist.
    This would lead to an exception when calling efibootmgr.
    
    Signed-off-by: Heinrich Schuchardt <[email protected]>
    xypron committed Jan 26, 2023
    Configuration menu
    Copy the full SHA
    14ab8f8 View commit details
    Browse the repository at this point in the history