CRYPTSETUP-LUKSDUMP(8)

πŸ’– CRYPTSETUP-LUKSDUMP β€” the luksDump girlies' guide πŸ’–

okay so bestie, you know the cryptsetup-luksDump(8) manual page? this is that, but make it make sense. grab a boba, we're dumping some headers. 🧚✨


✨ NAME ✨

cryptsetup-luksDump β€” dump the header information of a LUKS device

no cap, that's literally it. it shows you what's inside your LUKS header. πŸ‘‘


🌸 SYNOPSIS 🌸

cryptsetup luksDump [<options>] <device>

that's the whole vibe. options in the middle, device at the end. periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Dump the header information of a LUKS device.

If you use the --dump-volume-key option, the LUKS device volume key gets dumped instead of the keyslot info. And with the --volume-key-file option, that volume key goes into a file instead of standard output.

🚨 okay pause. beware that the volume key cannot be changed without reencryption, and it can be used to decrypt the data stored in the LUKS container without a passphrase and even without the LUKS header. which means if the volume key is compromised, the whole device has to be erased or reencrypted to prevent further access. use this option carefully. fr fr, this is the scary part. πŸ’€

A passphrase must be supplied to dump the volume key β€” either interactively, or via --key-file.

To dump an unbound key (LUKS2 format only), the --unbound parameter, a specific --key-slot id and a proper passphrase must be supplied β€” interactively, or via --key-file. The optional --volume-key-file parameter enables unbound keyslot dump to a file.

To dump LUKS2 JSON metadata (without basic header information like UUID), use the --dump-json-metadata option.

If --dump-volume-key is used with --key-file and the argument to --key-file is '-', no validation question will be asked and no warning given. (iconic honestly, it just goes) 🫢

<options> can be [--dump-volume-key, --dump-json-metadata, --key-file, --keyfile-offset, --keyfile-size, --header, --disable-locks, --volume-key-file, --type, --unbound, --key-slot, --timeout, --external-tokens-path].


πŸ’œ OPTIONS πŸ’œ

here's the whole roster, bestie. every single one. no skips. πŸ”₯

  • --batch-mode, -q β€” suppresses all confirmation questions. use with care! if the --verify-passphrase option is not specified, this option also switches off the passphrase verification. it's giving "just do it and don't ask me". 😭
  • --debug or --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. very "tell me everything" of it. 🌈
  • --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).
  • --dump-json-metadata β€” for luksDump (LUKS2 only), this option prints the content of the LUKS2 header JSON metadata area. raw JSON, no basic header info like UUID. ✨
  • --dump-volume-key, --dump-master-key (OBSOLETE alias) β€” print the volume key in the displayed information. use with care, as the volume key can be used to bypass the passphrases, see also option --volume-key-file. this is the "main character energy but make it dangerous" option. πŸ‘‘
  • --external-tokens-path <absolute path> β€” override the system directory path where cryptsetup searches for external token handlers (or token plugins). it must be an absolute path (starting with / character). πŸŽ€
  • --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. 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. the classic. 🫢
  • --key-description text β€” set the key description in the keyring that will be used for passphrase retrieval.
  • --key-file, -d file β€” read the passphrase from the file. if the name given is "-", then the passphrase will be read from stdin. in this case, reading will not stop at newline characters. see section NOTES ON PASSPHRASE PROCESSING in cryptsetup(8) for more information. πŸ“
  • --keyfile-offset value β€” skip value bytes at the beginning of the key file. little hop, then read. πŸ¦‹
  • --keyfile-size, -l value β€” read a maximum of value bytes from the key file. the default is to read the whole file up to the compiled-in maximum that can be queried with --help. supplying more data than the compiled-in maximum aborts the operation. this option is useful to cut trailing newlines, for example. if --keyfile-offset is also given, the size count starts after the offset. ngl this one's lowkey underrated. πŸ’œ
  • --key-slot, -S <0-N> β€” for LUKS operations that add key material, this option allows you to specify which keyslot is selected for the new key. the maximum number of keyslots depends on the LUKS version. LUKS1 can have up to 8 keyslots. LUKS2 can have up to 32 keyslots based on keyslot area size and key size, but a valid keyslot ID can always be between 0 and 31 for LUKS2. math girlies rise up. πŸ”₯
  • --timeout, -t seconds β€” the number of seconds to wait before a timeout on passphrase input via terminal. it is relevant every time a passphrase is asked. it has no effect if used in conjunction with --key-file. this option is useful when the system should not stall if the user does not input a passphrase, e.g., during boot. the default is a value of 0 seconds, which means to wait forever. (forever is a long time bestie 😭)
  • --type type β€” specifies required device type, for more info, read the BASIC ACTIONS section in cryptsetup(8).
  • --unbound β€” dumps the existing LUKS2 unbound keyslot. the lone wolf keyslot. 🌸
  • --usage β€” show short option help.
  • --version, -V β€” show the program version. πŸŽ€
  • --volume-key-file file, --master-key-file file (OBSOLETE alias) β€” use a volume key stored in a file. the volume key is stored in a file instead of being printed out to standard output. πŸ’–

😀 REPORTING BUGS 😀

found a bug? not the vibe. 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 the --debug option added. give them the receipts, bestie. πŸ“Έ


πŸ‘€ SEE ALSO πŸ‘€

go read those too, iykyk. πŸ’…


πŸ›οΈ CRYPTSETUP πŸ›οΈ

Part of cryptsetup project <https://gitlab.com/cryptsetup/cryptsetup/>.


and that's the whole page, bestie!! 🫢 this was cryptsetup 2.8.8, dated 2026-09-07, from the cryptsetup project β€” so go forth, dump those headers, and stay hydrated. slay. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from