Linux Partitions


Linux references your hard drives by a, b, c, etc, and the partitions on the disks by the numbers 1, 2, 3, etc, so the first partition on the first drive is hda1, the second hda2, and the first partition on your second drive is hdb1, the second hdb2, etc... Once you select which drive contains the free space you can begin partitioning this space for Linux.

A mount type must be chosen for each partition , the base of your file system is the root partition, which is symbolized by a forward slash ( / ) in Linux. Each partition is built upon the root partition, so if you create two partitions called usr and home, they'll be known as /usr and /home.

Each partition in a Linux system is of a particular type, which you must also specify when creating your partitions. Linux partitions will be of type "Linux native" (ext2), I recommend selecting a journaling filesystem such as ext3 or reiserfs during the partitioning stage. The swap partition will be of type "swap".

I usually create the following 7 partitions during any install:

/swap - Used for virtual memory. Many recommend that this should be twice the amount of your physical RAM but anything over 128mb is probably not necessary (mandatory).

/ - The base of the Linux file system, containing boot files and system config files (mandatory).

/usr/local- A location for software that needs to be accessed by all users and where most of your software will be installed during normal usage (optional).

/home - Default location for user data. The size depends on how many users you will have (optional).

/filez - I usually create this partition to store my documents, downloaded files etc..... (optional). 

/tmp- This is where temporary files are stored (optional).

/var- Log files and files queued for printing are found here, programs can sometimes create huge error logs and can eat up all of your free space in a short amount of time, it's a good idea to keep this on it's own contained partition (optional).

It's a good idea to have /usr/local, /home and /filez on their own partitions, that way if you ever need to reinstall or upgrade, just choose not to format these partitions and you will not have to reinstall the files and packages that were installed or stored in these places.