General Guidelines

Here are some guidelines for partitioning a Linux system:

  • Keep the root filesystem (/) simple by distributing larger portions of the directory tree to other partitions. A simplified root filesystem is less likely to be corrupted.

  • Separate a small /boot partition below cylinder 1024 for installed kernels used by the system boot loader. This does not apply to newer BIOS and kernels (e.g., 2.6.20).

  • Separate /var. Make certain it is big enough to handle your logs, spools, and mail, taking their rotation and eventual deletion into account.

  • Separate /tmp. Its size depends on the demands of the applications you run. It should be large enough to handle temporary files for all of your users simultaneously.

  • Separate /usr and make it big enough to accommodate kernel building. Making it standalone allows you to share it read-only via NFS.

  • Separate /home for machines with multiple users or any machine where you don’t want to affect data during distribution software upgrades. For even better performance (for multiuser environments), put /home on a disk array and use Logical Volume manager (LVM).

  • Set swap space to at least the same size (twice the size is recommended) as the main memory.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.