Secure Boot Issues
Hi,
I've been trying to get secure boot to work with Linux, specifically adding my own PK, KEK, and DB certificates, and it seems to me that this is not working as it should.
When booting Linux (with secure boot still disabled), I can see the installed certificates with efi-readvar
(or mokutil --pk
, etc.), and this shows my own certificates I installed.
However, when trying to validate EFI files with sbverify
, those certificates seem to be ignored. Specifically, I have added the UEFI certificate from Debian, but the Grub bootloader from Debian, signed with that very certificate, still cannot be verified, with sbverify
giving me an error message Signature verification failed
. I can even extract the certificate from the EFI vars, save it to a file, and then feed it to sbverify --cert <cert file> <EFI file>
in which case the validation succeeds, indicating that the certificate is indeed correct.
Another data point that this is not working as intended is that if I use sbverify
on the SHIM, which is signed by Microsoft, the validation succeeds, even though the DB list only contains my custom DB certificate, so the validation should not succeed.
So, generally, it seems that the list of certificates shown in the EFI vars, and what is actually used by sbverify
does not correspond, and seems to fall back on some standard certificates, from what I can tell.
However, I am relatively new to this, so I might still have made a mistake somewhere, but after spending several hours tracking down the problem, it still seems to me that what I've set up should work...
Any help would be greatly appreciated.
Thanks!
Comments
-
Small update: if I then enable secure boot, booting actually fails with a violation error (even though sbverify indicated that the SHIM was valid), unless I add the hash for the SHIM to the DB list. But even then an EFI file signed with my own DB key is still not recognized as valid.
-
Hi there! Thank you for contacting us on our Community. We're working on finding a good solution for you and we'll get back shortly.
-
Hi @rschlegel
Please refer to the link.
https://github.com/up-division/meta-up-board?tab=readme-ov-file#enabling-secure-bootIt will teach you how to add key into kernel and bios.
Best Regards,
Harry Chiu