Ubuntu – How large should I make root, home, and swap partitions

partitioningsystem-installation

I have a laptop with win7 installed. I have now made a 60gb partition which I want to install ubuntu into. The question I have, before I do the installation, is how large each of the root, swap, and home partition should be? I have read some place that root could be as small as 8GB, but isn't that too small? Since I guess beside ubuntu all the softwares installed will reside there as well? And I think I'm going to set my swap to be 2GB large.

My main concern is how large should the root partition should be. I'm mainly going to use ubuntu for programming and browse the web.

Best Answer

You actually should just install ubuntu on two partitions, / and swap. You can have ubuntu do this automatically by choosing to use the available free space (in other words, do not format your 60GB partition in vista before installing ubuntu).

Some will argue that you should use separate partitions for /home, /boot, / and all kinds of things. This is useful in some situations, but for most common situations you are better off not doing this. This is because it will fragment your disk in a way that might not be wanted later. Just let ubuntu choose for you and you'll be safe :)

You would often use a separate home in situations where you want to use:

  • Multiple drives
  • Multiple mutually exclusive ubuntu installs sharing the same data (could work with varying distros but not advisable to do this with different distros)
  • Situations where your data needs to be safe in the case of a drive failure/upgrade (most normal installs are safe)
  • You want it to be easier to reinstall or upgrade the system (just choose not to format the /home partition - please note a backup of important data is highly recommended during any system upgrade)
  • The same drive is used by different systems.
  • Your disk does not have enough capacity for both home and system data (e.g. a small SSD)

NB: "Ubuntu's installer offers to preserve the contents of /home, so you don't need to be afraid to lose anything when doing re-installs or upgrades. – htorque"

On another note about swap - if you want to be sure that when doing large tasks you can have a lot of swap space, you can set your swap space to be twice the size of your ram, but either way, ubuntu will handle the requirements rather well if you choose to install on the blank 60GB partition.

You might also want to read up on Swap files instead of Swap partitions. Again this can help reduce fixed fragmentation of your disk and dynamically allocate space as you need it. Supposedly, there is no performance loss. How to increase swap space?