3

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:

  1. 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.
  1. 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)"
  1. 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.
  • Good job on narrowing it down to a hardware problem. So, in the end, the full disk encryption was not at fault - rather, the same problem which prevents you from booting from the USB also crashed the encryption process.

    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
  • Thanks. I have now replaced all the RAM and the NVME. To no effect unfortunately. – Scott Moore Mar 02 '23 at 07:15
  • For what it's worth, here's the kernel panic that appears: Kernel panic text – Scott Moore Mar 02 '23 at 11:22

1 Answers1

3

Based on your comment it seems like the Ubuntu live USB is unable to boot on your Intel NUC. If this problem is specific only to the Intel NUC, it would be a good idea to try to restore functionality to the Samsung EVO SSD from a different computer.

There are a lot of options for solving this problem. For more information see the answers to Why Doesn't a Bootable USB Boot. The GParted live USB is about 1/10 the size of an Ubuntu live USB and it boots on anything.


I made a GParted Live USB, booted from it. It went right to the menu as it should. I chose "Memtester" and got a kernel panic.

You need to try booting a live USB on a different device because it seems like there is a hardware problem with your Intel NUC. I have a GParted live USB that I have used for years for booting a live session on legacy computers, and I have never seen it fail to boot on anything.


Based on your comment the Ubuntu live USB is able to boot on your System76 laptop, so there is a clear path to restoring usability to your Samsung 970 EVO SSD by attaching it to an external hard drive enclosure and attaching the internal hard drive enclosure to your System76 laptop. Then you can reformat the Samsung EVO SSD using either GParted or the built-in Disks application.


I don't think there is anything mechanically wrong with your Samsung SSD 970 EVO Plus. After all it's an SSD and SSDs are durable. You just need to reformat it in another computer.

Remove the SSD from the NUC and temporarily attach it as a second disk to another computer or else attach it inside an external hard drive enclosure that matches the size of the SSD so that your Samsung EVO SSD can be mounted in another operating system and reformatted. External hard drive enclosures come in either 2.5" or 3.5" sizes and are very cheap. The other operating system could also be an Ubuntu live session running from the bootable USB stick that you used to install Ubuntu (if you can get it to boot on any device).

For reformatting the Samsung EVO SSD you can use either GParted, the built-in Disks application, or any other partition editor application. You just need to regain normal use of the SSD by quick reformatting it.

Don't give up no matter what. There are many options for solving this problem. You just need to find the one that works.

karel
  • 114,770
  • First of all, thanks so much for your reply. I have a second (unformatted/new) disk of the exact same type that I have put in the computer. I run through the process of booting from #2/#3 above. Could this kernel panic be caused by the USB stick? I'm just not informed enough about the boot process that I can tell. Why would it still get an "out of memory" error and a kernel panic when the disk is no longer in the computer? – Scott Moore Feb 27 '23 at 08:17
  • That's a useful result derived from smart troubleshooting. In a case like this the USB stick might be the culprit. For more information see the answers to Why Doesn't a Bootable USB Boot. The GParted live USB is about 1/10 the size of an Ubuntu live USB and it boots on anything. – karel Feb 27 '23 at 08:21
  • This is new to me. Thank you. I made a GParted Live USB, booted from it. It went right to the menu as it should. I chose "Memtester" and got a kernel panic: – Scott Moore Feb 27 '23 at 08:52
  • Now you need to try booting a live USB on a different device because it seems like there is a hardware problem with your Intel NUC. – karel Feb 27 '23 at 08:54
  • firmware: failed to load i915/kbll_dmc_ver1_04 ... and then a few lines below Kernel panic - not syncing: attempting to kill init! exitcode=0x00007f00 and many lines after that. – Scott Moore Feb 27 '23 at 08:54
  • I just successfully booted my System76 laptop with the Ubuntu USB stick...so apparently it is okay. It feels like this recurrent "out of memory" error that I'm getting isn't necessarily in my (replaceable) RAM but possibly on the board. As always, thanks for your help on this. – Scott Moore Feb 27 '23 at 09:08
  • unfortunately, I have not successfully solved the problem. I now know the USB stick is good (since I used it to boot my laptop) and that the Samsung disk is not the problem (since I have replaced it to no effect). This seems to point to the RAM or the motherboard. Is this a correct assumption? And if it's the MB, does that mean it's trash? Or can it be saved in some (magical) way that I'm unaware of? (I will definitely reward you! But I don't want to signal that I have no more questions quite yet!) – Scott Moore Feb 27 '23 at 09:39
  • Testing the hardware will help to diagnose the problem with your NUC. Please read the answers to How do I diagnose my issue, when I'm not sure if it is a hardware or software issue?. That's elegant if it works, but sometimes you have to deliver the device to a technician for troubleshooting and repair. – karel Feb 27 '23 at 09:55
  • Update: I purchased, have received, and have installed new RAM. Everything is exactly as it was before. I still get the kernel panic with the same warnings as before. So, apparently, it wasn't the RAM or the disk. – Scott Moore Mar 02 '23 at 00:40