1:255.16-alt1
[systemd_ALT.git] / man / fido2-crypttab.sh
blob43654a523644ae58d84e76febc1fa96d7a2da5c3
1 # SPDX-License-Identifier: MIT-0
3 # Enroll the security token in the LUKS2 volume. Replace /dev/sdXn by the
4 # partition to use (e.g. /dev/sda1).
5 sudo systemd-cryptenroll --fido2-device=auto /dev/sdXn
7 # Test: Let's run systemd-cryptsetup to test if this worked.
8 sudo systemd-cryptsetup attach mytest /dev/sdXn - fido2-device=auto
10 # If that worked, let's now add the same line persistently to /etc/crypttab,
11 # for the future. We don't want to use the (unstable) /dev/sdX name, so let's
12 # figure out a stable link:
13 udevadm info -q -r symlink /dev/sdXn
15 # Now add the line using the by-uuid symlink to /etc/crypttab:
16 sudo bash -c 'echo "mytest /dev/disk/by-uuid/... - fido2-device=auto" >>/etc/crypttab'
18 # Depending on your distribution and encryption setup, you may need to manually
19 # regenerate your initramfs to be able to use a FIDO2 device to unlock the
20 # partition during early boot.
21 # More information at https://unix.stackexchange.com/a/705809.
22 # On Fedora based systems:
23 sudo dracut --force
24 # On Debian based systems:
25 sudo update-initramfs -u