Table of Contents
Understanding Disk Partitioning in Linux Installation
Partitioning is the step where you decide how your disk is divided into separate logical sections (partitions) before installing Linux. In this chapter you’ll focus on what you actually need to know and choose during installation, without going deep into advanced storage topics.
Why Partition at All?
During installation, the system needs:
- A place to store the operating system files
- A place for your personal files
- Optional areas for swap, boot data, or encryption
Partitioning controls how these areas are separated on your disk. This affects:
- How easy it is to reinstall the system without losing personal data
- How safe your data is from system errors
- How multiple operating systems can share the same disk
Basic Terms You Will See in Installers
When using a graphical or text installer, you’ll often see these terms:
- Disk / Device: The whole physical drive, e.g.
/dev/sda,/dev/nvme0n1 - Partition: A section of a disk, e.g.
/dev/sda1,/dev/sda2 - Filesystem: The format used on a partition, e.g.
ext4(commonly used for Linux),ntfs(Windows),vfat(FAT32) - Mount point: The directory where a partition is attached into the Linux filesystem (e.g.
/,/home,/boot) - Free space / unallocated: Space on the disk not yet assigned to a partition
You usually do not need to work directly with fdisk or parted at installation time; the installer provides a GUI or menu-based partitioning tool built on top of these.
Partitioning Schemes: Automatic vs Manual
Most Linux installers offer two broad approaches:
Automatic (Guided) Partitioning
Typical options you’ll see:
- “Erase disk and install Linux”
- “Use entire disk”
- “Guided – use entire disk with LVM”
- “Guided – use entire disk and set up encrypted LVM”
Characteristics:
- Installer chooses how many partitions to create and their sizes
- Safest for beginners if you don’t need dual-boot
- Fast and usually sensible defaults
When to use it:
- You’re installing Linux on a computer where Linux will be the only OS
- You’re okay with the installer erasing the entire disk
- You don’t care about custom layout yet
Manual (Custom / Something Else) Partitioning
Names vary:
- “Manual partitioning”
- “Something else”
- “Custom storage configuration”
Use this when:
- You want to dual-boot with Windows or another Linux
- You need specific sizes for
/,/home, or swap - You want to re-use existing partitions
- You want to keep a data partition untouched
Manual mode lets you:
- Create / delete / resize partitions
- Choose mount points like
/,/home,/boot - Choose filesystems (e.g.
ext4) - Decide whether to format each partition
Partition Table Types: MBR vs GPT (Just Enough to Choose)
The disk has a partition table describing how partitions are arranged.
For beginners, you usually just need to recognize two names:
- MBR (msdos): Older style
- Max ~2 TB per disk
- Maximum 4 primary partitions (workaround with “extended” partitions)
- GPT: Modern style (recommended)
- Supports large disks (multi-TB)
- Many more partitions
- Required for some UEFI setups
On modern systems with UEFI firmware, installers normally choose GPT automatically. Unless you have an old machine or a specific reason, accept the default.
Typical Partitions in a Linux Install
You don’t have to memorize many layouts. For a simple desktop or laptop installation, you generally only need 2–3 partitions:
- Root (
/) – required - Swap – optional but recommended in many setups
- Home (
/home) – optional but very useful
Other partitions like /boot, /boot/efi, or separate /var are more specialized and usually handled automatically by the installer in guided modes.
1. Root Partition (`/`)
- Purpose: Holds the core of the OS: system programs, libraries, configuration, etc.
- Mount point in installer:
/ - Filesystem: Typically
ext4 - Size guideline for a beginner desktop:
- Minimal usage: 20–30 GB
- Comfortable: 40–60 GB
- Very large apps / games / containers: 80+ GB
Beginner recommendation: If you don’t want to think too much, give / at least 40 GB so you don’t run out of space quickly.
2. Swap Area
Swap is disk space used when RAM is full or for some power-saving features like hibernation.
You may see:
- A dedicated swap partition
- A swap file on an existing partition
Many modern installers default to a swap file, so you might not need to create a separate swap partition manually. But if you do:
- Size guidelines (rough):
- If RAM ≤ 4 GB: swap = 2–4 GB
- If RAM 8–16 GB: swap = 2–8 GB
- If using hibernation: aim for about size of RAM (or a bit less, depending on usage)
If unsure and using guided partitioning, just accept the default.
3. Home Partition (`/home`)
- Purpose: Stores your personal files and per-user settings
- Mount point:
/home - Why have it separate?
- You can reinstall Linux (format
/) without losing personal data (/home) - Easier to share a data area among multiple Linux installations
Beginner rule of thumb:
- If you create a separate
/home, give it all remaining space after/and swap.
If you prefer simplicity, you can skip separate /home and just have everything under a single / partition; personal data will simply live inside /home on that partition.
Step-by-Step: A Simple Manual Layout Example
Imagine you have a 500 GB disk and want:
- Linux only (no dual-boot)
- A separate
/home - Swap partition
A reasonable manual layout:
- EFI System Partition (ESP) (if using UEFI, often created automatically)
- Size: 300–500 MB
- Filesystem: FAT32
- Mount point:
/boot/efi(installer will know this) - Usually do not format it if dual-booting with Windows; ok to format on Linux-only installs.
- Root (
/) - Size: 40–60 GB
- Filesystem:
ext4 - Mount point:
/ - Mark to format
- Swap
- Size: 4–8 GB (depends on RAM and hibernation)
- Type:
swap - Home (
/home) - Size: all remaining space (e.g. ~430 GB)
- Filesystem:
ext4 - Mount point:
/home - Mark to format (unless reusing an existing
/homecarefully)
If using a BIOS/legacy system with MBR and no UEFI, you might skip the EFI partition and just have /, swap, and /home.
Dual-Boot Considerations (At Partition Level Only)
If you’re dual-booting with Windows or another OS, partitioning becomes more delicate. High-level things to keep in mind:
- Never format the Windows partition (commonly NTFS, often the largest one labeled “OS” or similar).
- Use Windows tools first to shrink the Windows partition if needed, leaving unallocated space.
- In the Linux installer’s manual partitioning:
- Use the unallocated space to create
/, swap, and optionally/home. - Ensure you select the correct target drive for the bootloader (often the same disk where Windows lives).
As a beginner, always double-check labels, sizes, and filesystems before clicking “Format” or “Install”.
Filesystem Choice (Just What You Need Here)
For basic installations, you can almost always choose:
ext4for Linux partitions (/,/home,/varif you ever create it)swaptype for swap partitions- Leave existing NTFS or FAT32 partitions as they are if they belong to Windows or are data drives
Other filesystems (XFS, Btrfs, etc.) are suitable for more advanced setups and are covered elsewhere.
Common Installer Options You’ll Encounter
When editing or creating a partition in the installer, you typically set:
- Use as: e.g.
Ext4 journaling filesystem,Swap area - Mount point: e.g.
/,/home,/boot,/boot/efi, or leave empty for non-Linux data - Format?: checkbox or option to erase existing contents
Safe beginner rules:
- For new Linux-only installs on a blank disk:
- Format all new Linux partitions.
- For dual-boot where you are reusing Windows and data partitions:
- Do not format those existing non-Linux partitions.
- If reusing an existing
/homefrom a previous Linux installation: - Usually set mount point
/home - Carefully decide whether to avoid formatting to keep data (requires understanding of users and permissions, covered later).
Minimal “Don’t-Panic” Checklist Before You Click Install
Before you start the actual installation:
- Confirm which disk you are using (e.g.
/dev/sdavs/dev/sdbif multiple disks). - Check that the partition with mount point
/is: - Large enough (≥20–30 GB, ideally more)
- Marked for
ext4(or your chosen filesystem) - Marked to format (for fresh install)
- Check that you have swap, either:
- A swap partition, or
- The installer says it will create a swap file
- If you created
/home: - It has mount point
/home - It uses
ext4(or another Linux filesystem) - For dual-boot:
- Windows partition is still listed, not marked to format
- EFI System Partition (if present) is not incorrectly formatted unless you intend a clean Linux-only system
If all of that looks correct, you’re usually safe to proceed with installation.
Summary
- Partitioning is about how your disk is divided for Linux and other operating systems.
- Beginners can rely on guided partitioning when using a disk for Linux only.
- Manual partitioning is needed mainly for dual-boot or custom layouts.
- For a simple manual layout, aim for:
/(root): 40+ GB,ext4- swap: a few GB, or use installer defaults
- optional
/home: remaining space,ext4 - Always double-check disk, sizes, mount points, and which partitions will be formatted before starting the installation.