Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 705  / 2 Years ago, sun, december 5, 2021, 10:39:31

My laptop is a a Dell Precision 5560 running Ubuntu 20.04.3. It has LUKS disk encryption set up on it.


About a week ago, it completely froze (I'm not sure why) such that my only recourse to get it working again was to do a hard shut down, i.e. by holding down the power button for 10 seconds. After I did this, it seems to have corrupted something, because now when I boot, it momentarily shows the following error:


cryptsetup: Bad password or options?

and after a few seconds this changes to:


cryptsetup: ERROR; system: maximum number of tries exceeded

After a further 30 seconds or so, it drops me into initramfs. If I type exit here it shows a few error messages, notably ALERT! /dev/mapper/ubuntu-root does not exist. Dropping to a shell!.




Thankfully, I was able to workaround this by doing the following:



echo -e '#!/usr/bin/sh
/usr/bin/tpm2_nvread 0x1500016' > /clientbuild/scripts/tpm2-getkey


Run /clientbuild/scripts/tpm2-getkey manually and make note of the password.


Open the luks volume, rescan lvm volumes, and continue the scripts that failed to run:


/clientbuild/scripts/tpm2-getkey | cryptsetup luksOpen /dev/nvme0n1p3 ubuntu-p3


lvm lvscan


sh /scripts/local


Press ctrl+D to return control to the initramfs.



At this point I'm then prompted to enter the password that I noted down, which I do, and then I can boot into my system successfully.


However, every time I reboot my machine, I have to complete the above steps again. So what's been corrupted here, and how do I repair it permanently?


More From » 20.04

 Answers
2

I am not certain of what's going on, but it might help to entirely rebuild your Grub.


Please start by fully updating your system.


sudo apt update
sudo apt upgrade

If there are errors, repair them.


sudo apt --fix-broken install
sudo dpkg --configure --pending
sudo apt update
sudo apt upgrade

Then rebuild Grub.


sudo update-grub
sudo update-initramfs -ck all

Reboot to see if this helps. Sorry if it doesn't.


[#383] Monday, December 6, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aveerakfas

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
1 Year ago
;