Partitionning scheme

Linux FileSystem structure


Here is a small post about partition layout for a *nux box.







1 Basics and minimal layout (desktop config)


These are the partitions you may, at least, create for a *nux box to work fine and stay stable along updates:

  1. swap
  2. / (root) partition
  3. /boot part


1.1 swap

Size your swap space following those requirements may keep you out of troubles:

Amount of RAM in the System Recommended Amount of Swap Space
4GB of RAM or less a minimum of 2GB of swap space
4GB to 16GB of RAM a minimum of 4GB of swap space
16GB to 64GB of RAM a minimum of 8GB of swap space
64GB to 256GB of RAM a minimum of 16GB of swap space
256GB to 512GB of RAM a minimum of 32GB of swap space


1.2 /root

The root partition will contains all of your data except those from /boot. I’d recommend a size of at least 10 Go for a system like fedora installed with a graphic desktop and so on.


1.3 /boot

The boot partition is where is stored all data needed to boot your OS. This is where your boot loader will go and find what it needs. This used to be something like 100Mo but i faced some issue when adding new kernels (Hugemem and so on), so i’d recommend to make it 500Mo which is nothing these days (even for a SSD) and will keep you safe in any situations.



2 Specific partition scheme

In addition to the previously exposed basic layout you may want or need a more specific scheme, here are some examples.

2.1 /usr

Just a note to tell you one thing: AVOID placing the /usr dir in a separate partition.

This directory contains most of the binary tools of your system, this is why you should not use a different partition, this might cause some lag at startup or even prevent your system from starting up.


2.2 /tmp

This dir may be growing quite fast in case you are using some special software, with a lot of problems or a wide verbosity (we use to setup a 5Go /tmp part at my job)… In a classic desktop setup 50Mo or at most 100Mo will be more than enough.

SSD NOTE: In case you are using a SSD you may think about placing this part on a HDD, as it causes a lot of I/O which is not recommended to keep your SSD a long life.


2.3 /var

In this one are stored most of variable data, such as spools, man pages, news and mail queues, database data and some softwares logs, lock and PID files. Depending on what applications you are running on your box you may face some issues regarding the size of the /var (MySQL stores by default its databases in /var/lib/mysql/).

In a server box (proxy server, mail server) this must be large,  some Gigas at least.

A size of 5Go is a minimum, i would say you choose a number between 8-12Go (as seen at archlinux web site).

SSD NOTE: In case you are using a SSD you may think about placing this part on a HDD.




As a conclusion, just remember that putting everything (all dirs) under the root directory will give you serious issues as soon as you’ll get a growing dir (what ever dir it is). Partitioning is sometimes not easily handled but it is always better to have problems WHEN YOU WANT than any time (any time usually refer to the worst time!).




Tagged on:

2 thoughts on “Partitionning scheme

    1. admin

      I would say “Yes of course” but i cannot remember where i got it, it is NOT from me. I am almost sure that there is no copyright attached to it, especially if you just want to print it for yourself.
      I’d say GO ON ! And i agree with you this picture is quite good looking.

Leave a Reply to admin Cancel reply

Your email address will not be published. Required fields are marked *

This site supports SyntaxHighlighter via WP SyntaxHighlighter. It can highlight your code.
How to highlight your code: Paste your code in the comment form, select it and then click the language link button below. This will wrap your code in a <pre> tag and format it when submitted.