10 reasons for using multiple partitions

Off the Beat: Bruce Byfield's Blog
Most Linux beginners content themselves with a single system partition and a swap drive. However, as they gain experience, they learn the advantages of dividing the system across several partitions.
These advantages are changing with the technology. Old reasons for partitioning are becoming obsolete, and new ones emerging along with solid state drives and UEFI. Still, there are at least ten reasons for partitioning hard drives:
1. Repairing partitions:
When a drive is not shut down properly on a journaled system, you may have to repair it by running the fsck command manually from a live DVD. If the problem is not with the root partition or /var, you can often boot in single user mode, unmount the partition, run fsck, and reboot, all of which is much faster than starting up a live DVD.
2. Reinstalling
When reinstalling becomes necessary, you can be up and running faster if your /home directory is on a separate partition. Just make sure that the partition is not reformatted during re-installation, and that the partition is mounted as /home during re-installation.
3. Preventing overflow of temporary files
The /tmp partition can fill up -- not just from an attack, but simply through everyday use. In fact, you might want to want to run a weekly cronjob to clean it out.
If you have a single partition, when /tmp is full, it can consume all free space and cripple or crash your system. If /tmp has a separate partition, it can still cause problems when full, but you may still be able to save your work, and you can certainly make repairs more easily.
4. Reducing the time for partition checks
During bootup, Journaled file systems check filesystems if they were not properly shutdown, or every thirty or so boots in order to check their integrity. If you have a two or three terabyte partition, this check can take as long as five minutes. By contrast, checking several smaller partitions is much faster.
5. Using UEFI
Many Linux users simply turn off secure boot. However, if you are using multiple operating systems under secure boot, you also need to install Linux under it. In that case, you require a separate /boot partition, formatted with its own unique filesystem. In modern distributions, the installer will usually take care of the formatting for you.
Installing a software RAID0 (stripe) system also requires a separate /boot partition.
6. Multiple booting
Thanks to the bootloader, Linux supports multiple distributions or operating systems on the same machine. Virtual filesystems have perhaps made multiple booting less common, but it remains one of the main reasons to use multiple partitions. So long as you remember to install Windows first, the arrangement is generally stable.
7. Creating an Emergency Partition
Laptops and many off-the shelf computers ship with recovery partitions. If yours does not have one, you can easily create a custom recovery by adding a distribution like Knoppix to its own partition. Although many recovery tools can be installed to a DVD or flashdrive, one on the hard drive will be able to do repairs more quickly.
8. Using solid state drives:
Today, top of the line solid state drives (SDDs) have five or ten year warranties, and the earlier fears of shortening their life spans with unnecessary writes are less relevant than when they first became available. In fact, such concerns may be obsolete.
All the same, if you want to help reduce the use of an SDD, place partitions like /tmp, /var, and swap that are likely to have files that are constantly changing and being deleted elsewhere.
If you are well-stocked with RAM, these partitions can be placed in a RAM drive. An alternative is to put the core system on an SDD, and these files on a traditional mechanical drive, along with /home and other general storage partitions. Since two or three terabyte SDDs are expensive, many users are currently mixing SSDs and mechanical drives anyway.
9. Finding files and directories
On mechanical drives, smaller partitions mean that searches are faster. SDDs are already many times faster than mechanical drives, so smaller partitions make less of a difference to search -- probably too little to detect, although information is lacking.
10. Sharing resources
When you have multiple booting or several users on the same machine, you may want to share resources by placing them on a separate partition. Traditionally, these non-standard partitions are mounted as a sub-directory of /mnt. To function, these partitions usually need relaxed permissions, so as a basic security precaution, the permissions on other partitions should be as tight as possible.
Taking control
You don't need to use multiple partitions. You can even replace the swap partition with a swap file. However, sooner or later, you are likely to come across a situation in which multiple partitions mean increased efficiency.
When that happens -- and it almost surely will as you learn about Linux -- you can download a tool like GParted, and resize partitions as you want. You might want to search the Internet for various suggestions for partitions first. If you installed with a single system partition, the conversion will be slow, but the result should be worth the effort and time.
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
The GNU Project Celebrates Its 40th Birthday
September 27 marks the 40th anniversary of the GNU Project, and it was celebrated with a hacker meeting in Biel/Bienne, Switzerland.
-
Linux Kernel Reducing Long-Term Support
LTS support for the Linux kernel is about to undergo some serious changes that will have a considerable impact on the future.
-
Fedora 39 Beta Now Available for Testing
For fans and users of Fedora Linux, the first beta of release 39 is now available, which is a minor upgrade but does include GNOME 45.
-
Fedora Linux 40 to Drop X11 for KDE Plasma
When Fedora 40 arrives in 2024, there will be a few big changes coming, especially for the KDE Plasma option.
-
Real-Time Ubuntu Available in AWS Marketplace
Anyone looking for a Linux distribution for real-time processing could do a whole lot worse than Real-Time Ubuntu.
-
KSMBD Finally Reaches a Stable State
For those who've been looking forward to the first release of KSMBD, after two years it's no longer considered experimental.
-
Nitrux 3.0.0 Has Been Released
The latest version of Nitrux brings plenty of innovation and fresh apps to the table.
-
Linux From Scratch 12.0 Now Available
If you're looking to roll your own Linux distribution, the latest version of Linux From Scratch is now available with plenty of updates.
-
Linux Kernel 6.5 Has Been Released
The newest Linux kernel, version 6.5, now includes initial support for two very exciting features.
-
UbuntuDDE 23.04 Now Available
A new version of the UbuntuDDE remix has finally arrived with all the updates from the Deepin desktop and everything that comes with the Ubuntu 23.04 base.