I was asked a few months ago by my ex-employer to put full-disk encryption in place for my computer. I failed at this task. It has been effectively a brick since then.
I do not need any contents of my disk back. None. I simply need my computer to be bootable and usable as a daily Ubuntu box again.
Basic information about my machine:
- Ubuntu 22.10
- Kernel: 5.19.0-31-generic x86_64
- Intel NUC 10i7FNH
- Processor Core i7-10710U
- RAM: 32GB
- BIOS FNCML357.0059.2022.1019.1055
- Drive: Samsung SSD 970 EVO Plus 1TB
After about 2 weeks of trying this on my own, I'm stuck. The problem almost assuredly has to do with the failed encryption process, but I don't know how to "undo" it. I don't even need the new formatted disk to be encrypted. I just need it to work.
Help would be greatly appreciated.
Here's a highlight of the things I have tried and learned:
- Booting directly from hard drive process that I've tried:
- It asks me for my passphrase for hd0,gpt1
- I type it in, press enter
- About 30s later, the screen clears
- About 10s later, the Ubuntu boot screen appears
- The ball spins for the booting process.
- About 2min later, I press Esc to watch the boot process and it has gotten to "Started Network Manager Script Dispatcher Service."
- This is where it stops.
- I press Ctrl-Alt-F2
- Log in with my username/password and get to prompt. But no ability to get to the GDM.
- Booting directly from USB with Ubuntu 22.10:
- Hold down F10 so that boot menu comes up
- Choose "Try/Install Ubuntu"
- The message appears: error: out of memory press any key to continue...
- Note that I have 32GB of RAM, so this message must be indicative of something else going on...but I don't know what.
- Goes right into a kernel panic. The last message contains: "not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
- Booting directly from USB with Ubuntu 22.10:
- Hold down F10 so that boot menu comes up
- Choose "Ubuntu (safe graphics)"
- Same thing as #2
When I was at the prompt (after #1), I was able to gather the information below.
Command:
df
Output:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 3259212 2100 3257112 1% /run
/dev/mapper/vgubuntu-root 740856488 32888204 670261328 5% /
tmpfs 16296048 0 16296048 0% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
/dev/mapper/LUKS_BOOT 754136 185736 513500 27% /boot
/dev/nvme0n1p3 130798 5346 125452 5% /boot/efi
tmpfs 3259208 68 3259140 1% /run/user/127
tmpfs 3259208 92 3259116 1% /run/user/1000
Command:
apt list --installed | grep linux-image
Output:
linux-image-5.15.0-56-generic/now 5.15.0-56.62 amd64 [installed,local]
linux-image-5.19.0-31-generic/kinetic-updates,kinetic-security,now 5.19.0-31.32 amd64 [installed,automatic]
linux-image-generic-hwe-22.04/kinetic-updates,kinetic-security,now 5.19.0.31.28 amd64 [installed,automatic]
linux-image-generic/kinetic-updates,kinetic-security,now 5.19.0.31.28 amd64 [installed,automatic]
Command:
iostat -p nvme0n1
Output:
Linux 5.19.0-31-generic (taylors-NUC) 02/26/2023 _x86_64_ (12 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.01 0.02 0.03 0.00 0.00 99.94
Device tps kB_read/s kB_wrtn/s kB_dscd/s kB_read kB_wrtn kB_dscd
nvme0n1 0.88 8.99 7.48 0.00 737281 613528 0
nvme0n1p1 0.00 0.09 0.00 0.00 7159 116 0
nvme0n1p2 0.00 0.00 0.00 0.00 264 0 0
nvme0n1p3 0.00 0.07 0.00 0.00 5832 0 0
nvme0n1p5 0.87 8.82 7.48 0.00 722662 613412 0
Command:
uname -a
Output:
Linux taylors-NUC 5.19.0-31-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 20 15:20:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Command:
lsblk
Output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
[[[loop0 through loop41 for various /snap MOUNTPOINTS]]]
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 768M 0 part
│ └─LUKS_BOOT 253:3 0 766M 0 crypt /boot
├─nvme0n1p2 259:2 0 2M 0 part
├─nvme0n1p3 259:3 0 128M 0 part /boot/efi
└─nvme0n1p5 259:4 0 930.6G 0 part
└─nvme0n1p5_crypt 253:0 0 930.6G 0 crypt
├─vgubuntu-swap_1 253:1 0 32G 0 lvm [SWAP]
└─vgubuntu-root 253:2 0 718.9G 0 lvm /var/snap/firefox/common/host-hunspell
/
Command:
sudo cat /var/log/boot.log | grep failed
Output:
[DEPEND] Dependency failed for Cryptography Setup for 5_crypt.
[DEPEND] Dependency failed for Local Encrypted Volumes.
Starting GRUB failed boot detection...
[ OK ] Finished GRUB failed boot detection.
Command:
sudo cat /var/log/boot.log | grep rypt
Output:
[DEPEND] Dependency failed for Cryptography Setup for 5_crypt.
[DEPEND] Dependency failed for Local Encrypted Volumes.
[ OK ] Reached target Block Device Preparation for /dev/mapper/5_crypt.
[ OK ] Stopped target Block Device Preparation for /dev/mapper/5_crypt.
The usual procedure to diagnose hardware problems is to disconnect or replace components with known-good ones to see if it gets rid of the problem. My primary suspect would be the RAM - if you have two sticks pull out one, see if the problem persists, pull out the other and repeat. If you have spare memory sticks - replace both.
– Sergey Feb 28 '23 at 21:13