[pkg-cryptsetup-devel] cryptsetup failed with code 22 invalid argument

Guilhem Moulin guilhem at debian.org
Tue Jul 7 03:41:19 BST 2020


Hi,

On Tue, 07 Jul 2020 at 11:33:10 +1000, Miranda Zhang wrote:
> I keep getting the "error code 22 invalid arguments" for the seemingly
> correct command
> sudo cryptsetup open --type luks <device> <dmname> --key-file /root/luks.key
> sudo cryptsetup luksOpen <device> <dmname> --key-file /root/luks.key
> Package: cryptsetup-bin (2:1.7.3-4)

Is the dm_crypt module available and loaded?  Is it the same cryptsetup
binary used for the luksFormat and luksOpen?  This is what I get in a
stretch VM:

# Key length 32, device size 131072 sectors, header size 2050 sectors.
# Timeout set to 0 miliseconds.
# Password retry count set to 3.
# Password verification disabled.
# Iteration time set to 2000 milliseconds.
# Password retry count set to 1.
# Activating volume test_disk [keyslot -1] using keyfile /tmp/key.
# Creating directory "/dev/mapper"
# Creating device /dev/mapper/control (10, 236)
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-crypt version 1.20.0, dm-ioctl version 4.42.0.

-- 
Guilhem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-cryptsetup-devel/attachments/20200707/d620ee23/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list