mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-30 17:56:58 +00:00
5eee5aa296
.ash_history: add examples to generate keys and otrust in rom flash-gui: export otrust and import it in rom key-init: import otrust.txt if present to supress warning about user public key being untrusted
18 lines
1.2 KiB
Plaintext
18 lines
1.2 KiB
Plaintext
#remove invalid kexec_* signed files
|
|
mount /dev/sda1 /boot && mount -o remount,rw /boot && rm /boot/kexec* && mount -o remount,ro /boot
|
|
#Generate keys from GPG smartcard:
|
|
mount-usb && gpg --home=/.gnupg/ --card-edit
|
|
#Copy generated public key, private_subkey, trustdb and artifacts to external media for backup:
|
|
mount -o remount,rw /media && mkdir -p /media/gpg_keys; gpg --export-secret-keys --armor email@address.com > /media/gpg_keys/private.key && gpg --export --armor email@address.com > /media/gpg_keys/public.key && gpg --export-ownertrust > /media/gpg_keys/otrust.txt && cp -r ./.gnupg/* /media/gpg_keys/ 2> /dev/null
|
|
#Insert public key and trustdb export into reproducible rom:
|
|
cbfs -o /media/coreboot.rom -a "heads/initrd/.gnupg/keys/public.key" -f /media/gpg_keys/public.key && cbfs -o /media/coreboot.rom -a "heads/initrd/.gnupg/keys/otrust.txt" -f /media/gpg_keys/otrust.txt
|
|
#Flush changes to external media:
|
|
mount -o,remount ro /media
|
|
#Flash modified reproducible rom with inserted public key and trustdb export from precedent step. Flushes actual rom's keys (-c: clean):
|
|
flash.sh -c /media/coreboot.rom
|
|
#Attest integrity of firmware as it is
|
|
seal-totp
|
|
#Verify Intel ME state:
|
|
cbmem --console | grep '^ME'
|
|
cbmem --console | less
|