Hi, I could use some help troubleshooting my situation post-install on this old work Thinkpad X1E Carbon 3rd Gen. It has Optimus hybrid graphics with an Nvidia card in case the brand/model didn’t give that away.
What I’ve done so far:
Booted from the latest Tumbleweed installer
Customized the launch settings to add “nomodeset” (without this, the installer ends up in a black screen)
Selected KDE Plasma
Customized my partitions referring to FDE, specifically:
/swap: encrypted filesystem, (whatever the default is here, don’t recall), systemd-based, Argon2id, TPM2
Noted that on my 1TB drive, the installer allocated 33% to /, which from what I can find online is way more than needed. I resized down to 40 GiB, then I moved /home “back” before the freed space and expanded it to fill the space freed from /.
Configured my user account, unchecked auto-login
Contrary to the documentation’s claims, at the final Installation Settings screen, GRUB2 BLS was not selected, so I clicked the header and selected it.
Post-installation, the system rebooted and I was not prompted for a password to unlock any partitions. I did get a boot menu with two options:
openSUSE Tumbleweed
Snapper: *openSUSE Tumbleweed
This is unexpected, so help with that would also be appreciated, but that’s not my biggest problem. After I select either one of those, I am presented with a login screen that does not show my user name. When I type in ANY password, right or wrong, and press Enter, I get dumped into a recovery console with the error:
Warning: /dev/mapper/cr_root does not exist
I entered my password here and used journalctl to see if I could see what went wrong, and I do see some errors such as
Failed to add OR policy to TPM
...
Failed to unseal secret using TPM2
...
Failed to activate with specified passphrase
So obviously something is not lining up right. I thought I had followed the setup directions correctly, and I know this laptop has a TPM chip in it (not sure if TPM2). Any pointers as to how I should proceed would be greatly appreciated! The logs might hint that the passphrase is not correct; I was never re-prompted for the passphrase after installing, do I need to manually add it to a file somewhere?
Which is most likely the screen where you enter your LUKS passphrase.
Of course, you are correct, that was the screen to enter my LUKS passphrase. How silly of me! Thank you for that advice. I have a few follow-up questions:
What exactly is the TPM support doing? Is it unlocking the / and /swap partitions but I still get prompted for my /home partition? In a previous install without TPM support, I got prompted twice, so this is an improvement. I just want to understand a bit better.
If I mistype my strong passphrase, I get dumped straight into a recovery session. Exiting just dumps me back there again. So how do I get another chance to type my passphrase in the event I typo?
As for the unexpected boot menu, it’s gone after a successful boot and login.
So how do I get another chance to type my passphrase in the event I typo?
To clarify, I’d prefer a method to return to the login UI, but I’ve used cryptsetup and mount before for virtual disks, so I’m comfortable doing this from the terminal if that’s the only way. I’m just not sure what paths to use.
One final question: is there a way to set things up so that I only need to enter my account login and the FDE is handled by TPM and the passphrase I already set up? I do want the disk resistant to decryption if removed from the laptop, but my account login is sufficiently strong while the disk remains where it is. Thanks!
No. FDE = Full Disk Encryption. This means that User Login cannot even happen before the disk decryption. Furthermore: without encryption a user login is never strong enough. Anybody booting from a USB key can change anything pretty easily.
Thanks. I accept this. Could you explain what the TPM support is actually gaining me here? I observed that I don’t have to enter my LUKS passphrase more than once, and not until after the boot completes. Is that all?
My current desktop has TPM2. An older laptop is from before the TPM era. They both behave the same with respect to FDE.
My understanding is that I could setup my current TPM2 desktop, so that I would not need to provide the FDE passphrase at all. But I have not done that, and I don’t want to do that.
Without TPM anyone can replace kernel and initrd that are unencrypted and unprotected on the ESP. Those kernel and initrd can do anything - capture your passphrase, install rootkit etc. TPM makes it possible to verify kernel, initrd and other components and only allow unlocking when they are not tempered with.
Thanks, that’s the article I linked in my original question, specifically I followed the steps under Detailed instructions for MicroOS and Tumbleweed. I tried to be as detailed as possible describing how I attempted to follow the instructions in case someone here could spot a possible mistake I might have made. That’s what led me to my current state, where I’m presented with a screen where I have only one chance to enter my LUKS password or get dumped into a recovery console that I don’t know how to meaningfully proceed from.
Is this the expected result?
If so, how can I either get more than one chance in case I typo my LUKS password or exit the recovery terminal in a way that will allow me to try again?
If not, could you suggest what I could look at to try to diagnose why it’s not working as expected?
Hmm … looking at the code, it tries first an external key (e.g. using TPM), if it fails it tries the empty passphrase and then it asks user. These are three attempts, the default number. So, it appears to be expected, even when unintentionally.
Try adding tries=10 (or whatever) option to /etc/crypttab (do not forget to rebuild initrd). See man 5 crypttab.
# File created by sdbootutil. Comments will be removed
# Add the 'x-sdbootutil.ignore' option to un-track a device
cr_swap UUID=3399a128-64ed-4686-a4e3-6213af68edf7 none tpm2-device=auto,tpm2-measure-pcr=yes
cr_home UUID=5bbb3a14-48ee-4c52-8aaa-1db8e43a0fb2 none tpm2-device=auto,tpm2-measure-pcr=yes
cr_root UUID=0bdef385-8f66-40f8-a2cd-3ebca38edb48 none x-initrd.attach,tpm2-device=auto,tpm2-measure-pcr=yes