Table of Contents
Understanding the `/` (root) Partition
When installing Linux, you must decide how to partition your disk. One of the most important parts is the root partition, written as /.
This chapter focuses on what the / (root) partition is, what goes on it, and how to size and choose it during installation.
What the `/` (root) Partition Is
The / (root) partition is the main filesystem that contains almost everything your Linux system needs to run.
- It is the starting point of the entire directory tree.
- Every other path in the system is below
/, for example: /bin/etc/usr/var/home(unless you put/homeon a separate partition)
At boot, the kernel mounts the root partition first. If the root partition is missing or damaged, the system usually cannot boot normally.
In a simple single-disk setup:
- The root partition is often something like
/dev/sda2or/dev/nvme0n1p2. - The filesystem on it might be
ext4,xfs,btrfs, etc. (details covered in later chapters).
What Lives on `/` (root)
The root partition holds the core system files. While another chapter explains each directory in detail, here’s what typically resides on /:
- System binaries:
/bin,/sbin,/usr/bin,/usr/sbin - System libraries:
/lib,/lib64,/usr/lib,/usr/lib64 - Configuration:
/etc - System-wide applications and shared data:
/usr - Variable data (logs, databases, spool, caches):
/var - Temporary files:
/tmp(unless mounted separately) - Hardware and system info (virtual filesystems):
/dev,/proc,/sys - User home directories if
/homeis not on a separate partition
If you use separate partitions for /home, /var, etc., those are mounted on top of the root filesystem at boot. But the directories that act as their mount points still exist on /.
Why the Root Partition Matters
1. It’s Critical for Boot
The bootloader and kernel need to know where the root filesystem is so they can load:
- system binaries (like
/sbin/initor/lib/systemd/systemd), - configuration files (in
/etc), - libraries and tools needed during early boot.
If the root partition is:
- missing,
- corrupted,
- or its identifier (UUID/device) is wrong in the boot configuration,
the system may drop you into a rescue shell or fail to boot.
2. It Affects Stability and Performance
- If the root partition fills up completely, the system may:
- fail to write logs,
- have services crash,
- become unable to install or update packages,
- sometimes fail to log in properly.
- Keeping enough free space on
/is essential for a healthy system.
How Big Should the Root Partition Be?
Exact sizes depend on:
- whether you use separate partitions for
/homeand/var, - what kind of system this is (desktop, server, minimal VM),
- how many and what size packages you plan to install.
Below are rough guidelines for modern systems.
Scenario 1: Desktop, `/home` Separate (Recommended)
If you store your personal files on a separate /home partition:
- Suggested size for
/: 30–50 GB for a typical desktop. - Light usage: 25–30 GB might be enough.
- Heavy software installation (IDEs, many apps, flatpaks, etc.): aim for 50 GB or more.
Scenario 2: Desktop, Single Big Partition (No Separate `/home`)
Everything (system + user data) lives in /:
- Suggested size for
/: at least 80–100 GB, preferably more if you have space. - You will store documents, downloads, videos, etc. under
/homeinside/.
Scenario 3: Minimal Server or Virtual Machine
For a small server or learning VM, often with no GUI:
- Minimal root: 10–20 GB can work.
- For more flexibility and extra packages: 20–30 GB is comfortable.
Scenario 4: Advanced Layouts
If you have separate partitions for things like /var, /usr, or LVM/Btrfs with subvolumes, the root partition can sometimes be smaller, but that is typically for more experienced administrators and is covered elsewhere.
Where to Place the Root Partition
While the disk layout is discussed in the parent partitioning chapter, these are specific considerations for /:
- It must be on a disk the firmware/bootloader can access.
- On UEFI systems, you usually have:
- a small EFI System Partition (ESP), often FAT32 (
/boot/efi), - plus your root partition (e.g.,
ext4or another Linux filesystem). - On BIOS/legacy systems, the bootloader (e.g., GRUB) is usually installed to the disk’s MBR, and it loads the kernel and then the root filesystem.
You normally choose the root partition while the installer asks, “Where do you want to install Linux?” or “Mount point: /”.
Choosing a Filesystem for `/`
The installer usually suggests a default filesystem for the root partition. As a beginner, it’s usually best to accept the default.
Common choices:
ext4: very common, stable, and well-supported for/.xfs: used by some distributions for root, good for large filesystems.btrfs: offers snapshots and advanced features; some distros use it by default.
The filesystem type affects features and management tools, but the concept of / (root) is the same regardless.
Mount Options and Labels for Root
Most of the time, the installer configures these automatically, but it helps to know what’s going on.
Identifying the Root Partition
In /etc/fstab and the bootloader configuration, the root partition is usually identified by a UUID or a PARTUUID, for example:
UUID=123e4567-e89b-12d3-a456-426614174000 / ext4 defaults 0 1Here:
UUID=...identifies the exact partition./is the mount point (root).ext4is the filesystem type.defaultsis a set of standard mount options.- The final numbers are dump/pass values used by backup and
fsck.
You rarely need to edit this as a beginner, but understanding that the root partition is defined here is useful for troubleshooting.
Root Partition and Separate `/home`
If you choose a separate /home partition during installation:
- Your system files and programs live on
/. - Your personal data lives on the
/homepartition, mounted at/home.
Why this matters for /:
- Installing software still uses space on
/(because packages install under/usr,/lib, etc.). - Large user files (documents, downloads, media) go to
/home, not/. - If you ever reinstall Linux and reuse the same
/homepartition (carefully), you can format/but keep your personal files.
This separation makes it easier to:
- reinstall or change distributions,
- avoid filling up
/with personal data, - keep your system and data somewhat isolated.
Common Problems Related to the Root Partition
1. Root Partition Is Too Small
Symptoms:
- Package installation fails (
No space left on device). - Updates cannot complete.
- Logs may stop being written.
Prevention during install:
- Don’t choose overly tiny sizes for
/. - For desktops, avoid roots smaller than ~25–30 GB unless you know exactly what you’re doing.
Mitigation later (briefly, high-level):
- Remove unnecessary packages.
- Clean package caches.
- Move large data (e.g., databases, Docker images) to other partitions where possible.
2. Wrong Partition Chosen as `/`
During manual partitioning, choosing the wrong partition for / can:
- overwrite another OS,
- erase existing data.
To avoid this:
- Double-check the partition device names and sizes.
- On a dual-boot system, confirm which partition belongs to which OS before assigning
/.
3. Filesystem Problems on `/`
If the filesystem on the root partition gets corrupted, the system may:
- drop to an emergency shell,
- prompt for a manual
fsck, - or fail to mount
/read-write.
This is a more advanced topic, but understanding that / is just a regular filesystem on a partition helps explain why checks and repairs are sometimes needed.
Practical Tips for Beginners
- If you’re unsure, let the installer auto-partition and accept the suggested size for
/(possibly adjusting upward if you have plenty of disk space). - For a personal desktop/laptop, using:
- one root partition
/+ one separate/homepartition - plus swap (or swapfile)
is a safe, beginner-friendly layout. - Always leave free space on
/. Try not to fill it above ~80–90% in regular use.
The root partition is the base of your entire Linux system. During installation, your key tasks for / are:
- Select which partition will be mounted as
/. - Pick a reasonable size.
- Choose a filesystem (or accept the default).
Once that’s done, the installer will handle the rest, and your system will know where its “root” really is.