Linux Partitioning Schemes
Linux Partitioning Schemes
When you install Linux on a computer, the storage device (like a hard drive or SSD) must be divided into sections called partitions. Each partition has a specific purpose, such as holding system files, user data, or swap space. Setting up these partitions properly is very important for performance, security, and organization. Linux Partitioning Schemes define how the disk is divided and what each section will be used for.
Linux Partitioning Schemes refer to the different ways of organizing a disk into sections during installation. A well-planned partition scheme separates system files, user files, and memory management areas. The common partitions created are /boot
, /
(root), /home
, and swap
. Different Linux distributions might suggest different schemes, but the goal is to keep the system organized and manageable.
UEFI
UEFI (Unified Extensible Firmware Interface) is a modern replacement for the traditional BIOS. It initializes the hardware components and boots the operating system. UEFI supports larger hard drives (over 2 TB), faster boot times, and secure boot, which helps protect against malware. In Linux systems, when UEFI is used, a special partition called the EFI System Partition (ESP) is created.
Legacy BIOS
Legacy BIOS (Basic Input/Output System) is the older method used to boot computers. It reads the Master Boot Record (MBR) of a disk to find the operating system. BIOS has limitations, such as not supporting disks larger than 2 TB and slower boot processes. Many older computers still use BIOS, but newer systems are moving toward UEFI.
Partitioning Layouts
/boot
The /boot
partition contains the files needed for the Linux system to boot, such as the kernel and bootloader files. Keeping /boot
separate can protect important boot files from corruption.
/
The /
(root) partition is the main partition where the Linux system is installed. It contains all essential system files, programs, and settings. Without this partition, the system cannot function.
/home
The /home
partition holds personal files, documents, pictures, and user settings. Separating /home
from /
makes it easier to reinstall or upgrade the operating system without affecting user data.
swap
Swap is a special partition used as virtual memory when the system runs out of physical RAM. It acts as an overflow area to keep the system from crashing when memory is low. In some cases, swap can also be created as a swap file instead of a partition.
Differences between UEFI and Legacy BIOS
UEFI | Legacy BIOS | |
---|---|---|
Boot Mode | Boots using .efi files from EFI System Partition | Boots using code from Master Boot Record (MBR) |
Disk Support | Supports GPT (disks larger than 2 TB) | Supports MBR (disks up to 2 TB) |
Boot Speed | Faster boot times | Slower boot times |
Security | Supports Secure Boot | No built-in security features |
Compatibility | Supported on modern hardware | Found on older hardware |