You are not logged in.

#1 2025-11-11 10:13:47

Zeepro
Member
Registered: 2025-11-11
Posts: 7

[SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

Hi guys, so I got into using Arch for like a month and an half and today morning I see that I somehow messed up the password to login in the desktop environment.

So I decide to use the usb, mount root partition to reset the login password just to realise that I have the LUKS 2 encryption enabled. Then I dive into forums to figure out how to turn it off and I manage to do it too using

cryptsetup reencrypt --decrypt --header new_file /dev/sda2

Now, I can mount my /dev/sda2 in the bootable usb enviornment without any issues and can see the files I have too but when I try turning on, getting into the login screen I'm interrupted with this pop-up.

I've seen a solved post with the same problem but some pacman package installation broke the system for that guy, and I couldn't really follow what to do well either.
So what can I do to solve this?

This is the whole error
ERROR: Failed to open encryption mapping: The device PARTUUID=90af3fc4-bcBe-4035-885e-766f87a9293c is not a LUKS volume and the crypto= parameter was not specified.
Waiting 10 seconds for device /dev/mapper/root ...
Waiting 10 seconds for device /dev/mapper/root ...
ERROR: device ' /dev/mapper/root' not found. Skipping fsck.
: : mounting ' /dev/mapper/root' on real root
mount: /new_root: fsconfig() failed: /dev/mapper/root: Can't lookup blockdev.
              dmesg(1) may have more information after failed mount systen call.
ERROR: Failed to mount ' /dev/mapper/root' on real root
You are now being dropped into an emergency shell. sh: can't access tty; job control turned off
[rootfs ~]#

Please help me out.

Last edited by Zeepro (2025-11-16 06:35:07)

Offline

#2 2025-11-11 10:20:53

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

the device is a ThinkPad T460 and I'm using systemd as my bootloader

Offline

#3 2025-11-11 11:00:23

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

check your kernel parameters... without LUKS there would no longer be a /dev/mapper/root device, but you still seem to be passing it

try root=/dev/sda2 or root=/dev/disk/by-partuuid/90af3fc4-bcBe-4035-885e-766f87a9293c or use blkid to get the actual filesystem uuid and use root=UUID=abc...

Offline

#4 2025-11-11 11:30:59

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

frostschutz wrote:

check your kernel parameters... without LUKS there would no longer be a /dev/mapper/root device, but you still seem to be passing it

try root=/dev/sda2 or root=/dev/disk/by-partuuid/90af3fc4-bcBe-4035-885e-766f87a9293c or use blkid to get the actual filesystem uuid and use root=UUID=abc...


cat /proc/cmdline shows
initrd=\arch\boot\x86_64\initramfs-linux.img archisobasedir=arch archisosearchuuid=2025-11-01-09-48-56-00

I tried running
sysctl-a
but that shows alot of stuff idk how to copy paste all that

I should write the root=... commands in the flash drive booted environment after mounting the sda2 drive and chroot-ing right, i just did that, didn't work? Also I checked the /dev/mapper directory
cd /dev/mapper and ls
and I see control, sdb1, ventoy in the directory

Offline

#5 2025-11-11 11:42:14

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

Are you running those commands in arch live? You have to check /proc/cmdline in the emergency shell you're dropped into, doesn't make sense otherwise...

If you're using systemd-boot as shown in the wiki, you should be able to edit the parameters in loader/entries/arch.conf

Last edited by frostschutz (2025-11-11 11:43:35)

Offline

#6 2025-11-11 11:56:57

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

frostschutz wrote:

Are you running those commands in arch live? You have to check /proc/cmdline in the emergency shell you're dropped into, doesn't make sense otherwise...

If you're using systemd-boot as shown in the wiki, you should be able to edit the parameters in loader/entries/arch.conf

rootfs ~]# cat /proc/cmdline
initrd=\initramfs-linix.img cryptdevice=PARTUUID=90af3fc4-bc8e-4035-885e-766f87a9293c:root root=/dev/mapper/root zswap.enabled=0 rw rootfstype=ext4

What parameter do i exactly have to change?

Offline

#7 2025-11-11 12:26:35

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

remove cryptdevice= altogether or change it to root=PARTUUID=... (maybe it works, filesystem UUID= is the better option but its a different UUID than the PARTUUID or LUKS UUID)

remove root=/dev/mapper/root and instead use root=UUID=yourfilesystemuuid, or other suggestions from above. if you don't have multiple /dev/sdx drives then /dev/sda2 should work temporarily, just so you can get in to the system to fix properly

anyway you need root= to point to your rootfs. with LUKS this used to be /dev/mapper/root, without LUKS not anymore.

Last edited by frostschutz (2025-11-11 12:27:30)

Offline

#8 2025-11-11 14:47:15

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

frostschutz wrote:

remove cryptdevice= altogether or change it to root=PARTUUID=... (maybe it works, filesystem UUID= is the better option but its a different UUID than the PARTUUID or LUKS UUID)

remove root=/dev/mapper/root and instead use root=UUID=yourfilesystemuuid, or other suggestions from above. if you don't have multiple /dev/sdx drives then /dev/sda2 should work temporarily, just so you can get in to the system to fix properly

anyway you need root= to point to your rootfs. with LUKS this used to be /dev/mapper/root, without LUKS not anymore.

uhh
sudo vim /boot/loader/entries/arch.conf right? It shows empty for me, what to do? can i not show images in here?

edit: I just did ls in my /boot directory and saw that there's nothing there ?
edit 2: did a find / -type d -name loader and it shows nothing either

Last edited by Zeepro (2025-11-11 14:58:39)

Offline

#9 2025-11-11 15:42:36

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

Well, you'd have to mount it first? Kinda like this https://wiki.archlinux.org/title/Chroot … t_location

Boot+Kernel+Initrd is a separate partition from your previously encrypted rootfs.

Also since you mentioned forgetting the user password, here some ideas how to change passwords https://wiki.archlinux.org/title/Reset_ … g_a_LiveCD (also works for other users passwords, not just the root one).

Using LUKS or not does not affect the login passwords, so removing LUKS probably won't have solved that problem.

Last edited by frostschutz (2025-11-11 15:44:06)

Offline

#10 2025-11-11 17:36:54

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

frostschutz wrote:

Well, you'd have to mount it first? Kinda like this https://wiki.archlinux.org/title/Chroot … t_location

Boot+Kernel+Initrd is a separate partition from your previously encrypted rootfs.

Also since you mentioned forgetting the user password, here some ideas how to change passwords https://wiki.archlinux.org/title/Reset_ … g_a_LiveCD (also works for other users passwords, not just the root one).

Using LUKS or not does not affect the login passwords, so removing LUKS probably won't have solved that problem.

Yes! I'm doing

mount /dev/sda2 /mnt
arch-chroot /mnt

And in there I'm browsing around my files and see the /boot directory is empty and even the search command doesn't show anything if I search for the keyword loader, while it shows my boot directory and many more if I search boot

even tried the mnt/esp right now, same results

And about that password thing that's the exact thing I tried doing but I could not mount sda2 cause it was encrypted by LUKS, I tried decrypting, making the changes but that did not work either

Should I just do a fresh install at this point?

edit: will changing the bootloader from systemd boot to something like grub fix this issue?

Last edited by Zeepro (2025-11-11 19:25:30)

Offline

#11 2025-11-11 22:01:43

frostschutz
Member
Registered: 2013-11-15
Posts: 1,640

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

Inside chroot, 'mount /boot' should work - if there is an entry in /etc/fstab for it, and /proc /sys /dev was bind-mounted accordingly (as arch-chroot should do for you).

Could also be 'mount /efi', (or both, or /boot/efi) it depends how it is set up.

It's your system, you're supposed to know the whats-where of things, I can only guess :-)

Last edited by frostschutz (2025-11-11 22:03:24)

Offline

#12 2025-11-12 02:36:54

Zeepro
Member
Registered: 2025-11-11
Posts: 7

Re: [SOLVED]ERROR: Failed to open encryption mapping: device PARTUUID

frostschutz wrote:

Inside chroot, 'mount /boot' should work - if there is an entry in /etc/fstab for it, and /proc /sys /dev was bind-mounted accordingly (as arch-chroot should do for you).

Could also be 'mount /efi', (or both, or /boot/efi) it depends how it is set up.

It's your system, you're supposed to know the whats-where of things, I can only guess :-)

Man I was very dumb, I was doing
mount /dev/sda2 /mnt
arch-chroot /mnt

or
mount /dev/sda1 /mnt/boot
arch-chroot /mnt

My stupid brain couldn't figure out I need to mount BOTH and then run arch-chroot /mnt
Also it's fixed now!

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt

boot/loader/entries/
and there are my 3 kernels, 2025-10-20_01-18-53_linux.conf 2025-10-20_01-18-53_linux-fallback.conf zen.conf

Changed the root=/dev/mapper/root to root=UUID=uuid_of_the_sda2

Also I actually fucked up the shell that's why it showed incorrect login credentials, i had to edit that to login.

Thank you for bearing with my stupidity and helping me big_smile
It was fun fixing it, got quite comfortable with running commands in the live boot environment.

Offline

Board footer

Powered by FluxBB