Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

LUKS

Direct answer

LUKS is the standard Linux disk encryption format on dm-crypt. It stores encrypted volume keys in key slots unlocked by passphrases, key files or TPM, managed with cryptsetup.

When to use this

Use this when encrypting Linux disks with LUKS.

First 30 seconds

1. LUKS encrypts Linux block devices (LUKS2 default).

2. Multiple keyslots (passphrase, key file, TPM2, Tang/clevis).

3. Back up the header — corruption = data loss.

4. Unlock at boot via crypttab.

5. Argon2id KDF.

Operational verification

keyslot → master key → dm-crypt → filesystem

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • No backup of the LUKS header (cryptsetup luksHeaderBackup) — a damaged header loses all data.
  • Only one keyslot with a passphrase nobody remembers.
  • Weak PBKDF parameters on LUKS1; LUKS2 with Argon2id is the default.
  • Forgetting /etc/crypttab entries, so volumes do not unlock at boot.
Platform / version applicability
Data protection and recovery
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformData protection and recovery
Scope / prerequisiteUse this when encrypting Linux disks with LUKS.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Back up the LUKS header.
  • Several key slots allow passphrase and key file.
  • Lost passphrase = lost data.
Key checks
  • cryptsetup luksDump /dev/<dev> — header and keyslots
  • cryptsetup status <name> — active mapping
  • cryptsetup luksHeaderBackup /dev/<dev> --header-backup-file hdr.img — header backup
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

LUKS (Linux Unified Key Setup) encrypts block devices with dm-crypt; a header holds up to 32 keyslots (LUKS2), each able to unlock the master key with a passphrase, keyfile, TPM2 or FIDO2 token.

cryptsetup luksFormat --type luks2 /dev/sdb
cryptsetup open /dev/sdb data; mkfs.xfs /dev/mapper/data
cryptsetup luksDump /dev/sdb               # keyslots, cipher (aes-xts-plain64)
cryptsetup luksHeaderBackup /dev/sdb --header-backup-file sdb-luks.hdr
systemd-cryptenroll --tpm2-device=auto /dev/sdb

Back up the header: if it is damaged, the data is unrecoverable even with the correct passphrase. Unlock at boot via /etc/crypttab.

ReferenceConfiguration & state2 sections · depth on demand

Commands

cryptsetup luksFormat --type luks2 /dev/sdb
cryptsetup open /dev/sdb data
mkfs.xfs /dev/mapper/data
cryptsetup luksDump /dev/sdb
cryptsetup luksAddKey /dev/sdb
cryptsetup luksHeaderBackup /dev/sdb --header-backup-file sdb-header.img
systemd-cryptenroll --tpm2-device=auto /dev/sdb

Documented example, not captured output. Back up the LUKS header (damage makes data unrecoverable). Auto-unlock with TPM2, Clevis/Tang (network-bound) or a key file in /etc/crypttab.

Commands

cryptsetup luksDump /dev/sdb1
cryptsetup luksAddKey /dev/sdb1
cryptsetup luksHeaderBackup /dev/sdb1 --header-backup-file sdb1-header.img
systemd-cryptenroll --tpm2-device=auto /dev/sdb1

Documented example, not captured output. Store header backups securely — they plus a passphrase unlock the volume.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docData protection and recovery current

Authoritative/upstream documentation reviewed for bounded claims in Data Protection → LUKS. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://csrc.nist.gov/pubs/sp/800/209/final · confidence 94%
Confirmation

Confirm action

Continue?