User Tools

Site Tools


tech:cheatsheets:linux:luks

This is an old revision of the document!


LUKS

Mount encrypted partition

cryptsetup luksOpen /dev/mmcblk1p3 mmcblk2p3_crypt
mount /dev/vgkubuntu/root /target # use lvdisplay to find the volume

Extend encrypted partition

Setup automatic unlock

apt install -y initramfs clevis clevis-luks clevis-udisks2 clevis-systemd clevis-tpm2 clevis-initramfs
clevis luks bind -d /dev/mmcblkp3 tpm2 '{"pcr_ids":"1,7","key":"rsa"}'
systemctl enable clevis-luks-askpass.path
update-initramfs -u -k all

Regenerate

If automatic unlock does not work anymore it needs to be regenerated. First list the used slots:

clevis luks list -d /dev/nvme0n1p3

Then regenerate the used slot:

clevis luks regen -d /dev/nvme0n1p3 -s 1

References

tech/cheatsheets/linux/luks.1705303959.txt.gz · Last modified: by waldemar

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki