Hi all,
Linux newbie and recent Tumbleweed adopter. Please feel free to assume a minimum level of knowledge and/or experience. I welcome corrections and pointers, but may struggle with jargon-dense documentation.
During my installation, I created a single LVM-managed LUKS encrypted root volume, and found myself entering two passwords: once during boot (cannot recall at precisely which stage of the process, and I did not take photos), and then another post-boot for the actual desktop environment login screen. I initially followed the guidance outlined within SDB:Encrypted root file system, which had no effect. After re-reading the above (and some forum posts, which I also unfortunately did not retain links to), I came to the conclusion that this was perhaps normal, and that I had been experiencing the standard/minimum possible number of logins to begin with.
However, I recently had to rebuild the initrd for an unrelated reason (sudo dracut -f), after which point I was only asked for one password, specifically for the desktop environment login only. There is no longer any password prompt during the booting process itself.
Should I be concerned about this, i.e. did I end up including the decryption key in an area of my disk that leaves my root vulnerable to decryption by anyone with physical access to the device?[1]
Commands entered to add root key file the first time around:
sudo touch /.nvme0n1p2.key
sudo chmod 600 /.nvme0n1p2.key
sudo dd if=/dev/urandom of=/.nvme0n1p2.key bs=1024 count=1
sudo cryptsetup luksAddKey /dev/nvme0n1p2 /.nvme0n1p2.key
sudo nano /etc/crypttab
echo -e 'install_items+=" /.nvme0n1p2.key "' | sudo tee --append /etc/dracut.conf.d/99-root-key.conf > /dev/null
sudo dracut -f
Current contents of /etc/crypttab:
cr_nvme-eui.01000000000000008ce38e040126dddc-part2 UUID=c5916411-34d4-4979-aaf3-f44100fe7fef /.nvme0n1p2.key x-initrd.attach,tpm2-device=auto,tpm2-measure-pcr=yes
Output of lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 953.9G 0 disk
âânvme0n1p1 259:1 0 1G 0 part /boot/efi
âânvme0n1p2 259:2 0 952.9G 0 part
ââcr_nvme-eui.01000000000000008ce38e040126dddc-part2 254:0 0 952.9G 0 crypt
ââsystem-root 254:1 0 937.5G 0 lvm /var
â /usr/local
â /srv
â /root
â /home
â /opt
â /.snapshots
â /
ââsystem-swap 254:2 0 15.4G 0 lvm [SWAP]
Thank you in advance for your insights/help!
For context, I did read and note the aside on SDB:Encrypted root file system about only following the root key file procedure if /boot is also encrypted, but it was unclear to me whether this requirement held for /boot/efi. âŠď¸