Re: Command failed with code -1 (wrong or missing parameters)

Fourhundred Thecat <[email protected]>
Newsgroups gmane.linux.kernel.device-mapper.dm-crypt
Message-ID <[email protected]>
On 19/10/2019 09.10, Milan Broz wrote:
>
> there should be more info, apparently some message is missing.
>
> Please could you run it with the --debug switch and paste the output?
> It also reports all needed versions for us.

Hi Milan,

I ran the same command, this time with --debug. Please see the output
below. There were no messages in syslog. Also, not sure if it is
relevant, but the disk I am trying to luksFormat is paravirtualized disk
in kvm guest (VIRTIO_BLK)

thanks,


cryptsetup -v --debug luksFormat /dev/vda3
# cryptsetup 2.1.0 processing "cryptsetup -v --debug luksFormat /dev/vda3"
# Running command luksFormat.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/vda3.
# Trying to open and read device /dev/vda3 with direct-io.
# Initialising device-mapper backend library.
WARNING: Device /dev/vda3 already contains a 'ext4' superblock signature.

WARNING!
========
This will overwrite data on /dev/vda3 irrevocably.

Are you sure? (Type uppercase yes): YES
# Interactive passphrase entry requested.
Enter passphrase for /dev/vda3:
Verify passphrase:
# Crypto backend (OpenSSL 1.1.1d  10 Sep 2019) initialized in cryptsetup
library version 2.1.0.
# Detected kernel Linux 4.14.146-grsec x86_64.
# Only 1 active CPUs detected, PBKDF threads decreased from 4 to 1.
# Not enough physical memory detected, PBKDF max memory decreased from
1048576kB to 1020714kB.
# PBKDF argon2i, hash sha256, time_ms 2000 (iterations 0), max_memory_kb
1020714, parallel_threads 1.
Existing 'ext4' superblock signature on device /dev/vda3 will be wiped.
# Formatting device /dev/vda3 as type LUKS2.
# Topology: IO (512/0), offset = 0; Required alignment is 1048576 bytes.
# Checking if cipher aes-xts-plain64 is usable.
# Userspace crypto wrapper cannot use aes-xts-plain64 (-95).
# Using dmcrypt to access keyslot area.
# Calculated device size is 1 sectors (RW), offset 0.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.37.0.
# Detected dm-crypt version 1.18.1.
# Udev is not running. Not using udev synchronisation code.
# Device-mapper backend running with UDEV support disabled.
# DM-UUID is CRYPT-TEMP-temporary-cryptsetup-3956
# dm create temporary-cryptsetup-3956
CRYPT-TEMP-temporary-cryptsetup-3956 [ opencount flush ]   [16384] (*1)
# dm reload temporary-cryptsetup-3956  [ opencount flush readonly
securedata ]   [16384] (*1)
# dm resume temporary-cryptsetup-3956  [ opencount flush readonly
securedata ]   [16384] (*1)
# temporary-cryptsetup-3956: Stacking NODE_ADD (253,1) 0:6 0660
# temporary-cryptsetup-3956: Stacking NODE_READ_AHEAD 256 (flags=1)
# temporary-cryptsetup-3956: Processing NODE_ADD (253,1) 0:6 0660
# Created /dev/mapper/temporary-cryptsetup-3956
# temporary-cryptsetup-3956: Processing NODE_READ_AHEAD 256 (flags=1)
# temporary-cryptsetup-3956 (253:1): read ahead is 256
# temporary-cryptsetup-3956: retaining kernel read ahead of 256
(requested 256)
# dm versions   [ opencount flush ]   [16384] (*1)
# dm remove temporary-cryptsetup-3956  [ opencount flush retryremove ]
 [16384] (*1)
# temporary-cryptsetup-3956: Stacking NODE_DEL
# temporary-cryptsetup-3956: Processing NODE_DEL
# Removed /dev/mapper/temporary-cryptsetup-3956
# Formatting LUKS2 with JSON metadata area 12288 bytes and keyslots area
16744448 bytes.
# Creating new digest 0 (pbkdf2).
# Setting PBKDF2 type key digest 0.
# Running pbkdf2(sha256) benchmark.
# PBKDF benchmark: memory cost = 0, iterations = 606814, threads = 0
(took 54 ms)
# PBKDF benchmark: memory cost = 0, iterations = 513001, threads = 0
(took 1022 ms)
# Benchmark returns pbkdf2(sha256) 513001 iterations, 0 memory, 0
threads (for 512-bits key).
# Segment 0 assigned to digest 0.
# Wiping LUKS areas (0x000000 - 0x1000000) with zeroes.
# Wiping keyslots area (0x008000 - 0x1000000) with random data.
# Device size 42949672960, offset 16777216.
# Opening lock resource file /run/cryptsetup/L_254:3
# Acquiring write lock for device /dev/vda3.
# Verifying write lock handle for device /dev/vda3.
# Device /dev/vda3 WRITE lock taken.
# Trying to write LUKS2 header (16384 bytes) at offset 0.
# Opening locked device /dev/vda3
# Veryfing locked device handle (bdev)
#
Checksum:ab0a8d42012d27fadf97a1626a682151114f6cce48cbba810c191ec52b28e099 (in-memory)
# Trying to write LUKS2 header (16384 bytes) at offset 16384.
# Opening locked device /dev/vda3
# Veryfing locked device handle (bdev)
#
Checksum:658ce2489dd88497d8036c17d35672bcd4f2c16851340b42e8f714c9b575bd57 (in-memory)
# Device /dev/vda3 WRITE lock released.
# Adding new keyslot -1 using volume key.
# Adding new keyslot -1 with volume key assigned to a crypt segment.
# Selected keyslot 0.
# Verifying key digest 0.
# Keyslot 0 assigned to digest 0.
# Trying to allocate LUKS2 keyslot 0.
# Found area 32768 -> 290816
# Running argon2i() benchmark.
# PBKDF benchmark: memory cost = 32, iterations = 4, threads = 1 (took 0 ms)
# PBKDF benchmark: memory cost = 512, iterations = 4, threads = 1 (took
2 ms)
# PBKDF benchmark: memory cost = 8192, iterations = 4, threads = 1 (took
48 ms)
# PBKDF benchmark: memory cost = 42666, iterations = 4, threads = 1
(took 287 ms)
# PBKDF benchmark: memory cost = 297324, iterations = 4, threads = 1
(took 2155 ms)
# Benchmark returns argon2i() 4 iterations, 297324 memory, 1 threads
(for 512-bits key).
# Calculating attributes for LUKS2 keyslot 0.
# Updating keyslot area [0x8000].
# Userspace crypto wrapper cannot use aes-xts-plain64 (-95).
# Reloading LUKS2 header (repair disabled).
# Opening lock resource file /run/cryptsetup/L_254:3
# Acquiring read lock for device /dev/vda3.
# Verifying read lock handle for device /dev/vda3.
# Device /dev/vda3 READ lock taken.
# Trying to read primary LUKS2 header at offset 0x0.
# Opening locked device /dev/vda3
# Veryfing locked device handle (bdev)
# LUKS2 header version 2 of size 16384 bytes, checksum sha256.
#
Checksum:ab0a8d42012d27fadf97a1626a682151114f6cce48cbba810c191ec52b28e099 (on-disk)
#
Checksum:ab0a8d42012d27fadf97a1626a682151114f6cce48cbba810c191ec52b28e099 (in-memory)
# Trying to read secondary LUKS2 header at offset 0x4000.
# Opening locked device /dev/vda3
# Veryfing locked device handle (bdev)
# LUKS2 header version 2 of size 16384 bytes, checksum sha256.
#
Checksum:658ce2489dd88497d8036c17d35672bcd4f2c16851340b42e8f714c9b575bd57 (on-disk)
#
Checksum:658ce2489dd88497d8036c17d35672bcd4f2c16851340b42e8f714c9b575bd57 (in-memory)
# Device size 42949672960, offset 16777216.
# Device /dev/vda3 READ lock released.
Existing 'crypto_LUKS' superblock signature on device /dev/vda3 will be
wiped.
Existing 'crypto_LUKS' superblock signature on device /dev/vda3 will be
wiped.
# Releasing crypt device /dev/vda3 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code -1 (wrong or missing parameters).
_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.