Where Is the crypttab File?
Where Linux encrypted-volume mappings live in crypttab, and how it pairs with fstab at boot.
Last updated
crypttab at /etc/crypttab maps encrypted block devices to unlocked names at boot. Each line names a target, a source, and key handling. systemd reads it early through systemd-cryptsetup.
fstab mounts the result. The two files reference each other by mapper name, so edits come in pairs. Verify UUIDs with blkid; stale device paths are the classic unbootable typo.
Where crypttab stores this, by platform
/etc/crypttab
One line per encrypted volume (target, source UUID, key, options). Pair with fstab entries on /dev/mapper names. Validate UUIDs with blkid after disk changes.
Frequently asked questions
How do I add an encrypted volume?
Add a line with target name, source device (UUID=...), key file or none, and options like luks,discard. Then run systemctl daemon-reload. Test with cryptdisks_start or a reboot; a typo here stalls the boot waiting for the device.
How do crypttab and fstab relate?
crypttab unlocks the device to /dev/mapper/<name>; fstab then mounts that mapper path. Keep the names in sync between the two files. Back up LUKS headers with cryptsetup luksHeaderBackup before editing either.
Notice an outdated path? Let us know.