Home
Optimal Partitioning Scheme for Ubuntu 24.04 Installation
Partitioning is the foundational step of any Linux installation, and with the release of Ubuntu 24.04 LTS (Noble Numbat), the requirements for a stable and performant system have evolved. Whether you are a newcomer transitioning from Windows or a seasoned sysadmin setting up a new workstation, understanding how to allocate your disk space ensures long-term system health and simplifies future upgrades.
Modern hardware, such as NVMe SSDs and high-capacity HDDs, changes how we think about storage. In the context of Ubuntu 24.04, partitioning is no longer just about dividing space; it is about optimizing for speed, data safety, and compatibility with modern features like UEFI and hibernation.
Should you choose automatic or manual partitioning?
The Ubuntu 24.04 installer offers a streamlined "Erase disk and install Ubuntu" option. This automatic method is the most reliable choice for users who intend to dedicate an entire drive to Linux. It handles the creation of the EFI system partition and sets up a single large root partition with a swap file.
However, manual partitioning—referred to as "Something Else" or "Manual Installation" in the installer—is necessary in several specific scenarios:
- Separating Personal Data: By placing your
/homedirectory on a different partition, you can reinstall or upgrade your operating system without wiping your documents, photos, and configurations. - Multi-Drive Setups: If you have a fast SSD for the operating system and a slow, large HDD for storage, manual configuration is the only way to utilize both effectively.
- Dual-Booting: When installing alongside Windows or another Linux distribution, you must manually manage space to avoid overwriting existing data.
- Advanced Features: If you require specific file systems like Btrfs for snapshots or need a dedicated Swap partition for hibernation, the automatic installer will not suffice.
What are the essential partitions for Ubuntu 24.04?
A standard, robust manual layout for Ubuntu 24.04 consists of four primary components. Understanding the role of each is critical to avoiding the "disk full" errors that often plague Linux users a few months after installation.
EFI System Partition (ESP)
On all modern UEFI-based computers, the EFI partition is the first thing the BIOS looks for to start the boot process.
- Mount Point:
/boot/efi - Recommended Size: 512 MB to 1 GB.
- File System: FAT32.
- Why this size?: While older guides suggest 100 MB, modern systems often store multiple kernels and bootloaders (especially in dual-boot setups). A 1 GB allocation ensures you never run out of space during a critical firmware update.
The Root Partition (/)
The root partition is the heart of the system. It houses the Ubuntu OS, system libraries, configuration files, and all installed applications.
- Mount Point:
/ - Recommended Size: 100 GB or more.
- File System: Ext4 (recommended for stability) or Btrfs.
- The "Snap" Factor: In our testing of Ubuntu 24.04, we found that the heavy reliance on Snap packages increases the storage footprint of the root partition. Each Snap keeps multiple versions of itself for easy rollbacks, which can quickly consume 30–50 GB. Setting the root partition to at least 100 GB provides a comfortable buffer for several years of use.
The Home Partition (/home)
This is where your user profile resides, including your Downloads, Desktop, and application-specific settings (like browser profiles and SSH keys).
- Mount Point:
/home - Recommended Size: Remaining available space.
- File System: Ext4.
- Advantage: If your Ubuntu installation breaks and you need to perform a "clean install," you can simply re-mount this partition as
/homewithout formatting it. Your files remain untouched, and your desktop environment will look exactly as it did before once you log in.
The Swap Partition
Swap acts as "overflow" memory when your physical RAM is full.
- Mount Point: None (it is recognized as swap space).
- Recommended Size: Depends on RAM and use case.
- File System: swap.
- Usage Insight: Ubuntu 24.04 uses a Swap File by default within the root partition. However, if you want to use the "Hibernate" feature (suspending the computer to the disk so it uses zero power), you typically need a physical Swap Partition that is equal to or slightly larger than your RAM (e.g., 16 GB of RAM requires an 18 GB Swap partition).
How to partition for an SSD and HDD combination?
Many laptops and desktops ship with a small SSD (128 GB or 256 GB) and a larger HDD (1 TB or more). This setup requires a strategic manual partitioning approach to balance speed and capacity.
In this scenario, we recommend placing the "performance-critical" data on the SSD and the "bulk storage" on the HDD. Here is a proven layout:
On the SSD (e.g., /dev/nvme0n1):
- EFI Partition: 1 GB (FAT32).
- Root Partition (/): 80 GB - 100 GB (Ext4). This ensures the OS and all programs (like VS Code, Chrome, or CAD tools) load instantly.
- Swap Partition: If you have space left and need hibernation, place it here for speed.
On the HDD (e.g., /dev/sda):
- Home Partition (/home): Allocate the entire drive (Ext4). This allows you to store terabytes of videos, games, and large datasets without slowing down the operating system.
Choosing the right file system: Ext4 vs. Btrfs vs. XFS
When manually partitioning in the Ubuntu 24.04 installer, you will be asked to choose a file system. While "Ext4" is the default for a reason, other options serve specific purposes.
- Ext4 (Fourth Extended Filesystem): This is the golden standard for Linux desktops. It is extremely stable, handles power failures well, and is easy to recover if something goes wrong. For 90% of users, Ext4 is the correct choice for both
/and/home. - Btrfs (B-Tree Filesystem): Gaining popularity in the Linux community, Btrfs supports "snapshots." This means you can save the state of your system before a major update and revert to it instantly if the update fails. If you are an enthusiast who likes to experiment with system settings, Btrfs on the
/partition is a powerful tool. - XFS: Often used in server environments and for very large partitions. It handles high-performance parallel I/O better than Ext4. However, it is more difficult to shrink (resize down) than Ext4, making it less flexible for desktop users who might want to change their partition sizes later.
Step-by-step guide to manual partitioning in the installer
Once you reach the "Installation type" screen in the Ubuntu 24.04 installer, follow these steps to set up your manual layout:
- Enter Manual Mode: Select "Something Else" or "Manual Installation" and click Continue.
- Identify Your Drive: You will see a list of devices (e.g.,
/dev/sdafor SATA drives or/dev/nvme0n1for NVMe drives). If the drive is new, click "New Partition Table" (use GPT for modern systems). - Create EFI: Select the "Free Space," click the
+icon, set size to1024 MB, use as "EFI System Partition." - Create Root: Select "Free Space," click
+, set size to102400 MB(100 GB), use as "Ext4 journaling file system," mount point/. - Create Swap (Optional): If you need a partition, select "Free Space," click
+, set size (e.g.,16384 MB), use as "swap area." - Create Home: Select the remaining "Free Space," click
+, use the rest of the space, set as "Ext4 journaling file system," mount point/home. - Select Boot Loader Device: Ensure the "Device for boot loader installation" is set to the physical drive (e.g.,
/dev/nvme0n1), not a specific partition. - Confirm: Click "Install Now." A summary will appear; review it carefully to ensure no other partitions (like a Windows partition) are being formatted by mistake.
Why is a separate Var partition sometimes mentioned?
In older server-oriented tutorials, you might see recommendations for a separate /var partition. This directory stores logs, databases, and temporary mail files. On a server, if logs grow too large and fill the partition, having a separate /var prevents the entire system (the / partition) from crashing.
For a modern desktop user, a separate /var is rarely necessary and often causes more trouble than it solves, as it is difficult to predict exactly how much space logs or Docker containers will eventually occupy. We recommend keeping /var inside the root partition for simplicity.
How to verify your partition layout after installation?
Once Ubuntu 24.04 is installed and you have logged in, you should verify that everything is mounted correctly. Open a terminal (Ctrl+Alt+T) and use the following commands:
1. Using lsblk
-
Topic: Installation and configuration of the Ubuntu 24.04 operating system for IMS servershttps://documents.imseismology.org/System/OLD/IMS-SERVER-INSTALL-UBUNTU-24.04-LTS-202411-REv0.pdf
-
Topic: partitioning - Ubuntu Installation: Customizing Disk Partitions for SSD (root/swap) and HDD (/home) - Ask Ubuntuhttps://askubuntu.com/questions/1550817/ubuntu-installation-customizing-disk-partitions-for-ssd-root-swap-and-hdd-h
-
Topic: boot - 24.04 swap, var, home partitions size installation guide - Ask Ubuntuhttps://askubuntu.com/questions/1547386/24-04-swap-var-home-partitions-size-installation-guide