Repository navigation
A method for dealing with the "sign in place" problem #513
jwodder
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've come up with the following signing setup that should avoid the problem discussed in #228 while still keeping maintenance mostly automated. These steps aren't universal; specifically, they assume the following setup:
mkinitcpiois used to generate a UKI/efiImportant
I have NOT tested this, and I will not be able to test this for some time. Part of the reason I'm posting this is in the hopes of getting feedback as to whether this works properly.
Steps:
Edit
/etc/mkinitcpio.d/linux.preset(which should already have been edited to create a UKI) and change the value ofdefault_ukifrom/efi/EFI/Linux/arch-linux.efito/boot/arch-linux.efi.Create the file
/etc/initcpio/post/sbsignwith the contents:Make the file executable.
Delete the
mkinitcpioandpacmanhooks installed bysbctlat/usr/lib/initcpio/post/sbctland/usr/share/libalpm/hooks/zz-sbctl.hook. Then, ensurepacmanwill not reinstall them by adding the following to the[options]section of/etc/pacman.conf:(Note that the paths given to
NoExtractdo not start with a leading slash.)zz-sbctl.hookaround if you have other EFIs to sign. This hook just runssbctl sign-all -g, so it should just re-sign the UKI from/bootfor placement in/efi, which shouldn't cause any problems other than redundant CPU cycles.Run
sudo mkinitcpio -p linuxto regenerate the UKI. An unsigned copy of the UKI will be placed at/boot/arch-linux.efi, and another copy signed for Secure Boot will be placed at/efi/EFI/Linux/arch-linux.efi.Afterwards, whenever a package update triggers
mkinitcpio'spacmanhook,mkinitcpiowill run, creating & signing a new UKI.If the kernel configuration is ever changed manually (e.g., if
/etc/kernel/cmdlineis edited), rebuild & sign the UKI by runningsudo mkinitcpio -p linuxagain.Thoughts?
All reactions