[Bug 2017510] Re: 'convert' to LUKS2 does not work and makes the device un-unlockable
Uli.Heller
2017510 at bugs.launchpad.net
Mon Apr 24 11:53:09 UTC 2023
I attached the disk to an ubuntu-22.04 machine. There the conversion to
luks2 works without any issue.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cryptsetup in Ubuntu.
https://bugs.launchpad.net/bugs/2017510
Title:
'convert' to LUKS2 does not work and makes the device un-unlockable
Status in cryptsetup package in Ubuntu:
New
Bug description:
I'm using Ubuntu-20.04 on an amd64 machine.
I've installed all updates.
I think I'm hit by
https://gitlab.com/cryptsetup/cryptsetup/-/issues/534
Converting from luks1 to luks2 creates an unusuable partition.
I have to restore the backup of the luks header in order to open
the partition.
Some details and command outputs follow.
Thx for your help!
SUDO uli at ulicsl:~$ sudo cryptsetup convert /dev/sda2 --type luks2 --debug-json; echo $?
# cryptsetup 2.2.2 processing "cryptsetup convert /dev/sda2 --type luks2 --debug-json"
# Running command convert.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/sda2.
# Trying to open and read device /dev/sda2 with direct-io.
# Initialising device-mapper backend library.
# Trying to load any crypt type from device /dev/sda2.
# Crypto backend (OpenSSL 1.1.1f 31 Mar 2020) initialized in cryptsetup library version 2.2.2.
# Detected kernel Linux 5.15.0-66-generic x86_64.
# PBKDF pbkdf2-sha256, time_ms 2000 (iterations 0).
# Reading LUKS header of size 1024 from device /dev/sda2
# Key length 32, device size 134217728 sectors, header size 2050 sectors.
WARNING!
========
Diese Operation wird für »/dev/sda2« ins Format »LUKS2« umwandeln.
Are you sure? (Type uppercase yes): YES
# Converting LUKS device to type LUKS2
# Reusing open ro fd on device /dev/sda2
# Max size: 33553920, LUKS1 (full) header size 1052672 , required shift: 28672
# DM-UUID is CRYPT-LUKS1-8fb4f416e5144d3984d61e7d21aa6bac-
# Moving keyslot areas of size 1048576 from 4096 to 32768.
# Preallocation (fallocate) of new keyslot area not available.
# Unsupported LUKS2 keyslots size (33521152).
# Releasing crypt device /dev/sda2 context.
# Releasing device-mapper backend.
# Closing read only fd for /dev/sda2.
# Closing read write fd for /dev/sda2.
# Unlocking memory.
Fehler -1 beim Ausführen eines Befehls »Falsche oder fehlende Parameter«.
1
UDO uli at ulicsl:~$ sudo cryptsetup open /dev/sda2 crypt
Geben Sie die Passphrase für »/dev/sda2« ein:
Kein Schlüssel mit dieser Passphrase verfügbar.
Geben Sie die Passphrase für »/dev/sda2« ein:
Kein Schlüssel mit dieser Passphrase verfügbar.
Geben Sie die Passphrase für »/dev/sda2« ein:
Kein Schlüssel mit dieser Passphrase verfügbar.
SUDO uli at ulicsl:~$ sudo cryptsetup luksHeaderRestore /dev/sda2
--header-backup-file luks-header-sda2
WARNING!
========
Gerät »/dev/sda2« enthält bereits einen LUKS-Header. Das Ersetzen des Headers wird bestehende Schlüsselfächer zerstören.
Are you sure? (Type uppercase yes): YES
SUDO uli at ulicsl:~$ sudo cryptsetup open /dev/sda2 crypt
Geben Sie die Passphrase für »/dev/sda2« ein:
SUDO uli at ulicsl:~$
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/2017510/+subscriptions
More information about the foundations-bugs
mailing list