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

UEFI bootloader updates seem broken #297

Open
ArrayBolt3 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #299
Open

UEFI bootloader updates seem broken #297

ArrayBolt3 opened this issue Dec 23, 2024 · 2 comments · May be fixed by #299

Comments

@ArrayBolt3
Copy link

grml-debootstrap currently installs grub-efi-amd64-signed when building an image with EFI boot support. However, it does not install grub-efi-amd64 itself, which means that the actual GRUB installation won't be updated when the GRUB package is updated. As the grub-efi-amd64-bin package description warns:

 This package contains GRUB modules that have been built for use with the
 EFI-AMD64 architecture, as used by Intel Macs (unless a BIOS interface has
 been activated).  It can be installed in parallel with other flavours, but
 will not automatically install GRUB as the active boot loader nor
 automatically update grub.cfg on upgrade unless grub-efi-amd64 is also
 installed.

grub-pc, on the other hand, is installed by default, which means that the BIOS bootloader will be updated properly. Sadly grub-pc and grub-efi-amd64 can't be installed at the same time, so you can't have both bootloaders be continuously updated. Of the two, I'd argue the UEFI bootloader is the more important one to keep continuously up-to-date, because it's the one that has Secure Boot implications, while grub-pc doesn't.

Furthermore, while grml-debootstrap installs the bootloader to the removable media location by default using the --removable switch, the grub2/force_efi_extra_removable debconf variable isn't being set. This means that even if grub-efi-amd64 is installed, the fallback bootloader won't be updated when GRUB updates, potentially leaving security issues.

(Note: This isn't an issue that can be solved entirely in grml-debootstrap. In my testing, even installing grub-efi-amd64 and setting the debconf variable correctly wasn't working to get UEFI bootloader updates to work on an image built with grml-debootstrap. I don't understand why, but suspect it may be a bug in Debian's grub-efi-amd64.postinst script.)

@zeha
Copy link
Member

zeha commented Jan 2, 2025

We should see what is actually a bug in grml-debootstrap and whats an Debian issue.

@ArrayBolt3
Copy link
Author

I've determined that there is not actually a Debian bug here. grub-efi-amd64's postinst only runs a GRUB installation if the distribution-specific bootloader directory exists. For instance, on Debian, the bootloader will only be installed when configuring grub-efi-amd64 if /boot/efi/EFI/debian exists. If that directory does not exist, the bootloader will not be installed during package configuration, not to the normal path and not to the removable media path.

@ArrayBolt3 ArrayBolt3 linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants