Upgrade to 24.10 can not mount my encrypted home partition

Hi, after the upgrade to 24.10, I can not longer log in.
It is stuck at: job dev-mapper-nvme0n1p3_crypt.device/start running
Sometimes I can get a box with options, but I can not scroll through the options with the cursor keys. When I accidentally are able to start a root prompt, then what I type is all messed up.

My Ubuntu Mate system is on the same nvme drive, not encrypted. My home folder is on a encrypted partition (encrypted with LUKS).

When I run linux via a USB drive, then all the data and all the partitions are still okay.

1 Like

Hi, @Devn5428 and welcome to the Ubuntu MATE Community!

I installed Ubuntu Mate on an empty drive with LVM and encryption. That works well, and I can read my files in the old encrypted partition.
However, I can not read data from the new drive when booted into a USB linux.

So I have another question. When my home folder is LUKS encrypted, then I can put that drive in any other linux computer and read my files. Is that impossible when the LUKS is encapsulated by LVM?

Hi, @Devn5428 :slight_smile:

You wrote:

I've found the following question (and answer) posted 4 days ago (on 14th October 2024) in "Ask Ubuntu":

The accepted (and, currently, only) answer to that question was posted yesterday (17th October 2024), by the user José Massón, where he mentions that the solution is to install the package systemd-cryptsetup by using the following command:

$ sudo apt-get -y install systemd-cryptsetup

That same answer links to the following Bug, reported a week ago (in 11th October 2024), in Launchpad, by Haw Loeung, from Canonical (where the discussion confirms that installing the systemd-cryptsetup package solves the issue):

Bug #2084251 “LUKS not detected or prompted for on boot” : Bugs : cryptsetup package : Ubuntu
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/2084251

I hope this helps you, @Devn5428 :slight_smile: Please, keep us posted and tell us later if installing the systemd-cryptsetup package solves the problem for you too.

3 Likes

Thank you. I searched for a solution like that before posting my question, but I could not find it.

I could not install the missing package, because I get a "failed to fetch" error :exclamation:

Things I tried:

  • Normal boot, let mounting the LUKS partition time out, get into a root prompt. Tried to install the package. But it failed. When I try a "update", then the system halts.
  • I tried the advanced options and the recovery mode via grub. I used a simple keyboard this time (still a USB keyboard), but characters get messed up. I tried many things, with and without "resume" and "ctrl+D", and so on.
  • A chroot into the system. Many problems, no success.
  • The encrypted partition is the only user, so I tried to add a new user. I can not log in that new user.
  • I tried many many more things.

My system:

  • NVME drive partition 1: FAT32, EFI
  • partition 2: ext4, Ubuntu Mate system
  • partition 3: LUKS encrypted home folder, ext4.
  • Windows 11 on other SATA drive.
  • Ubuntu Mate with LVM and encryption test install on yet another SATA drive.

Meanwhile I ordered a fast NVME drive, to make a new install and then copy my files to the new install. It is here on monday.
What shall I do? I want to put that drive into any linux computer and read my files. But LVM seems to make it impossible to mount the LUKS partition when it is transferred to another computer :question:

Hi again, @Devn5428 :slight_smile:

You wrote:

OK. Since installing the systemd-cryptsetup package seems to be the most likely way to solve this issue, I suggest that we focus now on diagnosing (and solving) that "Failed to fetch" error.

Can you start by testing if you have basic network connectivity to the Web / Internet and DNS name-to-IP resolution by doing the following "ping" command:

$ ping ubuntu-mate.org

That should return something like the following (the IP address that you get may be different):

$ ping -c 4 ubuntu-mate.org
PING ubuntu-mate.org (104.21.50.239) 56(84) bytes of data.
64 bytes from 104.21.50.239 (104.21.50.239): icmp_seq=1 ttl=57 time=26.2 ms
64 bytes from 104.21.50.239 (104.21.50.239): icmp_seq=2 ttl=57 time=24.8 ms
64 bytes from 104.21.50.239 (104.21.50.239): icmp_seq=3 ttl=57 time=24.1 ms
64 bytes from 104.21.50.239 (104.21.50.239): icmp_seq=4 ttl=57 time=25.2 ms

--- ubuntu-mate.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 24.071/25.066/26.220/0.776 ms

Assuming that "ping" works well, I think it would be a good idea to then check the configured software sources for "apt". To do that, please enter the following command that will show the uncommented (active) lines of the file /etc/apt/sources.list :

$ grep ^[^#] /etc/apt/sources.list

... and then, please enter the following command that will show all the files in the /etc/apt/sources.list.d directory and their uncommented lines:

$ for filename in /etc/apt/sources.list.d/*; do echo; echo $filename; grep ^[^#] $filename; done

Please, reply later, in this same discussion topic, with the output of the above commands :slight_smile:

2 Likes

Thank you. It was very hard to get a command prompt and be able to type a command. Only after trying many times I got that "failed to fetch" error. Now I can no longer get a command prompt. It is too much broken now. I think that I messed it up via chroot.

I believe that the right thing to do is a fresh install and copy the files from my home folder into the fresh install. My new drive will be 3 times faster and it will arrive tomorrow.

The broken system is on a Kingston A2000 1TB NVME drive. It is known for being not the most reliable ssd. It has 14.000 power-on hours, 1% spare used, and no error logs. I think those are normal numbers.

2 Likes

Well, I have transferred most things to the new system, which is a LVM + encryption.

Does anyone have tips for me to transfer thunderbird?
Both the old and the new one are via snap. I can not start thunderbird in my broken system, I have only the files.
I copied the '.thunderbird' folder, but now I miss half a year of my received and sent messages. Meanwhile, thunderbird starts to pull in new messages. That is a terrible mess, I can not afford missing half a year of messages.

Maybe it is helpful for other if I describe how I transferred thunderbird.

Transferring Thunderbird files to a new drive when both the old and new system use Thunderbird via snap.

Install thunderbird, it will be installed via snap.
I accidentally run it with some settings and it started to collect new mails. I selected all those mails and saved them in a folder for later.

First, I disconnected the internet.

For a fresh start, check that there is no $HOME/snap/thunderbird folder. Remove that thunderbird folder if there is no valid data in it.

Start thunderbird. It will request data for an account, but just close it. That is enough to create the folders in the snap folder.

I use the tool 'mc' for copying data and deleting folders as a normal user, sudo is not needed.
Go to the folder $HOME/snap/thunderbird/common
The folder ".thunderbird" will be replaced. This one can be deleted.

Mount the old drive (or old partition). Find that same ".thunderbird" folder and copy it to the new location.

Then I started Thunderbird and selected the saved mails (eml files) that were accidentally retrieved and I dropped them with the mouse cursor on the Inbox. Those mails will not be marked as "unread".
Internet can be connected and it should work.

2 Likes

If you have already downloaded new email items to the new tbird installation, things are going to be very messy.

STEP 1: from your NEW email profile in tbird, export all your email to an external archive. That options is under "Tools -> Export ..." .

STEP 2 : rename the NEW tbird installation (not export file) to a different profile name, namely "profile.{something}" to "profile.NEW" , in case you want to revert back to post-install state.

STEP 3 :

Are both the old and new disk in the same new computer at this time?

If yes, and both are mounted, to recover ONLY what you had before the install, you can do a straight migration, as root, using

tbirdSnapPath="snap/thunderbird/common/thunderbird"

mailOld=${mountpointOLD}/home/${username}/${tbirdSnapPath}

mailNew=~/${tbirdSnapPath}

(as root)  cd "${mailOld} ; tar cf - . | ( cd "${mailNew}" ; tar xvpf - )

STEP 4 : open tbird, which should now show all old email, then perform reverse of STEP 2, "Tools -> Import ..." .

You will have some duplication of email, but at least that is better than loss of old emails. :slight_smile:

3 Likes

Luckily I didn't have to do that. It was a bunch of mails that I could select in Thunderbird.
But I should have disconnected my computer before trying things.

2 Likes