Sample Header Ad - 728x90

cryptsetup ignoring unknown option 'tpm2-device'

4 votes
1 answer
2400 views
I have been trying to get LUKS disk encryption with TPM2 working on an HP EliteBook 850 G8 running Kali Linux 2022.3. However, I am struggling to get TPM2 disk decryption added to Initramfs. # Steps I have taken so far: * Ensured that TPM2 is enabled and accessible to the OS * Added the TPM as Keystore 1 to the already encrypted hard drive using systemd-cryptenroll --tpm2-device=auto /dev/nvme0n1p3 * Verified the correct LUKS setup by running cryptsetup luksDump /dev/nvme0n1p3 # What fails: Following the steps listed above, I tried to modify the /etc/crypttab to allow unlocking my LUKS2 encrypted disk during boot, similarly to the way Bitlocker works. Therefore, I had changed my crypttab file to the following:
nvme0n1p3_crypt UUID= none luks,discard,tpm2-device=auto
And then tried to rebuild the initramfs using update-initramfs -u -k all, which gives me the following errors:
└─# sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-5.18.0-kali5-amd64
cryptsetup: WARNING: nvme0n1p3_crypt: ignoring unknown option 'tpm2-device'
What baffles me, is that I thought this option should be present in systemd since version 248 and up. Despite having v251 it does not recognize this option. Can anyone shed some light on what is going on here? Is this something specific to Debian-based systems or am I missing something? Any help or hints are highly appreciated. # System environment: ## OS version:
└─# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.3
Codename:       kali-rolling
## Systemd version:
└─# systemd --version
systemd 251 (251.3-1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
Asked by lxndrblz (41 rep)
Sep 1, 2022, 06:54 AM
Last activity: Mar 18, 2025, 04:05 AM