Kahibaro
Discord Login Register

`/` (root)

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.

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:

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 /:

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:

If the root partition is:

the system may drop you into a rescue shell or fail to boot.

2. It Affects Stability and Performance

How Big Should the Root Partition Be?

Exact sizes depend on:

Below are rough guidelines for modern systems.

Scenario 1: Desktop, `/home` Separate (Recommended)

If you store your personal files on a separate /home partition:

Scenario 2: Desktop, Single Big Partition (No Separate `/home`)

Everything (system + user data) lives in /:

Scenario 3: Minimal Server or Virtual Machine

For a small server or learning VM, often with no GUI:

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 /:

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:

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 1

Here:

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:

Why this matters for /:

This separation makes it easier to:

Common Problems Related to the Root Partition

1. Root Partition Is Too Small

Symptoms:

Prevention during install:

Mitigation later (briefly, high-level):

2. Wrong Partition Chosen as `/`

During manual partitioning, choosing the wrong partition for / can:

To avoid this:

3. Filesystem Problems on `/`

If the filesystem on the root partition gets corrupted, the system may:

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

The root partition is the base of your entire Linux system. During installation, your key tasks for / are:

  1. Select which partition will be mounted as /.
  2. Pick a reasonable size.
  3. 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.

Views: 23

Comments

Please login to add a comment.

Don't have an account? Register now!