part of a volume group, or an association of several physical volumes. Physical volumes are real
partitions (or virtual partitions exported by other abstractions, such as a software RAID device or
an encrypted partition).
With its lack of distinction between “physical” and “logical” partitions, LVM allows you to create
“virtual” partitions that span several disks. The benefits are twofold: the size of the partitions is
no longer limited by individual disks but by their cumulative volume, and you can resize existing
partitions at any time, such as after adding an additional disk.
This technique works in a very simple way: each volume, whether physical or logical, is split into
blocks of the same size, which LVM correlates. The addition of a new disk will cause the creation
of a new physical volume providing new blocks that can be associated to any volume group. All of
the partitions in the volume group can then take full advantage of the additional allocated space.
Introduction to LUKS To protect your data, you can add an encryption layer underneath your file system of choice. Linux
(and more particularly the dm-crypt driver) uses the device mapper to create the virtual partition
(whose contents are protected) based on an underlying partition that will store the data in an
encrypted form (thanks to LUKS). LUKS standardizes the storage of the encrypted data as well as
meta-information that indicates the encryption algorithms used.
We will be setting up LUKS as part for our ”nuke” feature later in “
Adding a Nuke Password for
Extra Safety
” [page 250].
Encrypted Swap Partition When an encrypted partition is used, the encryption key is stored in memory (RAM),
and when hibernating, a laptop will copy the key, along with other contents of RAM,
to the hard disk’s swap partition. Since anyone with access to the swap file (including
a technician or a thief) could extract the key and decrypt your data, the swap file must
be protected with encryption.
Because of this, the installer will warn you if you try to use an encrypted partition
alongside an unencrypted swap partition.
89
Chapter 4 — Installing Kali Linux
Setting Up Encrypted Partitions The installation process for encrypted LVM is the same as a standard installation except for the