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

How/what to sign so that secure boot can be enabled #44

Open
rickhg12hs opened this issue Mar 2, 2019 · 5 comments
Open

How/what to sign so that secure boot can be enabled #44

rickhg12hs opened this issue Mar 2, 2019 · 5 comments

Comments

@rickhg12hs
Copy link

Do you have a recommended procedure for signing GLIM's bits so that secure boot can stay enabled on systems that I control?

@thias
Copy link
Owner

thias commented Mar 6, 2019

I honestly have no idea. A quick search seems to indicate that it might not be that easy, or even possible at all.

https://askubuntu.com/questions/642653/loopback-module-for-grub-with-secure-boot

If you do find a way, please share! :-)

@ValdikSS
Copy link

ValdikSS commented Mar 9, 2019

See https://github.com/ValdikSS/Super-UEFIinSecureBoot-Disk

Basically, to boot a Linux kernel with Secure Boot enabled with unpached GRUB2 using linux command you don't need to do additional steps. You only need to add GRUB2 certificate into Secure Boot db and boot it.
GRUB2 versions with Secure Boot hardening patches (which are found in Ubuntu and Fedora/CentOS at least) need additional steps/patches, as they either replace linux with linuxefi or boot Linux kernel using UEFI LoadImage and StartImage functions.

@rickhg12hs
Copy link
Author

I've already enrolled a key in the MOK to sign kernel modules I've compiled for Fedora. Am I an easy step away from being able to securely boot from the USB drive?

@ValdikSS
Copy link

It depends on what you want to achieve. If you only want to boot Fedora from HDD or ISO on your current PC with enrolled key, you can probably use signed shim (from shim package) and grub2 (from grub2-efi-x64 package) from Fedora. This bundle does not require key enrolling at all, but it would boot only Fedora.

If you want to boot other Linux distros, you'd better use Super UEFIinSecureBoot Disk. Another option is to use unpached GRUB2 (not from Fedora or Ubuntu) with signed shim <= 0.4, it will boot any Linux distribution after GRUB2 hash or key enrolling using MokManager.

If you don't want to use Microsoft certificate, if you want to take ownership of UEFI platform and enroll your own keys, you can sign your own shim and grub.

@morfikov
Copy link

There's a way. You have to create grub as an image using grub-mkstandalone . In this way there would be just one binary that will be loaded by, for instance, rEFInd and this image should be signed by end user or the hash of the image should be added to the shim's MOK database. Also you can use shim signed by Microsoft. Look at how ubuntu live is booted. It has EFI/BOOT/grubx64.efi and EFI/BOOT/BOOTx64.EFI and one is signed by Canonical and the other by MS. If you have Canonical's cert in firmware's database, you can use the first option to boot. If you only have MS cert, you can boot using the fallback option. Some similar solution would be nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants