LinuxBasics.org

The community that helps people to run Linux

rss
Table of Contents

Perfect partitioning

The question about the ‘right’ partitioning scheme pops up quite regularly on mailing-lists. While I do not claim perfection, I try to explain here why there are different opinions on partition sizes. If you disagree with me on what I write here, please tell me, and I will incorporate your thoughts.

First, relax! If you find out after a while that you made mistakes when partitioning, you can still change it. See Re: My partition is full! Do I need to reinstall? for details.

While there is no such thing as ‘perfect partitioning’, there are (at least) 2 styles proposed in different tutorials. These do not really contradict each other, although they seem to do so:

3 Partitions:

/, swap and /home should be enough for the initial install, especially for new users. They should altogether be not too big, so there is space on the harddisk to try other distributions without hurting the main-distro.

/home will survive the re-installs while learning about the system, and swapspace should make up for having not enough RAM.

4-5GB for root is surely enough for any modern distribution.

This ‘big-root-philosophy’ is based on the following facts:

  1. Diskspace is cheap, new disks are HUGE.
  2. The initial install will not be the last
  3. It is possible to learn about the possibilities without using them all.
  4. Space-requirements are often not foreseeable, especially when learning a new OS.
  5. X11, OOo, and Mozilla are reality. Most people will want to use them. At least try them. So we need space to ‘breathe’ and flexibility among /usr, /var and /opt

Later, when the system is running, one can do some research on the actual requirements using the commands

df -h

and

du -sh

7 Partitions:

/, /boot, /home, /usr, /var, /tmp and /opt

With every partition speciallizing, / can get smaller. This makes it less prone to HW-damage.

A separate /boot makes multi-booting among several Linux-Versions easier.

This has also been discussed in OpenBSD-FAQ which also explains that the system can be made more secure that way. It lists some reason in favor of many partitions, but also states that if you go too close to the minimum-sizes, you will regret it later :)

Pros and Cons

This page has been created to end all flamewars concerning partitioning. It shall be a place where the pros and cons about putting specific directories in their own partition can be stated.

This page needs your help in order to be balanced. If a partition you think should be mentioned is missing, post to the Mailing-List. We can discuss it, and then I can add another section to this document. You can also add a comment at the bottom of the page.

The proposed size should be explained shortly with a ‘real world’ example. No hypothetical cases for the sizes. Only “I have filled up 12TB because…” and “I have a system running with as little as 20KBbecause…”

So here we go:

/ (root)

/boot

Swap

/home

/usr

/var

/tmp

/opt

/path/in/question


Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.


Linux® is a registered trademark of Linus Torvalds.


 
  tutorials/advanced/various/perfect_partitioning.txt · Last modified: 2008/07/20 19:08

LinuxBasics.org

Start Linux-Course Tutorials Linux Links Security Blog Forum E-mail List Search Online Chat

Site-Info

Help Get in Touch Making of LBo

Wiki-Control

Powered by

Linux Apache DokuWiki Mailman RUTE ht://Dig