Score:4

How to enable systemd-cryptenroll TPM2 support in Impish Indri

cn flag

Background and Setup:

  • I have installed a fresh copy of Ubuntu 21.10 on my laptop.
  • Before install I cleared the TPM2.0 module from BIOS and during install I enabled SecureBoot.
  • I selected full disk encryption with LVM.
  • At the first bootup after install I enrolled the MOK with the password I selected during the install procedure.

The problem:
I want to unlock the LUKS2 encrypted system drive with the TPM2.0 module.
This should be supported by the command systemd-cryptenroll from the systemd 248.3 package.
However when running the command systemd-cryptenroll --tpm2-device=list the command returns "TPM2 not supported on this build".

Question:
Why do I get this return message and what can I do to enable the TPM2 support.

N0rbert avatar
zw flag
Check https://wiki.archlinux.org/title/Trusted_Platform_Module#systemd-cryptenroll and https://packages.ubuntu.com/search?suite=impish&arch=any&mode=filename&searchon=contents&keywords=cryptenroll .
cn flag
Yes these places have guides for how to achieve what I want but it does not solve the problem with the systemd-cryptenroll command.
karel avatar
sa flag
This bug has been reported on Launchpad: [systemd-cryptenroll does not support TPM2 devices](https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1969375)
Score:0
fr flag

Your version of systemd was built without tpm2 support, you have to find a package version that enables this feature or compile it yourself with the option "-Dtpm2=true".

Score:0
ru flag

I have the same error message, but the TPM is present.

Check the TPM device is present: dmesg | grep -i tpm

The device name is usually /dev/tpm0. Check it.

Enroll

systemd-cryptenroll --tpm2-device=/dev/tpm0 --tpm2-pcrs=7  </path/to/encrypted/luks/device>
cn flag
Are you using the same Ubuntu version? I can also see the TMP module as a device but systemd seems to be compiled without TPM2 support.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.