Partitions, LVM and encryption (LUKS)
In short: A drive is divided into partitions. With LVM you can resize them flexibly later, with LUKS you encrypt them. UEFI systems need a small EFI partition.
In more detail: Typical layout: EFI system partition (about 512 MB, FAT32), root /, optional /home, optional swap.
In detail
- Partition table: GPT (modern, UEFI) or MBR (old, BIOS, max. 2 TB).
- Tools:
lsblk,fdisk,parted, graphical GParted, KDE Partition Manager. - LVM (logical volume manager): physical disks → volume group → logical volumes, size changeable while running, snapshots.
- LUKS: encrypts a partition (AES), unlock with password or key (
cryptsetup). Protects if the device is stolen, see The Linux kernel at a glance for access. - Swap: swap space as partition, file or zRAM (compressed RAM). For hibernation at least as large as RAM.
- Dual boot: install Windows first, Linux afterwards, disable fast startup in Windows.
- Caution: formatting the wrong partition means data loss: back up first, check the device with
lsblk.
See also: Linux file systems: ext4, Btrfs, XFS and ZFS, Boot process: UEFI, GRUB, initramfs and kernel