2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-10-20 06:35:33 +00:00

Fix Ubuntu encrypted OS volume setup

Actually install the dependencies needed, and correct path to detect need to re-seal when PCRs requested
This commit is contained in:
Jarrod Johnson
2026-08-11 11:46:37 -04:00
parent e3dbdbd44d
commit ae664717e4
2 changed files with 2 additions and 2 deletions
@@ -24,7 +24,7 @@ source /etc/confluent/functions
confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|awk '{print $2}')
if [ -e /etc/confluent/luks.key ]; then
tpm2pcrs=""
encryptboot=$(grep ^encryptboot: /target/etc/confluent/confluent.deploycfg | sed -e 's/^encryptboot://' -e 's/ //g')
encryptboot=$(grep ^encryptboot: /etc/confluent/confluent.deploycfg | sed -e 's/^encryptboot://' -e 's/ //g')
case "$encryptboot" in
*pcrs=*)
tpm2pcrs=$(echo "$encryptboot" | sed -e 's/.*pcrs=//' -e 's/:.*//')
@@ -111,7 +111,7 @@ if [ -f /etc/confluent_lukspass ]; then
cp /etc/confluent_lukspass /target/etc/confluent/luks.key
chmod 000 /target/etc/confluent/luks.key
lukspass=$(cat /etc/confluent_lukspass)
chroot /target apt install libtss2-rc0 tpm2-tools
chroot /target apt-get install -y libtss2-rc0 tpm2-tools
PASSWORD=$lukspass chroot /target systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs="" $CRYPTTAB_SOURCE
fetch_remote systemdecrypt
mv systemdecrypt /target/etc/initramfs-tools/scripts/local-top/systemdecrypt