Skip to content

Instantly share code, notes, and snippets.

@seysn
Created February 21, 2022 16:10
Show Gist options
  • Save seysn/6797857eab369595d815fa39a98a7eb5 to your computer and use it in GitHub Desktop.
Save seysn/6797857eab369595d815fa39a98a7eb5 to your computer and use it in GitHub Desktop.
cat << EOF > /etc/initramfs-tools/hooks/tpm2-decryptkey
#!/bin/sh
PREREQ=""
prereqs()
{
echo ""
}
case \$1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec `which tpm2_nvread`
copy_exec /usr/lib/x86_64-linux-gnu/libtss2-tcti-device.so.0.0.0
copy_exec /usr/lib/x86_64-linux-gnu/libtss2-tcti-device.so.0
copy_exec /lib/cryptsetup/askpass
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment