- I have a Ryzen 5 7600X and an Asus AMD B650E motherboard. I'm not sure what hardware details will ultimately be relevant here.
- Profile default/linux/amd64/23.0/hardened/selinux
- Rootfs on ZFS, with a single pool spread across 2 SSDs in RAID-Z1
- Redundant EFI System Partitions on each of the SSDs. Within Linux, I mirror them using mdraid.
- I'm using the distribution kernel and creating a UKI using dracut. I have USE="secureboot modules-sign" enabled globally.
I've been trying to get SecureBoot to work for the first time, off and on for a couple weeks.
- SecureBoot is enabled in my firmware and set to "other OS" mode. I can see the certs that I've installed from within Linux listed in the firmware UI.
- I initially installed gentoo-kernel-bin and followed the Secure Boot wiki page, somehow missing the pointer to sbctl and creating and installing a bunch of certificates manually. I've since switched to sbctl, but just so you know, I've been messing around for a while and may very well have broken something.
- Believing that I had done this correctly and still seeing "Secure Boot disabled" in dmesg, I thought that what I was missing was module signing. I went through a few iterations here before switching to gentoo-kernel and creating a key for this purpose roughly as described on the wiki. Having done this, I see that key loaded into /proc/keys and listed as the signer for each loaded module. I do not see unsigned modules as a taint reason in /proc/sys/kernel/tainted. I believe that module signature verification is working as intended.
- When this was insufficient, I kept looking around and discovered sbctl. I then walked through the sbctl process, which I think is substantially similar to what I was initially doing, hopefully with fewer mistakes. I can run sbctl verify, and it will show that BOOTX64.EFI and the kernel I'm going to boot are signed.
- That still didn't change the results. My SECUREBOOT_SIGN_KEY and SECUREBOOT_SIGN_CERT are pointed at the db key and cert generated by sbctl, so I expected that rerunning emerge --config gentoo-kernel would produce signed images. However, after running this command, sbctl verify says that the resulting .efi files are not signed.
- I have not tried to get Shim working yet, because I'd prefer not to install one more blob and because I didn't think what I've done so far would take this long. If installing my own keys proves intractable, I'm open to trying Shim.
- ESP_PATH=/efi sbctl verify shows all files in /efi are signed.
-
Code: Select all
$ sbctl status Installed: sbctl is installed Owner GUID: ... Setup Mode: Disabled Secure Boot: Disabled Vendor Keys: microsoft - dmesg and bootctl concur that Secure Boot is disabled.
Any idea what I'm doing wrong here? Is there a way to get more visibility into this process?
tl;dr: I followed the instructions to enable SecureBoot, but it's still disabled, and I can't tell why.
Solved: The firmware only enables Secure Boot when "OS Type" is set to "Windows UEFI Mode." To enable Secure Boot with custom keys, you need to
- Set OS Type to Windows UEFI Mode and Secure Boot Mode to Custom
- Clear the keys from the firmware UI to put Secure Boot in setup mode
- Boot Linux and go through the sbctl setup process
- Reboot

