LinuxCommandLibrary

cryptdisks_start

Unlock encrypted block devices

SYNOPSIS

cryptdisks_start [-a] [-q] [-v] [name ...]

PARAMETERS

-a, --all
    Start all devices listed in /etc/crypttab.

-q, --quiet
    Suppress status output messages.

-v, --verbose
    Print detailed status messages.

name ...
    Start only the specified device name(s) from crypttab.

DESCRIPTION

cryptdisks_start is a helper script for activating encrypted block devices using Linux's device-mapper (dm-crypt, typically LUKS). It parses /etc/crypttab to identify configured mappings and invokes cryptsetup (or equivalent) to open them, creating /dev/mapper/<name> devices.

Primarily used during boot by initramfs or system initscripts in Debian-based distros, it prompts for passphrases interactively or uses keyfiles/scripts as specified in crypttab. Supports plain dm-crypt, LUKS, and other types via cryptsetup backends. Specific devices can be targeted by name, or all can be started.

Output is controlled via flags; it's root-only and logs to syslog. Ensures dependencies (e.g., resume devices) are handled correctly for hibernation. Essential for systems with encrypted root or data partitions, integrating seamlessly with fstab mounts post-unlock.

CAVEATS

Requires root privileges. Interactive passphrase prompts unless keyfiles or tokens configured. Devices must match /etc/crypttab exactly; failures log to syslog.

EXAMPLES

Start all: cryptdisks_start -a
Start specific: cryptdisks_start homelvm
Verbose: cryptdisks_start -v rootcrypt

/ETC/CRYPTTAB FORMAT

name UUID=<uuid> /path/to/keyfile luks or options.

HISTORY

Developed for Debian's cryptsetup integration around 2006 with LUKS 1.0; evolved for boot-time handling in initramfs-tools, supporting LUKS2 and modern features.

SEE ALSO

cryptdisks_stop(8), cryptsetup(8), dmsetup(8), crypttab(5)

Copied to clipboard