heads/initrd/etc
Thierry Laurion f43fe1a836 initrd/bin/kexec-seal-key initrd/etc/luks-functions: last fixups
- fi misplaced
- rework reencryption loop
- added verbose output on TPM DUK key addition when LUKS container can be unlocked with DRK

Current state, left todo for future work:

TPM DUK:
- TPM DUK setup on defautl boot reuses /boot/kexec_key_devices.txt if present
- If not, list all LUKS partitions, asks user for selection and makes sure LUKS passphrase can unlock all
- Works on both LUKSv1 and LUKSv2 containers, reusing OS installer settings (Heads doesn't enforce better then OS installer LUKS parameters)

LUKS passphrase change/LUKS reencryption:
- Reuses /boot/kexec_key_devices.txt if existing
- If not, prompts for LUKS passphase, list all LUKS containers not being USB based and attempt to unlock all those, listing only the ones successfully unlocked
- Prompts user to reuse found unlockable LUKS partitions with LUKS passphrase, caches and reuse in other LUKS operations (passphrase change as well from oem factory reset/re-ownership)
- Deals properly with LUKSv1/LUKSv2/multiple LUKS containers and reencrypt/passphrase changes them all if accepted, otherwise asks user to select individual LUKS container

Tested on luksv1,luksv2, btrfs under luks (2x containers) and TPM DUK setup up to booting OS. All good

TODO:
- LUKS passphrase check is done multiple times across TPM DUK, reencryption and luks passphrase. Could refactor to change this, but since this op is done only one reencrypt+passphrase change) upon hardare reception from OEM, I stopped caring here.

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
2024-10-30 14:18:20 -04:00
..
distro etc/distro/keys/tails.key: signing key changed again... 2024-10-16 18:33:02 -04:00
ash_functions flash.sh: FLASHROM_OPTIONS->FLASH_OPTIONS: require FLASH_OPTIONS to specify flash program in board configs 2024-10-29 08:58:09 -04:00
fstab fstab, init: Remove securityfs mount 2023-03-13 14:11:02 -04:00
functions /etc/functions:mount_possible_boot_device; punch exclusion of mount attempt on partitions <2Mb (4096 sectors) 2024-09-09 10:45:27 -04:00
group Build the Heads/NERF firmware for the Dell R630 server. 2017-09-20 10:29:14 -04:00
gui_functions GUI scripts: add whiptail_error and whiptail_warning since https://github.com/linuxboot/heads/pull/1787 fixed the issue 2024-10-30 14:18:20 -04:00
hosts localhost should be defined 2018-02-09 12:05:49 -05:00
luks-functions initrd/bin/kexec-seal-key initrd/etc/luks-functions: last fixups 2024-10-30 14:18:20 -04:00
mke2fs.conf Add external/usb disk encryption (adds exfatprogs and e2fsprogs) 2023-08-28 16:23:48 -04:00
motd restore /etc/motd 2018-03-08 01:14:41 -05:00
mtab add /etc/fstab and /etc/mtab to initrd image 2017-04-10 12:59:24 -04:00
passwd recovery, passwd: Use /bin/sh for interactive shells 2023-03-08 12:45:51 -05:00
shells Build the Heads/NERF firmware for the Dell R630 server. 2017-09-20 10:29:14 -04:00