AMDESE/sev-guest

cryptsetup luksFormat failed

JustPlay opened this issue · 3 comments

cryptsetup luksFormat ${luks_partition}

[guest vm|ubuntu-22.04] root@bytedance:~/sev/scripts# cryptsetup --debug luksFormat /dev/nbd0p3
# cryptsetup 2.4.3 processing "cryptsetup --debug luksFormat /dev/nbd0p3"
# Running command luksFormat.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/nbd0p3.
# Trying to open and read device /dev/nbd0p3 with direct-io.
# Initialising device-mapper backend library.

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

Are you sure? (Type 'yes' in capital letters): yes
Operation aborted.

# Releasing crypt device /dev/nbd0p3 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code -1 (wrong or missing parameters).

should use one of the following:

echo -n 'helloworld' | cryptsetup luksFormat /dev/nbd0p3 -d -
cryptsetup -q luksFormat /dev/nbd0p3 # need type-in password

dagrh commented

'Are you sure? (Type 'yes' in capital letters): yes'

You need 'YES' not 'yes' - see the prompt!

'Are you sure? (Type 'yes' in capital letters): yes'

You need 'YES' not 'yes' - see the prompt!

Oh..., thanks. @dagrh