Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] EFI Secure Boot Build Support
@ 2019-06-16 18:33 voidlinux-github
  2019-06-16 18:36 ` voidlinux-github
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: voidlinux-github @ 2019-06-16 18:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]

New issue by andkem on void-packages repository

https://github.com/void-linux/void-packages/issues/12495
Description: Secure boot using EFI means that the motherboard's firmware verifies
the binaries it loads to prevent unauthorised binaries from being used
tot boot the system. Secure boot using EFI isn't too tricky to set up,
but there are a few ways one can go about doing it.

For an overview of the process of using secure boot via EFI, I can
recommend the following two pages that I find highly informative:

Managing EFI Boot Loaders for Linux: Dealing with Secure Boot
https://www.rodsbooks.com/efi-bootloaders/secureboot.html

Secure Boot with GRUB 2 and signed Linux
https://ruderich.org/simon/notes/secure-boot-with-grub-and-signed-linux-and-initrd

The first link gives an overview of how the process generally works
and talks about the use of shim loaders, while the second link shows
how to use an EFI signed Grub to load a GPG signed Linux.

Personally, I use the second approach. I have replaced the keys in my
motherboard with my own and have signed a Grub binary using adapted
versions of the scripts in the second link. I then use GPG to sign the
kernel and initramfs.

It shouldn't be too much work setting up kernel hooks that perform the
signing. The issue might be deciding if a single model should be
supported or whether different options should be provided via
configurability.

I personally, manually perform these steps:
1. Generating and store EFI keys in motherboard
1.1 Generate EFI keys, using keygen.sh in the linked tar ball
1.2 Store keys in motherboard by loading them in the EFI GUI
2. Creating a signed Grub 
2.1 Create a password to put into grub-initial.cfg using gpasswd.
2.2 Generate a stand-alone Grub with my GPG public key compiled in and sign it using EFI keys. This is done with generate-grub.sh in the linked tarball.
3. Sign my existing kernels, initramfs and Grub boot menu config in /boot using sign.sh in the linked tarball.
4. Enable secure boot

(All scripts are slightly adapted from the previous two links.)

When updating the kernel I manually rerun step 3.

To minimise work to get a working example, one could maybe start by supporting the model described above and then add additional support later if it is deemed necessary. Myself, I haven't tried using the shim loader nor the EFI stub. If Void wishes to pre-sign binaries, I guess the shim route would be the one to go.

The signing scripts I use: https://www.lysator.liu.se/~kempe/secure-boot.tar.gz



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-02-11 15:08 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-16 18:33 [ISSUE] EFI Secure Boot Build Support voidlinux-github
2019-06-16 18:36 ` voidlinux-github
2019-06-16 19:34 ` voidlinux-github
2019-06-17 18:24 ` voidlinux-github
2019-06-17 18:39 ` voidlinux-github
2019-06-18 18:55 ` voidlinux-github
2019-06-18 18:56 ` voidlinux-github
2019-06-18 18:57 ` voidlinux-github
2019-06-20 11:17 ` voidlinux-github
2019-06-20 11:20 ` voidlinux-github
2019-06-20 11:22 ` voidlinux-github
2019-06-20 11:26 ` voidlinux-github
2019-06-20 22:38 ` voidlinux-github
2019-06-20 22:39 ` voidlinux-github
2019-06-20 22:40 ` voidlinux-github
2019-06-21  5:29 ` voidlinux-github
2019-07-01 15:58 ` voidlinux-github
2019-10-03 22:10 ` voidlinux-github
2020-07-27 14:20 ` unixandria-xda
2020-07-27 14:57 ` sgn
2020-07-28  5:50 ` ericonr
2020-07-28  6:02 ` sgn
2022-04-15  2:12 ` github-actions
2022-04-29  2:13 ` [ISSUE] [CLOSED] " github-actions
2022-07-28  4:47 ` dm17
2023-01-09  6:27 ` thegarlynch
2024-02-11 15:08 ` Izooc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).