Skip to content

Cryptsetup unlock failure

I'm currently unable to unlock my root partition via cryptsetup during a normal boot.

I'm able to unlock it via a recovery drive via an added a short key, so the header isn't corrupted and it's not typos. I've confirmed that my copy of cryptsetup isn't corrupted and that the UUID in my kernel parameter is correct.

I've tried recompiling initramfs and downgrading cryptsetup, but they don't seem to be helping. I've even tried adding an empty passphrase but it still won't unlock.

Would anyone have ideas on where else to investigate? Any help greatly appreciated.

Cryptsetup 2.3.6.1 lvm2 2.03.12-1 Kernel parameter: "cryptsetup=UUID=<UUID here>:mapped rw root=/dev/mapper/mapped add_efi_map resume=..."

Edit: I tried pinning a keymap and locale via /etc/vconsole.conf and /etc/locale.conf, then re-adding a key, then rerunning mkinitcpio. Results were not positive.

Edit: keyfile was rejected as well. I was able to drop into an initramfs shell and confirmed that it's definitely not a keymap issue either. Very baffled.

Edit: I was able to manually decrypt it using the keyfile on a live USB but failed when in the initramfs shell. Both show the same LUKS2 header information and the keyfile used was identical in both cases.

Edited 5 Jun 2021. We only hold this version.

4 points10 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
4 · 84% up
Kind
Text
ID
nsfaim

Author

3
posts
85
comments
0
media
View profile

10 comments

Post your mkinitcpio.conf and bootloader config to a paste service.

3 points
unknown author2 hidden

Deleted before we saved it.

1 points

I'm not sure if it'll be easy for me to do so, particularly for the bootloader config. It's essentially stock refind though.

Does refind support encryption?

1 points

I think the cryptsetup line is what is failing it

cryptdevice="UUID=<UUID>:vg:allow-discards" root=/dev/mapper/vg-root rw

This is what mine looks like, vg is the name of the volume group, vg-root is the device mapper name, in your case i think that would be mapped-root or mapped-whatever you called the root partition's logical volume

2 points

Any chance you are using a non-us-english keyboard?

These cause all sorts of problems.

I don't know how to solve them, but this answer should help troubleshoot :)

2 points
unknown author

Deleted before we saved it.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.