-
-
Notifications
You must be signed in to change notification settings - Fork 180
Description
Hey!
This is probably not a bug of this library at all but I'm a bit at a loss: I've been working on adding GRUB support to a bootloader stub for NixOS ( https://github.com/nix-community/lanzaboote ) but I've run into an issue.
We embed into our stub some configuration to be able to continue a verified chain (e.g. initrd and kernel hashes).
To do this we use this snippet:
get_image_file_system(boot_services.image_handle())
which returns NOT_FOUND when chainloaded after GRUB.
Now GRUB's chainloader is pretty simple: the usual LoadImage()
followed by StartImage()
, as simple as it gets really.
So I was wondering whether GRUB was forgetting to set some EFI vars before continuing or if for some reason set_image_handle
was not correctly setting up the handle?
The code works as-is under systemd-boot and only fails under GRUB, so something is definitely amiss there.
This can be repro'd with this PR: nix-community/lanzaboote#96
You will need to install nix and run nix flake check -L
in the repository.
The relevant usage of the library is here:
https://github.com/nix-community/lanzaboote/blob/master/rust/stub/src/uefi_helpers.rs#L31-L58
So yeah, sorry if none of this is a bug here at all, I'm just a bit confused by this whole situation.
Thanks in advance for your time!