From 923d81329fb2631a35e4f43e7ec7bd6eb28ba697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Robotka?= <robotka.adrian@gmail.com> Date: Wed, 5 Aug 2020 10:27:25 +0200 Subject: [PATCH] fix initramfs-hook --- README.md | 3 ++- initramfs-hook | 4 ++-- passphrase-from-tpm | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6501c89..9ef3657 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Source: https://threat.tevora.com/secure-boot-tpm-2/ DO NOT COPY IN ONE!!! ```sh sudo apt install tpm2-tools - +# if you want +#tpm2_clear ./setup-tpm.sh sudo cp passphrase-from-tpm /usr/local/bin/passphrase-from-tpm diff --git a/initramfs-hook b/initramfs-hook index 176912d..76ef473 100755 --- a/initramfs-hook +++ b/initramfs-hook @@ -5,5 +5,5 @@ if [ "$1" = "prereqs" ]; then exit 0; fi . /usr/share/initramfs-tools/hook-functions -copy_exec /usr/local/bin/tpm2_unseal -copy_exec /usr/local/lib/libtss2-tcti-device.so +copy_exec /usr/bin/tpm2_unseal +copy_exec /lib/x86_64-linux-gnu/libtss2-tcti-device.so.0 diff --git a/passphrase-from-tpm b/passphrase-from-tpm index e5ff4b4..b5b8164 100755 --- a/passphrase-from-tpm +++ b/passphrase-from-tpm @@ -12,7 +12,7 @@ user_pass() { } tpm_pass() { - /usr/local/bin/tpm2_unseal \ + /usr/bin/tpm2_unseal \ --object-context 0x81000000 \ --auth pcr:sha256:0,5,7 \ | tr -d '\n' @@ -25,5 +25,5 @@ else echo "Unlocking via TPM" >&2 tpm_pass [ $? -eq 0 ] && exit # successful TPM unseal - user+pass + user_pass fi -- GitLab