mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-06 17:47:07 -08:00
This makes it possible to create a pre-built grub EFI executable signed for secureboot via portage/`secureboot.eclass`. It greatly simplifies setting up grub with secureboot, which is now a bit of a tricky section in the handbook, and makes it possible to get a signed grub EFI executable on systems that do not have the `SECUREBOOT_SIGN_KEY` available via a `sys-boot/grub[secureboot]` binpkg. Unfortunately, since the use of boot partitions, and the mounting point of ESP's varies between systems we cannot rely on the default `/boot/grub/grub.cfg` location to configure grub. Instead the standalone executable reads the `grub.cfg` in the same directory it is in. It is then up to the user to either: - configure `sys-kernel/installkernel` to put the `grub.cfg` in a different location via `GRUB_CFG=`, or - add a little `grub.cfg` that chainloads the real `grub.cfg`. To make this even easier we could write some wrapper around grub-install which would optionally install the prebuilt standalone EFI executable plus an appropriate little `grub.cfg` to chainload the usual `grub.cfg`. But lets leave that for later. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/38007 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>