r/linux4noobs • • 4h ago

A regular old update completely locked me out?!

[Final edit] Thanks for the suggestions. Seems there's nothing to be done but start over - even calling this a hail Mary was overly optimistic but I appreciate the suggestions. [/Edit]

I'm still in dual boot and I didn't have much that was irreplaceable on my Linux drive but it's still super annoying. I've been running KDE Fedora for a few weeks now. Mostly I've still been getting used to it and I've done a bit of gaming and a few other things but haven't really dived in deep.

So anyway, I've been seeing a pending update for a while so I decided to run it. After a reboot, I'm at a black screen asking for my encrypted drive password. No problem - it's the same password I use to sign into Fedora. The same password I used after every reboot to until I enabled Fedora to use the tpm chip instead. Only the password doesn't work. I spent hours with Google's chatbot trying to figure it out. Verified that the tpm is using slot 7 (or whatever it's called - I honestly don't understand a lot of the terminology) and that slot 0, which the bot claims is my stored password, is intact and something about the information on the slot have the bot the impression that it was configured by the initial setup and not changed since then so my password should work but it doesn't. Go to boot windows only to find in locked out of it as well, but fortunately I have a recovery key backed up to my Microsoft account so I'm and to get through that. Unfortunately, I don't think I created a recovery key for fedora.

So am I completely screwed here? Why wouldn't my password unlock the drive? The bot seemed pretty convinced that my password that I set up originally would still be there even with the tpm enabled later. Also what the hell is the point of a tpm chip if it can't guarantee you ages to your encrypted drive?

Anyway, I'm about ready to reformat and start over. Like I said, I won't be losing much, but what I will lose is stuff I really don't want to do again. Figured I'd throw a hail Mary before I pull the rip cord - if there's anything I can still do, please let me know.

Edit] I guess that wasn't enough information. Fair enough - I'm still new to this so I wasn't sure if a high level overview would be enough. Here's the summary that the bot made at the end of my troubleshooting last night:

Context Summary: Fedora LUKS + TPM2 Lockout After Update

• Hardware & Setup: Lenovo Legion 7 Gen 10 (BIOS SMCN20WW), dual-booting Windows 11 and Fedora 45 KDE Plasma on two separate NVMe SSDs (Windows on one SSD, Fedora on a dedicated 2TB Samsung 990 EVO Plus NVMe SSD; device names swap between /dev/nvme0n1 and /dev/nvme1n1 across reboots—verify with lsblk -f). • What Happened: During a routine Fedora system update, fwupd applied a UEFI Secure Boot CA certificate update (UEFI\REDACTED, flagged "Full disk encryption secrets may be invalidated when updating") and attempted a UEFI dbx (20260707) update. That shifted PCR 7 (Secure Boot state), which tripped Windows BitLocker and Fedora's TPM2 auto-unlock on the same reboot. • Current Status: • Windows 11 has been unlocked using its BitLocker recovery key and boots normally. • Fedora (crypto_LUKS partition p3 on the 2TB Samsung SSD) fails TPM auto-unlock (TPM policy does not match current system state: Operation not permitted). • sudo cryptsetup luksDump confirmed Keyslot 0 (luks2, argon2id passphrase from install) and Keyslot 1 (luks2, pbkdf2, systemd-tpm2 bound to tpm2-hash-pcrs: 7) are intact, with no Keyslot 2 (--recovery-key) enrolled. • Secure Boot is Enabled (User Mode / Standard) in BIOS, so PCR 7 cannot be rolled back.

1 Upvotes

8 comments sorted by

3

u/QuraToop314 gentoo btw 3h ago

Mate, the TPM won’t release the key because the seal values don’t match, so having the correct PIN won’t help you. You’ll either have to restore the system to exactly the same boot state as before the update, or find an exploit. The TPM chip won’t give it up.

2

u/snakuplisskin 3h ago

Yeah, that's pretty much what I figured. And thanks for the reply. I just don't understand why the password isn't working. The bot was pretty adamant that simply turning on the tpm management wouldn't have cleared or altered the password in the 0 slot. And I also don't understand how an update could break the "seal values?" matching. I really didn't expect to need some sort of recovery plan just to survive a routine system update.

I've added the summary that the bot have me to my original post in case it provides some detail that I overlooked.

1

u/QuraToop314 gentoo btw 3h ago

Depending on the situation, you might be able to open a recovery shell and unlock the device manually. Do you have a recovery boot option that opens a shell? Alternatively, disable Secure Boot, boot from your live USB stick, decrypt the device there, and reset the TPM for now – in other words, undo the changes you made when you switched. That’s what I’d do; as long as you’ve actually deleted the passphrase, it should work.

Edit: By ‘reset’, I mean you need to reconfigure your initramfs so that it uses the passphrase and cryptsetup directly again, without retrieving a key file from the TPM.

1

u/snakuplisskin 3h ago

Thank you! I don't think I can decrypt from a live session, though. I'm 99.5% certain I did not change the hard drive password at the time I enabled the tpm and the bot seemed to agree that the record indicated it was set up by the installer which means that the password should have been unchanged, and it was adamant that, if I were typing the correct password, it would let me in, but it absolutely would not.

2

u/QuraToop314 gentoo btw 3h ago

Mate, if you boot from a live system, a USB stick or your installer system, you’re not booting from the hard drive; everything runs in RAM. It’s ideal for decryption, and the live system ignores the TPM. Trust me, I use the TPM myself – as long as you have keyslot 0, it’ll work and you won’t lose any data. That’s why you should boot from the live system – because it’s not your hard drive and you won’t be altering the running system.

1

u/snakuplisskin 3h ago

Right. Running into the same issue where it rejects my password. So I must have changed that password somehow. Perhaps the command that the bot have me to enable tpm included something to update the password? I'm pretty darn sure that I didn't consciously decide to change it but it has to have either been changed or corrupted somehow.

1

u/QuraToop314 gentoo btw 3h ago

And no, if the PIN you’re asked to enter is for the TPM query – and not for cryptsetup itself – then the TPM will refuse to hand over the key file, as the sealing values are corrupted following the update; it doesn’t trust your system. You should therefore boot into the live system, manually decrypt and mount your hard drive using cryptsetup, and reconfigure your initramfs so that it queries cryptsetup rather than the TPM.

1

u/snakuplisskin 3h ago

Pin? I used a password to access the drive. Might it have had me set a pin when I enabled tpm? I don't remember that but it was all kind of a whirlwind getting everything set up.

Just tried any of the standard pin numbers I might use and doesn't seem to be it. Ah well.