CertGrid CertGrid
Hands-on Lab·LPIC-2

An encrypted volume, and what the header holds

Objective 203.3 names encrypted filesystems and the path had nothing on them. This guide formats a LUKS2 container, opens it, puts a filesystem inside, adds a second passphrase, backs up the header that holds the master key, closes it, and shows exactly what an unopened container discloses - then writes the crypttab line that would open it at boot.

201: Filesystems and Storage Guide 26 of 29 Intermediate

One host. The container is a file attached as a loop device, so every command here works on a machine with no spare disk.
Server NameIP AddressOSRolesCPURAMHDD
LPIC2-A01192.168.0.78Ubuntu 26.04 LTSPrimary service host - BIND, Apache, Samba, Postfix. Topic 204 RAID runs on loop devices; this machine has no spare disk2 Core4 GB50 GB

This guide includes

Use this when data has to survive the disk leaving the building. This matters because the passphrases do not encrypt anything - they unlock a master key stored only in the header, so losing that header loses the data even if every passphrase is known.

Before you start

  1. A device to encrypt

  2. Formatting it as a LUKS container

  3. Opening it, and what appears when you do

  4. A second passphrase, and what the header holds

  5. Closing it, and what is left on disk

  6. The crypttab line that would open it at boot

  7. Putting the machine back

Official sources