Sources:
control-escape.com // skorks.com
The overall opinion is keep it simple but for a healthy installation these are the 4 partitions with approximate sizes that should be created:
/boot - 500MB (no need to be ext3)
Swap - 50% - 100% of the physical RAM
root (/) - 10GB (bigger if software intended to be installed is huge)
/home - rest of the drive as this is the "user data" partition.
You need one partition that will be used as Linux swap space. This is space on your hard drive that can be used as virtual memory. Virtual memory allows your computer to run large programs and perform complex tasks even if it does not have enough physical RAM to do the job. (It is a lot slower, but it works.). The amount of swap space required is a matter of religious argument among geeks and hackers, and entire volumes could be written about the subject.
To keep it simple, create one swap partition that is 50% to 100% the size of the physical RAM in your system. If you are short on RAM with plenty of drive space, go large. If you’re short on drive space and have lots of RAM, go small.
The root file system is represented by a forward slash (/). It is the top of the directory tree, and contains Linux and everything that you install with Linux. (See The Linux (Virtual) File System for details). This is roughly equivalent to your “C:” drive under DOS or Windows. You must create a partition for the root directory. (Don’t confuse this with the “root” user account, who is the administrator of the system. That’s a different kind of root!)
The size of your root partition will vary depending on what you install or plan to install. Check your distribution’s documentation, and reserve enough space for a maximum installation, plus at least 100MB more for temporary space and installation of new software. If you plan to download and try out lots of software, leave more space. If you have a small hard drive, you can trim back on your installed packages to save space.
In general, you should be fine with a root partition between 2GB and 10GB.
The third and final partition you should create will hold your /home directory. This is the place where all the user-specific files, your data in other words, are stored. It is roughly equivalent to the “My Documents” folder on a MS Windows desktop (if you have MS Office installed). On a multi-user system, each user will have her own directory under /home.
Strictly speaking, it is not necessary to create a separate partition for /home. If you do not, it will reside on the root partition like everything else. If you are cramped for space, you may need to configure your machine this way.
The reason I recommend creating a separate partition is that you are a new user. You are going to want to play with things, experiment, push the limits of your system. Before long, you will break something so badly that you will need to reinstall, or you’ll just want to reinstall with different options, or try a different Linux distribution. Having /home on a separate partition makes it very easy to wipe out and reinstall Linux without losing any of your data.
Don’t think to yourself, “I’ll be careful, I won’t need to reinstall.” Wrong. You will definitely hose up your system at least once, and for the novice, reinstalling is often the easiest way to fix it. I had ten years of computer experience and worked in technical support when I started with Linux, so I knew my way around a PC, and I had to reinstall twice. Just plan on it and make it easy on yourself. Keep your data on a separate /home partition, or keep it backed up on some other medium, and be sure to create the boot floppies when prompted to do so during the installation process. They have saved my system more than once.
Obviously if you decide to go with manually partitioning your drive you will need to consider the kinds of activities that are likely to occur on your system, this will determine what partitions you’ll need. This is completely up to you, however, generally the following parts of the Linux file system are good candidates to get their own partition (pick and choose the ones you think you will require).
/ (known as root) – this is the root of the file system (clearly :)) and will always get it’s own partition. Anything that doesn’t get a partition of it’s own will become part of the root partition.
/boot – the kernel and various other data needed for the system to boot live here. This partition can usually be pretty small. The data on this partition changes very infrequently and therefore you may not even need the ext3 file system on it (it can use ext2 instead) and having it as a separate partition can facilitate this.
swap – the swap partition is used to temporarily store data when the system does not have enough RAM for it’s current tasks. As a guide the swap partition should be double the size of system RAM and doesn’t need to be bigger than about 2 gigabytes. These days, systems often have more than 2Gb of RAM, but you do still need a swap partition (a system could, technically speaking, function without a swap partition, but I wouldn’t recommend it). Considering that disk space is so cheap these days, it is usually not an issue to have a 2Gb (or more) swap partition. The swap partition is never mounted and so does not get a mount point of it’s own (i.e. you won’t be able to browse the files on your swap partition).
/home – this is where the home directories of all users of your system will live. Having this as a separate partition allows you to reinstall the operating system without losing all your personal data. The other advantage is, if you have a multi-user system, a single user won’t be able to fill up the whole drive with their data and crash the system (at most only this partition will get filled up).
/usr – most of the packages you install on the system will end up here. Having this as a separate partition will allow you to backup or export this partition to another system easily (if you need to).
/usr/local – many additional packages (those other than Ubuntu core packages, if you’re using Ubuntu), will end up here. Some of the software packages you compile from source will also often end up here. You can have this one as a separate partition for similar reasons to /usr.
/opt – other packages you install and compile from source get installed here, so once again, for similar reasons to /usr and /usr/local – you might want a separate partition for it.
/var – the data here usually changes frequently (hence the name). Much of the system log data, package and accounting information resides here. It is a good idea to have it as a separate partition, if someone runs a job that consumes a lot of disk, this area won’t be affected and you will still have the information you need (such as logs) to diagnose the problem. The only caveat if you’re using Ubuntu is the fact that, the Apache web server will store all it’s web content under /var. So if you’re planning to use the system as a web server, it might be prudent to configure a different location for Apache to use.
/var/log – system logs usually live here, and so it may be a good idea to isolate the system logs from other parts of the system, considering how important logs can be do diagnose problems when something goes wrong.
/tmp – this one is pretty self explanatory. It can be used as a temporary space to store files or for programs to write temporary data. Strictly speaking you don’t really need a separate partition for this, but it certainly won’t hurt.
Possible Sizes For Your Partitions
/boot – usually don’t need more than 200Mb but disk space is cheap so give it 500Mb (0.5Gb).
(swap) – depends on amount of RAM, but for modern system with lots of RAM, make it the same size as the amount of RAM you have (e.g. 2Gb RAM – 2Gb swap)
/home – this one depends on how you plan to use the system, how many users you plan to have and the kind of work they plan to do. It is hard to give a guide for this one, however for a single heavy user (lots of data in home directory), you can plan anywhere between 20Gb – 100Gb or more.
/usr – depends on how many packages you plan to install on your system. For standard number of packages plan around 4Gb, for lots of packages anywhere up to 20Gb or more. For a regular home system, 20Gb should be plenty.
/usr/local – once again depends on how many packages you plan to install, but as disk space is cheap, for a regular home system you can make this one the same size as /usr.
/opt – similar situation as /usr and /usr/local here, make it the same size as the other two.
/var – if you don’t plan to run many severs this doesn’t need to be too big, so around 2Gb should be enough. If you do plan to run a few servers, this may need to be much bigger (depending on what servers you plan to run). Use your judgment here and remember that disk space is not expensive. To give yourself some future flexibility make this one around 20Gb.
/tmp – once again depends on how you plan to use your system (yeah I know, it always depends :)). This one is normally less important, give it around 10Gb.
/ (root) – it is always a good idea to create the root partition last. Since this partition will contain all the data which you decide not to put in a partition of it’s own, the size required can change drastically. If everything else has it’s own partition then this doesn’t need to be much bigger than 2Gb or so. However, if you decide not to have a separate partition for something else, you will need to increase the size of this partition accordingly.