Full disk encryption + TPM2

Hi @getchoo and @FStefanni
I tried following these steps and get en error while running cryptenroll:

$ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0 /dev/nvme0n1p2
Failed to load LUKS2 superblock: Invalid argument

or trying with UUID:

$ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0 /dev/mapper/luks-025814c8-3dcf-4bd8-b04f-c2abaeb82644
Failed to load LUKS2 superblock: Invalid argument

Here’s my layout (it’s the default from the NixOS installer):

$ lsblk
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                                             8:0    0   1,8T  0 disk  
├─sda1                                          8:1    0   499M  0 part  
└─sda2                                          8:2    0   1,8T  0 part  
nvme0n1                                       259:0    0 465,8G  0 disk  
├─nvme0n1p1                                   259:1    0   512M  0 part  /boot
├─nvme0n1p2                                   259:2    0 448,1G  0 part  
│ └─luks-025814c8-3dcf-4bd8-b04f-c2abaeb82644 254:1    0 448,1G  0 crypt /nix/store
│                                                                        /
└─nvme0n1p3                                   259:3    0  17,1G  0 part  
  └─luks-d1ccc17e-d9ca-4d5b-83dd-6fd78d93d29b 254:0    0  17,1G  0 crypt [SWAP]

Can you think of what might be the issue here?

1 Like