Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

7 Answers 7

up vote 14 down vote accepted

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. 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)
  • The same drive is used by different systems.

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.

share|improve this answer
    
Could you explain which situations a seperate /home is useful in? –  8128 Jan 15 '11 at 19:34
5  
A separate /home is useful if you dual boot between two Linux distributions, such as if you do development or test for a distro. It also makes it easier to do a clean install without wiping out your /home and having to restore from backup. Since the newer you are, the more likely you are to mess something up and not know how to fix it without a clean install, I generally recommend a separate partition to newbies, then to combine it later when you are more comfortable. –  Karl Bielefeldt Jan 15 '11 at 19:47
    
feel free to edit as you see fit :) - this answer is open source ^^ –  RolandiXor Jan 15 '11 at 19:53
2  
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 Jan 15 '11 at 20:02
1  
From my experience a size of 20GB for / is good, even with some years of installing random stuff, it is not easy to fill that. I don't think I ever exceeded more then 25GB in /. If you are careful with what you install you can probably survive without much issue with 10GB, as a regular fresh Ubuntu install will take less then 5GB, but I wouldn't recommend getting that low, as running out of space in / is hard to fix. –  Grumbel Jan 15 '11 at 20:27

For / (root) partition, I use 10G (of which I rarely find I've used more than 8Gb). For swap, I have 3Gb RAM, so I set 4Gb of swap. Not quite the recommended "twice your RAM", but hibernate still works, although I rarely use it. For /home, I use the rest of the hard disk.

These days, the general consensus is to just use one root partition (which includes /home) and a swap. But I still do keep a separate home partition : I think a little separation from the system drive is nice and it means that if I'm ever in the position to increase /home, I can do so more easily.

FYI My Ubuntu install with a 10GB root is now showing root as 85% full and wont allow upgrade.

share|improve this answer

I have always had a separate /home partition, root (/) partition and swap. It means when I upgrade, I can do a clean install of the new OS with no risk to the old one. I just mount the home partition in the new one. Also means if I go back to the old OS, any files created in the new OS are still there.

I have used various sizes for my root partition. On one machine I have regular Ubuntu and Ubuntu Studio, each installed in 10GB partitions. The regular ubuntu has used 6.04Gib and studio has used 3.08Gib.

You can always change the partition size later anyway if you need more space. Just need to boot from a live CD and use GParted to change the partitions.

As for Swap, twice the RAM or 1.5x the RAM is a good rule. Then you can hibernate if you want to. But if you find you need more or less you can repartition later.

share|improve this answer

If you don't have specific needs, I think that you can keep root and home in the same partition.

The size of the swap partition depends on how much RAM your laptop has. If you have 4GB of RAM, a 2GB swap partition should be enough. You can then have 58GB for the system partition and 2 gb for the swap partition.

share|improve this answer
    
If you have less swap space than RAM, you'll be unable to suspend-to-RAM. –  htorque Jan 15 '11 at 19:22
    
I was thinking for safety if I screw something up. So instead wiping whole ubuntu I just wipe the root partition. –  starcorn Jan 15 '11 at 19:25
    
2Gb sounds huge for swap, but if you want to hibernate (not suspend, that doesn't use swap), your swap must be ideally as large as your RAM and a tiny bit more. 4Gb of RAM and a desire to hibernate means a minimum swap of say 4100Mb, to be safe. –  Scaine Jan 15 '11 at 19:31

If you are dealing with only 60GB, don't bother with partitioning it, simply use one large partition and be done with it. For the swap you don't have to use a partition either, you can use a swap file, which allows you to resize or just delete it depending on your usage pattern.

share|improve this answer

I always found myself putting my data into system folders after runing out of /home space (to clean all that up later) or losing data in trying and failing to resize partitions. So I've came to conclusion that unless I get a very big hard drive, I should use one common partition for the whole file system.

share|improve this answer

/boot - 200m primary.

/ - 20-25g.

/home - 30g or higher for virtualbox disk files.

swap - 2 multiply of ram.

If you often install a new distro, I recommend to separate 1 empty ext4 partition for special programs or their configs --such as virtualbox disk files, your projects, etc. Because some distro installer may be unstable and your home data may be destroy. It is my bad experience.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.