Skip to content
Snippets Groups Projects
Verified Commit 923d8132 authored by Robotka István Adrián's avatar Robotka István Adrián
Browse files

fix initramfs-hook

parent b42ebd59
Branches
No related tags found
No related merge requests found
...@@ -7,7 +7,8 @@ Source: https://threat.tevora.com/secure-boot-tpm-2/ ...@@ -7,7 +7,8 @@ Source: https://threat.tevora.com/secure-boot-tpm-2/
DO NOT COPY IN ONE!!! DO NOT COPY IN ONE!!!
```sh ```sh
sudo apt install tpm2-tools sudo apt install tpm2-tools
# if you want
#tpm2_clear
./setup-tpm.sh ./setup-tpm.sh
sudo cp passphrase-from-tpm /usr/local/bin/passphrase-from-tpm sudo cp passphrase-from-tpm /usr/local/bin/passphrase-from-tpm
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
if [ "$1" = "prereqs" ]; then exit 0; fi if [ "$1" = "prereqs" ]; then exit 0; fi
. /usr/share/initramfs-tools/hook-functions . /usr/share/initramfs-tools/hook-functions
copy_exec /usr/local/bin/tpm2_unseal copy_exec /usr/bin/tpm2_unseal
copy_exec /usr/local/lib/libtss2-tcti-device.so copy_exec /lib/x86_64-linux-gnu/libtss2-tcti-device.so.0
...@@ -12,7 +12,7 @@ user_pass() { ...@@ -12,7 +12,7 @@ user_pass() {
} }
tpm_pass() { tpm_pass() {
/usr/local/bin/tpm2_unseal \ /usr/bin/tpm2_unseal \
--object-context 0x81000000 \ --object-context 0x81000000 \
--auth pcr:sha256:0,5,7 \ --auth pcr:sha256:0,5,7 \
| tr -d '\n' | tr -d '\n'
...@@ -25,5 +25,5 @@ else ...@@ -25,5 +25,5 @@ else
echo "Unlocking via TPM" >&2 echo "Unlocking via TPM" >&2
tpm_pass tpm_pass
[ $? -eq 0 ] && exit # successful TPM unseal [ $? -eq 0 ] && exit # successful TPM unseal
user+pass user_pass
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment