-
create key
mkdir -p /var/lib/shim-signed/mok cd !$ openssl req -newkey rsa:4096 -noenc -keyout MOK.key -new -x509 -sha256 -days 3650 -subj "/CN=my Machine Owner Key/" -out MOK.crt openssl x509 -outform DER -in MOK.crt -out MOK.cersign efi
sbsign --key MOK.key --cert MOK.crt --output /efi/EFI/Linux/grubx64.efi /efi/EFI/Linux/grubx64.eficopy efi
cd /efi/EFI/Linux/ cp /usr/share/shim-signed/shimx64.efi BOOTx64.EFI cp /usr/share/shim-signed/mmx64.efi . cp /var/lib/shim-signed/mok/MOK.cer . efibootmgr --unicode --disk /dev/nvme0n1 --part n --create --label "Shim" --loader "\EFI\Linux\BOOTx64.EFI"Edited by Takumi -
setup LUKS auto unlocking with TPM
Generate recovery key
systemd-cryptenroll --recovery $lukswipe password slot
systemd-cryptenroll --wipe-slot=password $luksAdd luks keyfile
keyfile=/path/to/keyfile cryptsetup luksAddKey $luks $keyfile # require existing password !!! systemd-cryptenroll $luks --tpm2-device=auto --unlock-key-file $keyfile # require existing password !!!reset tpm
systemd-cryptenroll --wipe-slot=tpm2 $luksEdited by Takumi -
setup refind with bitlocker support
doas refind-install --shim /usr/share/shim-signed/shimx64.efi sbsign --key MOK.key --cert MOK.crt --output /efi/EFI/refind/grubx64.efi /efi/EFI/refind/grubx64.efi/efi/EFI/refind/refind.confmenuentry "Windows" { icon /EFI/refind/icons/os_win8.png # efibootmgr Boot{Number} firmware_bootnum 0000 }Edited by Takumi
Please register or sign in to comment