CRYPTSETUP-CONVERT(8)
β¨ CRYPTSETUP-CONVERT β¨
okay bestie, welcome to cryptsetup-convert, part of the Maintenance Commands crew β it's giving glow-up, it's giving format-swap era π
π NAME π
cryptsetup-convert β the lil tool that converts the device between LUKS1 and LUKS2 format π¦
π SYNOPSIS π
cryptsetup convert --type <format> [<options>] <device>
πΈ DESCRIPTION πΈ
So here's the tea: this command converts the device between LUKS1 and LUKS2 format (if possible). And "if possible" is doing a LOT of heavy lifting there, bestie. The conversion will not be performed if there is an additional LUKS2 feature, or if LUKS1 has an unsupported header size. Not me being picky, it's just the rules π€
Now, for conversion from LUKS2 to LUKS1, listen up because there's a whole checklist:
- all active keyslots must use the PBKDF2 key-derivation function
- the PBKDF2 and anti-forensic filter (AF) hash must be the same as the hash used in the digest
- all keyslot numbers must be lower than 8 (that's the LUKS1 maximum slot number, no cap)
- there must be at least one active keyslot
- and no unbound or reencryption keyslots
Conversion (both directions, so either way, no loopholes) must be performed on an inactive device. There must not be an active dm-crypt mapping established for the LUKS header requested for conversion. Like, she needs her space, okay? π
The --type option is mandatory, and these are the only accepted values: luks1 or luks2. Pick one, bestie, there's no third option π
β οΈ WARNING: The convert action can destroy the LUKS header in the case of a crash during conversion or if a media error occurs. Always create a header backup before performing this operation! I'm so serious, back it up. Back. It. Up. π«Ά
And <options> can be [--header, --type, --disable-locks] β that's the whole vibe check right there β¨
π OPTIONS π
--batch-mode,-qβ Suppresses all confirmation questions. Use with care, fr fr! π
If the --verify-passphrase option is not specified, this option also switches off the passphrase verification. (so yeah, it's skipping the vibe check on purpose)
--debugor--debug-jsonβ Run in debug mode with full diagnostic logs. Debug output lines are always prefixed by#.
If --debug-json is used, additional LUKS2 JSON data structures are printed. Iconic for the girlies who love data π
--disable-locksβ Disable lock protection for metadata on disk. This option is valid only for LUKS2 and is ignored for other formats.
β οΈ WARNING: Do not use this option unless you run cryptsetup in a restricted environment where locking is impossible to perform (where /run directory cannot be used).
--header<device or file storing the LUKS header>β Use a detached (separated) metadata device or file where the LUKS header is stored. This option allows one to store the ciphertext and LUKS header on different devices. Main character energy: living separately but together π
For commands that change the LUKS header (e.g., luksAddKey), specify the device or file with the LUKS header directly as the LUKS device.
--help,-?β Show help text and default parameters. Your bestie when you're lost π§--typetypeβ Specifies required device type, for more info, read the BASIC ACTIONS section incryptsetup(8).--usageβ Show short option help. The snack-sized version π--version,-Vβ Show the program version. Slay, what version are we on? β
π¦ REPORTING BUGS π¦
Found a bug? Not the cute kind? Report bugs at the cryptsetup mailing list <cryptsetup@lists.linux.dev> or in the Issues project section <https://gitlab.com/cryptsetup/cryptsetup/-/issues/new>. π«Ά
Please attach the output of the failed command with --debug option added. Help them help you, bestie π
π SEE ALSO π
Cryptsetup FAQ <https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions>
cryptsetup(8), integritysetup(8) and veritysetup(8) β the whole squad π
π CRYPTSETUP π
Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>. Family π
k bye bestie!! this page is from cryptsetup 2.8.8, dated 2026-09-07 β go make a header backup before you touch anything, mwah πβ¨
π¦ where this page comes from
- arch rolling: cryptsetup 2.8.8-1 Β· GPL-2.0-or-later
- fedora 44: cryptsetup 2.8.8-1.fc44 Β· GPL-2.0-or-later WITH cryptsetup-OpenSSL-exception AND LGPL-2.1-or-later WITH cryptsetup-OpenSSL-exception
- nixpkgs unstable: cryptsetup 2.8.8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms