Need a bit of help chrooting into encrypted drive

So I seem to have powered off my machine during an update.

No problem, Ill just chroot from a live disk… Well I am having issues.

[manjaro mnt]# manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
==> ERROR: No Linux partitions detected!

Following other topics on the forum, I figured the encryption was the issue… But here is the problem I haven’t figured out yet:

[manjaro mnt]# cryptsetup -v luksOpen /dev/nvme0n1p2 crypto
Enter passphrase for /dev/nvme0n1p2: 
device-mapper: reload ioctl on crypto (254:0) failed: Invalid argument
Command failed with code -4 (wrong device or file specified)

I get the same result for nvme0n1p3

Here is the truncated output of lsblk -f :

nvme0n1
                                                                                           
├─nvme0n1p1
│      vfat   FAT32   NO_LABEL         0607-FC2C                                           
├─nvme0n1p2
│      crypto 1                                        
└─nvme0n1p3
       crypto 1                         

Please help.

chrooting into an encrypted device requires the knowledge of few - that includes the decryption phrase provided when creating the device.

If you are in reference to the passphrase used to decrypt the drive in normal use, that I do have. I also purposefully entered the passphrase wrong to see if it was the same error and it is different.

Here is the current error and the behavior when the passphrase is wrong:

[manjaro mnt]# cryptsetup -v luksOpen /dev/nvme0n1p2 crypto 1
Enter passphrase for /dev/nvme0n1p2: 
device-mapper: reload ioctl on crypto (254:0) failed: Invalid argument
Command failed with code -4 (wrong device or file specified).
[manjaro mnt]# cryptsetup -v luksOpen /dev/nvme0n1p2 crypto 1
Enter passphrase for /dev/nvme0n1p2: 
No key available with this passphrase.
Enter passphrase for /dev/nvme0n1p2: 
No key available with this passphrase.
Enter passphrase for /dev/nvme0n1p2: 
No key available with this passphrase.
Command failed with code -2 (no permission or bad passphrase).

You can ignore the crypto 1 part in this example, I am just grasping at straws at this point.

cryptsetup open /dev/nvme0n1p2 whatever

should work.

Why truncated?

[manjaro mnt]# cryptsetup open /dev/nvme0n1p2 crypto
Enter passphrase for /dev/nvme0n1p2: 
device-mapper: reload ioctl on crypto (254:0) failed: Invalid argument
[manjaro mnt]# cryptsetup open /dev/nvme0n1p3 crypto
Enter passphrase for /dev/nvme0n1p3: 
device-mapper: reload ioctl on crypto (254:0) failed: Invalid argument

Same issue with open.

As for the truncated output, the other drives I have are not in scope for this issue.
nvme1n1 is lab drive.
the sda drives are the usb I am currently using and an old backup drive.

nvme0n1 is where my os is installed.

The original boot issue indicates that vmlinuz is not found, and I suspect the issue is from powering down during an update. If I can get the encrypted drive to mount, I should be good to go after I chroot into it.

Any idea on the specific error and why it isn’t working for this case?

Yes, because you are without kernels now.

Try running cryptsetup with --debug. Also you can try some other word instead of ‘crypto’.

THANK YOU!

Looked like the binary itself was failing at some point. Figured something could have been affected by my previous explorations into solving this so I rebooted into the live disk and the cryptsetup command worked perfectly.

Not sure why I didn’t look for a --debug flag before haha. Just assumed the verbose switch was all I had to work with.

Thank you again! I will follow up with issues if I encounter any.

Good. Don’t forget to install kernel(s) again and update everything in chroot.