You are not logged in.
I'm using lvm2 on top of the LUKS encryption to encrypt my root and home partitions. It works well and worked well most of the time but sometimes at boot, it gives me this error:
ERROR: Failed to open encryption mapping: The device /dev/nvme0n1p3 is not a LUKS volume and the crypto= parameter was not specified.
ERROR: device '/dev/mapper/volgroup0-lv_root' not found. Skipping fsck.
mount: /new_root: no valid filesystem type specified.
ERROR: Failed to mount '/dev/mapper/volgroup0-lv_root' on real boot.
then it drops me into an emergency shell. with another line stating:
sh: can't access tty: job control turned off
Some info that might come in handy:
I have 1 more of the exact same ssd mounted in fstab but as a ntfs-3g partition and i use it to access my windows partition.
The system is not new and it decrypts most of the time with success
The problem is chronic but it happens only sometimes.
I used to use
cryptdevice=/dev/nvme0n1p3:volgroup0
as a kernel module but I thought maybe problem arises because system sometimes mixes up both ssd's so i changed it to
cryptdevice=UUID=e011ed0f-d73e-42cf-bee2-32077a6cba59:volgroup0 root=/dev/mapper/volgroup0-lv_root
but it didn't make a difference. Please let me know if you end up needing any logs. I'll be happy to provide it.
Last edited by pwish (2024-10-25 17:49:44)
ermmm actually. you didn't read the wiki probably....
Offline
UUID should work - provided that it's the correct UUID, as shown by cryptsetup luksDump.
In the initramfs shell, check cat /proc/cmdline, cat /proc/partitions, ls -l /dev/disk/by-uuid/, ...
Last edited by frostschutz (2024-10-24 13:53:26)
Offline
did you run grub-mkconfig -o /boot/grub/grub.cfg after editing /etc/default/grub?
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
provided that it's the correct UUID, as shown by cryptsetup luksDump.
The system boots properly most of the time so I think it's correct. It wouldn't boot even once if it wasn't, no?
cat /proc/cmdline is the same as I set it so it gives the correct output.
cat/proc/partitions has 3 less entries, entries dm-0, dm-1 and dm-2 is absent.
ls -l /dev/disk/by-uuid/ has 2 less entries, entries for dm-1 and dm-2 is absent. I didn't have dm-0 as an entry while I tested it with my system properly booted.
did you run grub-mkconfig -o /boot/grub/grub.cfg after editing /etc/default/grub?
I ran
grub-mkconfig
but as I said earlier, cat /proc/cmdline gives me the correct output. Do you want me to also run the command as
grub-mkconfig -o /boot/grub/grub.cfg
?
ermmm actually. you didn't read the wiki probably....
Offline
no need if /proc/cmdline returns the expected output.
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
CORRECTION: After looking in more carefully, it shows that
grub-mkconfig
didn't do the same thing as
grub-mkconfig -o /boot/grub/grub.cfg
/proc/cmdline now shows the "correct" output. I'll try to use the system like this for some time to see if the issue persists. I'll mark the issue as resolved since it'd be more fitting to open up a new issue if the problem comes back with
cryptdevice=UUID=e011ed0f-d73e-42cf-bee2-32077a6cba59:volgroup0 root=/dev/mapper/volgroup0-lv_root
Thanks for your help guys!
Last edited by pwish (2024-10-24 15:15:26)
ermmm actually. you didn't read the wiki probably....
Offline
Recently, I encountered the same issue after adding second NVMe SSD to my motherboard. Previously, there was only one SSD installed. All the symptoms were identical, and I also have encryption enabled. I suspected that the problem might be caused by concurrency or something similar. First of all, I researched the docs about "cryptdevice" kernel parameters in my GRUB where I found the following line
device is the path to the device backing the encrypted device. Usage of persistent block device naming is strongly recommended.
Next I found this topic. I have changed the path to the partition from
/dev/nvme0n1p3
to
UUID=3aa7c5c8-9b8d-4ef1-84ea-a27c753314e0
and I don't see the issue for now. I think the core of problem was misconfiguration for "cryptdevice" kernel parameter.
Last edited by iamrusty (2025-01-12 16:34:28)
Offline