3.2 Partition Schemes: Boot, Root, Home, and Separate /var
Alright, let’s get our hands dirty with partition schemes. You might be staring at your installer’s partitioning screen, wondering if you should just click “Use Entire Disk” and be done with it. Resist that urge. A well-thought-out partition layout isn’t just pedantic sysadmin nonsense; it’s your first line of defense against chaos. It’s the difference between a minor oopsie and a full-scale, scream-into-a-pillow disaster.
The classic trifecta—/boot, / (root), and /home—is your sensible starting point. But we’re going to be thorough, so we’ll also talk about the often-overlooked but incredibly useful /var. Let’s break down what each of these does and why you’d want to give them their own little plot of land on your drive.
Why Bother with Separate Partitions?
Think of it like this: putting everything on one big / partition is like living in a studio apartment where your kitchen, bathroom, and bed are all in one room. Spilling milk on the floor means your bed is now sticky. A separate partition is a wall with a door. If your /home partition—where all your personal data lives—fills up, it doesn’t bring the entire operating system to its knees. The system can still boot, run critical services, and most importantly, give you a stable environment to fix the problem. It also makes backups, migrations, and even distro-hopping drastically simpler. You can nuke your / partition and reinstall the entire OS without touching your precious documents, downloads, and cat pictures in /home.
The /boot Partition (The Bouncer)
This is where the magic starts—literally. /boot contains the bootloader (like GRUB), the kernel images, and the initial RAM disk. The kernel is the bouncer of your operating system; it decides what hardware gets in and how it behaves. We give it its own small, dedicated partition for two key reasons:
- BIOS/Legacy Boot Limitation: Some older BIOS systems simply cannot boot from a partition that starts after a certain point on the disk (past the 2TB mark). A small
/bootpartition at the beginning of the disk avoids this entirely. - Filesystem Simplicity: It’s safest to format this as something utterly reliable and universally supported, like
ext2orext4. You don’t need journaling here—it’s a small, mostly static set of files. Keeping it separate means you can use a more complex filesystem (like Btrfs or XFS) on the rest of your system without making the bootloader sweat.
Aim for 1GB. It’s overkill, but disk space is cheap, and you’ll never have to think about it again.
# Example of creating a /boot partition with parted
(parted) mkpart primary ext4 1MiB 1025MiB
(parted) set 1 boot on
The / (Root) Partition (The Foundation)
This is the foundation of your system. Everything that isn’t in another dedicated partition lives here: the core OS, system utilities, libraries, and all the default application files. Its size is a moving target. For a minimal server, 20GB might suffice. For a desktop with a lot of installed software, 30-50GB is a comfortable starting point. The real space hog is…
The /home Partition (Your Stuff)
This is you. All your user-specific configuration (dotfiles), documents, downloads, videos, music, and source code live here. This is why we do all this. Give this partition all the remaining space on your drive, barring what you might need for /var. When you upgrade your distro or install a new one, you can point it at this existing /home partition, preserve all your data and settings, and feel like a wizard. The size is “yes”.
The /var Partition (The System’s Junk Drawer)
Ah, /var. The designers knew what they were doing here, but most users ignore it. /var is for variable data—stuff that is expected to change during normal operation. This includes:
- Log files (
/var/log) - Spool files (like print queues and mail)
- Caches (
/var/cache) - Databases (if you’re running a server)
- Website root directories (
/var/www)
Why separate it? Because this data can explode in size. If your logging gets out of control, or a web application starts dumping massive cache files, it can fill up your root (/) partition. A full root partition is a special kind of hell; your system can become unstable, you can’t install new software, and you might not even be able to log in to fix it. A separate /var partition contains the blast radius. For a desktop, 10-20GB is usually plenty. For a server, you need to think carefully about what you’re hosting.
# A realistic example for a desktop using fdisk to create a GPT table
# We'll assume a 500GB disk for this demo.
# Create the partitions:
# /dev/sda1 - /boot (1G)
# /dev/sda2 - / (30G)
# /dev/sda3 - /var (20G)
# /dev/sda4 - /home (the rest, ~449G)
sudo fdisk /dev/sda
g # create a new GPT partition table
n # new partition, partition number 1, first sector default, +1G
n # new partition, partition number 2, first sector default, +30G
n # new partition, partition number 3, first sector default, +20G
n # new partition, partition number 4, first sector default, last sector default (rest of space)
w # write the table
# Format the partitions
sudo mkfs.ext4 -L boot /dev/sda1
sudo mkfs.ext4 -L root /dev/sda2
sudo mkfs.ext4 -L var /dev/sda3
sudo mkfs.ext4 -L home /dev/sda4
# Mount them for installation
sudo mount /dev/sda2 /mnt
sudo mkdir /mnt/{boot,home,var}
sudo mount /dev/sda1 /mnt/boot
sudo mount /dev/sda3 /mnt/var
sudo mount /dev/sda4 /mnt/home
The Pitfalls and The “It Depends”
This isn’t dogma. For a simple laptop, maybe /, /home, and a swap file are all you need. The separate /var is for the paranoid and the pros (which you are becoming). The biggest pitfall is not planning for the future. Giving root too little space is a common rookie mistake. You’ll install five desktop environments “just to try them” and suddenly you’re out of space. Another edge case: if you’re using LVM or encryption, you’ll need to create the physical partitions first, then set up the LVM/encryption on top of them, which adds a layer of complexity but also immense flexibility.
The choice is yours, but now you know why you’re making it. You’re not just following a recipe; you’re building a resilient system. Now go partition like you mean it.