Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cryptsetup Output: Command failed with code 22
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
-Dexter-
n00b
n00b


Joined: 07 Mar 2019
Posts: 2

PostPosted: Thu Mar 07, 2019 3:38 am    Post subject: [SOLVED] Cryptsetup Output: Command failed with code 22 Reply with quote

Hello everyone, guys. How are you? Fine?

I'm trying to install Hardened Gentoo Linux LVM on LUKS in my machine using VirtualBox 6.0 with the Gentoo updated installation file install-amd64-minimal-20190305T214502Z.iso. But, seriously, I stuck in the cryptsetup luksOpen part. I'll show my cryptsetup commands below:

Code:

# cryptsetup -v -y -c serpent-xts -s 512 -h whirlpool –use-random luksFormat /dev/sda3
# cryptsetup -v luksOpen /dev/sda3 cryptolvm


So, everytime I'd tried to open the container shows these errors below:

Code:

Key slot 0 unlocked.
device-mapper: reload ioctl on failed: Invalid argument
Command failed with code 22.


Others commands:

Code:

# dmesg | tail -n 2
[      65.82278] device-mapper: table: 252.0: crypt: IV mechanism required
[      65.82279] device-mapper: table: error adding target to table


Code:

# zgrep -E '(XTS|SERPENT)' /proc/config.gz
CONFIG_CRYPTO_XTS=m
CONFIG_CRYPTO_SERPENT=m
# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set


Also, I look my LUKS Header using the following command:

Code:

# cryptsetup luksDump /dev/sda3
LUKS header information for /dev/sda3

Version: 1
Cipher name: serpent
Cipher mode: xts
Hash spec: whirlpool
Payload offset: 4096
MK bits: 512
MK digest: 96 20 3d 2a 13 13 0e 0f 80 75 2d c7 ec dd 5c 4c 41 2c 59 c7
MK salt: 38 25 5f 11 dd 58 16 0a c6 72 8a 6d 46 a5 ee 31
              81 bd 5d 64 9d c7 ff 20 82 1d 52 73 37 e8 de 06
MK iterations: 143750
UUID: 3f2f7e55-b166-4ef1-abe22-b37fcafc4a78

Key Slot 0: ENABLED
              Iterations: 116 0996
              Salt: 11 a7 15 34 5e 68 f8 47 ab ec ef e7 c4 73 76 a3
                      30 b5 24 64 b4 26 e7 a9 50 91 b0 86 7d 3e 3b 9f
              Key material offset: 8
              AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED


Also, I check up the serpent module using the following command:

Code:

# lsmod | grep serpent
serpent_generic            32768    0


I don't find any error and now I'm stuck in the installation. Can someone help me?

Thanks a lot for the help and advice.

Best regards,
Dexter.

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
_________________
Whatever you do, do your best!
Back to top
View user's profile Send private message
-Dexter-
n00b
n00b


Joined: 07 Mar 2019
Posts: 2

PostPosted: Sat Mar 09, 2019 5:30 am    Post subject: [SOLVED] Cryptsetup Output: Command failed with code 22 Reply with quote

Hello, guys.

I was using Virtual Box 6.0 version and this version have a issue on working with GPT Partition Table. So, I updated to check it up and the problem continues. So, I've tried another way to solve this problem by making another container using this following command:

Quote:

# cryptsetup -v -y -c serpent-xts-plain64 -s 512 -h whirlpool -i 10000 –use-random luksFormat /dev/sda3


And opened properly. Thanks a lot, guys! The forum can close it.

Best regards,
-Dexter-.
_________________
Whatever you do, do your best!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum