Table of Contents
Understanding Partitioning in Linux Installation
Partitioning is the step in the installation process where you decide how your disk is divided into separate sections, called partitions. Each partition behaves like a separate disk from the operating system’s point of view. In Linux, these partitions are then used to hold filesystems that are mounted at specific directory locations.
Why Partitioning Matters
Partitioning determines how your data is organized on the physical disk. During installation, the Linux installer will ask you where to put the system. You can let it partition automatically or choose to do it manually. Even when you use automatic partitioning, it is helpful to understand what is happening, because partition choices influence how easy it is to back up data, reinstall the system, or recover from problems.
A partition can contain a Linux filesystem, a swap area, a Windows filesystem, or other types of data. The Linux installer will map these partitions to mount points such as /, /home, and to a special swap area.
Important rule: Changing partitions on a disk that already has data may destroy existing data if you delete or overwrite them. Always back up important files before modifying partitions.
Basic Concepts: Disks, Partitions, and Filesystems
At the lowest level, you have a physical storage device, often shown in Linux as something like /dev/sda, /dev/nvme0n1, or similar. This whole device can be split into one or more partitions. Partitions are represented as /dev/sda1, /dev/sda2, /dev/nvme0n1p1, and so on.
The installer will then create a filesystem on top of a partition, for example an EXT4 filesystem. Finally, that filesystem is attached to a directory in the Linux tree, a process called mounting. For example, a partition might be mounted on / or /home. The details of specific directories and their purposes belong to other chapters, but for partitioning you mainly need to know that a single physical disk can support several different parts of your Linux system.
In modern systems that use UEFI firmware, there is often also a small existing partition called an EFI System Partition. It is usually formatted with a FAT filesystem and is used by the firmware to load bootloaders. When you install Linux on such a system, the installer may need to mount that partition as /boot/efi, but the installer will usually handle this automatically or guide you.
Partition Tables: MBR vs GPT
Every disk that uses partitions has a structure called a partition table. It describes where each partition starts and ends. The two main partition table formats you are likely to see are MBR and GPT.
MBR, also known as DOS partition table, is older and has limitations. The most visible limitation for beginners is that it supports up to four primary partitions. If you need more, it uses a mechanism with extended and logical partitions, which can be confusing. MBR also has limits on maximum disk size.
GPT, the GUID Partition Table, is newer and is normally paired with UEFI firmware. It supports many more partitions and works better with large disks. Most new systems and modern Linux distributions prefer GPT.
You usually do not need to choose this manually, because the installer either uses the existing scheme on the disk or recommends GPT for new installations. However, if you completely erase a disk, you may see an option to initialize it as GPT. GPT is the recommended choice for modern systems.
Automatic vs Manual Partitioning
During installation, you will typically be offered automated choices such as “Erase disk and install Linux” or “Install alongside existing systems” and an option to manage partitions manually, sometimes labelled “Something else” or “Manual partitioning”.
Automatic partitioning is suitable for beginners if you are installing Linux on a completely empty disk or you do not mind losing all data on that disk. The installer will pick common partition sizes, create the necessary entries, and set up /, often /home, and swap for you.
Manual partitioning gives you control over which partitions are created, which to reuse, and where each partition is mounted. This is essential if you want to dual boot on a single disk, keep an existing data partition, or use a custom layout.
Important rule: If you choose an option that says it will erase or format a disk, all existing partitions and their data on that disk will be lost. Read the installer’s summary carefully before confirming changes.
Typical Layout for a Simple Linux Installation
A very simple Linux installation can work with just two main areas: one for the system, and one for swap. Many installers will also add a separate /home partition if there is enough space. The detailed roles of /, /home, and swap are covered in their own chapters, but here you need to understand how they relate to partitioning.
The partitioning step will ask you to allocate space to these parts. For example, on a 500 GB disk, one common layout is a large partition for / that also contains user files, a swap area of a few gigabytes, and possibly a separate /home partition. As you learn more, you may choose more advanced layouts, but this basic idea is enough for a first installation.
How Installers Display Partitions
Different distributions use different partitioning tools in their installers, but they share common ideas. You see a list of disks, and each disk shows its partitions with their sizes, types, and current contents. You may also see color bars showing how the disk is currently used.
Each partition entry usually shows information such as:
- Device name, for example
/dev/sda1. - Size, for example
100.0 GiB. - Type, for example “EXT4”, “swap”, “EFI System Partition”.
- Current mount point if any, for example
/or/home.
To install Linux, you will either choose an automated layout or, in manual mode, select an existing partition or free space and assign it a mount point such as / and a filesystem type such as EXT4.
If there is free unallocated space, you can create new partitions inside that space. If no free space exists and you do not want to erase the whole disk, you may need to shrink an existing partition. Most graphical installers can shrink partitions, particularly Windows NTFS partitions, to make room for Linux. This operation can be slow and carries some risk, which is why a backup is strongly recommended.
Basic Procedure in Manual Partitioning
If you decide to try manual partitioning, the overall procedure is quite similar across installers. First you choose the disk where Linux will live. If you want Linux to have the whole disk and there is no important data, you can delete existing partitions on that disk, which will turn the space into unallocated space. From that unallocated space, you then create new partitions.
For each partition you create, you choose its size, filesystem type, and mount point. For example, you might create one partition for / with an EXT4 filesystem, another partition for /home with EXT4, and a swap area. You then confirm that the installer should format these partitions. Formatting a partition will erase its old contents and create a new filesystem.
If you need to reuse an existing partition that already has data you want to keep, for example a data partition shared with another system, you must be careful not to mark it for formatting. Instead, you can simply assign a mount point to it or leave it unchanged, depending on your plan.
Partition Sizes and Simple Planning
Choosing partition sizes is partly a matter of preference and depends on how large your disk is and how you intend to use your system.
For a single user system with a reasonably large disk, a simple approach is to create a partition for / that takes most of the disk. This is often easiest for beginners. Later, if you learn more, you can choose a separate partition for /home, which stores user files, so that reinstalling the system can be done without touching personal data.
Swap size can be modest on systems with lots of RAM. There is no single strict formula that fits every case, but a traditional suggestion is that swap should be at least some fraction of your RAM. For modern desktops with, for example, 8 GB or 16 GB of RAM, a swap area of a few gigabytes is common. Exact swap policies and advanced uses like hibernation will be explored elsewhere.
Important guideline: On a beginner system, it is usually better to keep the partition scheme simple. A single large / partition plus swap is often easier to manage than many small partitions that might run out of space.
Partitioning When Dual Booting
When you install Linux alongside an existing operating system on the same disk, partitioning becomes more delicate. You must make room for Linux without destroying the existing system.
The two main approaches are to use unallocated free space that already exists on the disk, or to shrink an existing partition, usually the main partition of the other operating system. The installer often offers an option that says it will install alongside the existing system, and behind the scenes it will shrink the other partition and create new ones for Linux.
If you choose manual partitioning in this scenario, you need to leave the existing system partitions untouched. You would identify them by their filesystem type, such as NTFS for Windows, and by their size and location. You then either shrink them if the tool supports it or use existing unallocated space to create the Linux partitions. You also need to ensure there is room for the bootloader, which the installer manages, usually by reusing the existing EFI System Partition on UEFI systems.
Because of the risk of data loss, careful reading of the partitioning summary and a recent backup are especially important when you share a disk with another operating system.
Filesystem Choices for Partitions
In the partitioning step, you also choose which filesystem to use for each partition that will hold Linux data. For almost all beginner installations, choosing EXT4 for the main Linux partitions is appropriate. It is stable, widely supported, and used as the default by many distributions.
You may see other options such as XFS, Btrfs, or F2FS, but unless the distribution specifically recommends one of them for certain features, sticking with the default is usually best. The type for swap is not a regular filesystem but a special “swap area” that the installer will set correctly when you mark that partition as swap.
Working with Empty and Used Disks
On a completely empty disk that has no partition table or partitions, the installer will typically propose to create a new partition table, usually GPT, and then set up partitions automatically. This is the simplest case and removes the risk of damaging existing data.
On a disk that already has partitions, perhaps from a previous system or a factory installation, you must decide whether to reuse, shrink, or remove those partitions. If you are repurposing an entire disk for Linux and do not need what is on it, you can safely remove all partitions. If you only want to reuse part of the disk, you need to keep the partitions that hold important data and only modify or delete others.
Partitioning tools usually show which partitions are flagged as bootable, which ones are used for EFI, and some hint of their contents. Learning to recognize them is useful. For example, a small partition of a few hundred megabytes formatted as FAT32 and labelled “EFI System Partition” is almost always the one used by UEFI for booting.
Checking the Summary Before Writing Changes
Before the installer actually writes the new partition layout to disk, there is usually a summary screen. It lists operations such as “Create partition” with sizes and mount points, and “Format partition” with the filesystem type. This is your last chance to detect mistakes.
You should verify that:
The correct disk is selected if you have more than one.
Partitions that contain data you want to keep are not marked for formatting.
Partitions for the Linux system have appropriate sizes and mount points.
Swap has been created if you want it.
Only after confirming this summary should you proceed. Once the installer writes changes to disk, reverting them can be difficult or impossible without backups.
After Installation: Seeing Your Partitions from Linux
Once Linux is installed and running, you can inspect the partitions through graphical tools provided by the desktop environment or via command line utilities such as lsblk and fdisk in later chapters. These commands show how the system actually used the partitions you defined during installation.
You will see how each partition corresponds to a device like /dev/sda1 and how it is mounted at a point in the directory tree. Understanding this link helps you make sense of both the filesystem hierarchy and the underlying storage layout.
Partitioning is one of the more technical steps of installing Linux, but in many cases you can rely on the installer’s defaults. Over time, as you gain experience, you can design more customized schemes. For a first installation, a simple layout with a root partition, optional /home partition, and swap is usually all you need.