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 am going to install Ubuntu on a new computer, but I'm not quite sure how big each partition should be.

If I create only root, home and swap partitions, on what partition will programs be installed? Will they go to /home or to root?

Basically does it make sense for instance to have following partitions:

    /     - 6GB
    /home - 80GB
    /swap - 4GB

Is 6GB large enough for my root partition?

Also are these 3 partitions a good choice, or is there a better configuration?

I have at the moment 3 operating systems installed, and I do make changes quite often.

share|improve this question
    
Is there a reason you don't just take the default of one swap partition the size of your ram, and one for everything else? –  psusi Mar 20 '12 at 4:28
add comment

7 Answers

up vote 1 down vote accepted

When you install applications, their application files go in root. That means libraries, the program executable and global data, such as documentation, images, etc. User data, such as configuration and file data, goes into your home.

I would recommend a slightly larger root partition.

It isn't necessary to add a separate /home partition. If you choose to use BtrFS instead of Ext4, then it's not even recommendable. It's better to have a single root partition, since BtrFS can have subvolumes. This means you'll get both two separate filesystems, but do not have to have predetermined size limits for each. If you use BtrFS, then Ubuntu will automatically create a root and a home subvolume for you, so you don't have to worry about that at all.

BtrFS is fantastic stuff. For instance, it let's you jump back in time if something goes wrong. So, for instance, you can upgrade to the next version of Ubuntu, and if it doesn't work, you can undo the upgrade in a moment.

Be advised, that as BtrFS is very new, there is less documentation for it. But from an install perspective, it's easier. There's no doubt this is the future of Ubuntu.

share|improve this answer
    
Very impressed with what BtrFS can do. This may be off topic, but is it stable enough to be used by a newbie? Also, what if there is only 1 partition and two subvolumes - root and home and you need to reinstall the OS. Can BtrFS handle it? –  deshmukh Mar 20 '12 at 5:04
    
It can handle it. If you take a snapshot first, you should even be able to un-reinstall later if you want to, by jumping back to before the reinstall. Or just reboot to the removed OS. Seriously cool stuff. You'll need to use the right option in the installer. You'll want to keep your home. No formatting. Btrfs should be stable, whether you're advanced or newbie. And it will break just as hard if there is an unknown bug. General use, however, is not well enough documented, though in normal use, it's nothing to worry about. Look for docs about btrfs in Ubuntu. It's special. –  Jo-Erlend Schinstad Mar 20 '12 at 8:54
add comment

How big is your disk?

I would make root ('/') at least 8 GB, maybe 10 (which is what I typically use as a minimum partition size for the root partition).

You probably don't need 4GB of swap, unless you are doing things that are really going to be hammering swap. There used to be an old rule of thumb with Linux that swap should be twice the size of RAM, but that was back when your average PC only had 256MB or 512MB.

Most people will be fine with only 1GB maybe 2GB of swap.

As for your other question, programs you install will almost all be installed in the root partition. There may be a couple exceptions out there that install into /home/$USER, but that's doubtful, really.

That's why I usually make / at least 10GB. And if you have disk space to space, maybe even 20GB to be safe.

share|improve this answer
add comment

Installed software will typically go on root. You can put some stuff in home for local to a user install, but most ubuntu packages conform to the standard. I wouldn't make a 6GB root partition, but that's me. according to this a pretty standard home install is:

The standard partitions scheme for most home Linux installs is as follows:

    A 12-20 GB partition for the OS, which gets mounted as / (called “root”)
    A smaller partition used to augment your RAM, mounted and referred to as swap
    A larger partition for personal use, mounted as /home

Best practice on swap is double size of ram, although that's getting less and less common.

Credit to Jo-Erlend: You definitely want to do the double ram guideline if you plan on using hibernation options.

share|improve this answer
1  
Swap is also used for hibernation now, so it's not only as "extra RAM". That's worth mentioning. –  Jo-Erlend Schinstad Mar 15 '12 at 15:28
    
But if you don't do hibernation, then you may not need much swap at all. On my system, I've never seen the swap used at all. –  Marty Fried Mar 20 '12 at 19:09
    
@MartyFried - this is true. In some situations swap is disabled for more than one purpose. Forensic live media for instance. It seems a little over the head of the OPs question though. I run a ton of VMs on my desktop, so I have guideline swap there. I tend to run lots of multimedia at the same time on the laptop, so I have about a third of guideline there. It's about tailoring it to purpose. I was just trying to give some "best practices" –  hbdgaf Mar 20 '12 at 19:33
    
@aking1012 - Sorry if I wasn't clear, but I wasn't really trying to disagree, just adding a bit of food for thought. I personally have used many partitioning schemes over the years, and have decided that having a separate /home directory doesn't seem worth the trouble. I usually just allocate a few 30 GB partitions, one for my main system, and a couple to play with. Large files and documents are in a shared partition that gets mounted for any OS that I use, and I have links in my home directory to shared pictures, documents, etc. But I do have a separate /boot partition. –  Marty Fried Mar 21 '12 at 21:25
add comment

Unless you have special needs, I'd recommend you to use just two partitions: one for the root filesystem and one for the swap.

If your aim is to share your /home with the other three operating systems you have installed, then you need to be warned: different versions of the same application may mess up your configuration. You can work around this problem, of course, but having a separate /home for each operating system is without doubts the faster and safest solution.

share|improve this answer
add comment

Well, having separate /home for each OS is definitely safer, but it is also a lot less convenient. It is going to be hard to transfer data from one OS to another.

I share my /home between Windows 7 and ubuntu. It gave me some trouble at the beginning because the computer woke up to the wrong OS after hibernate. After fixing grub, that never happened again. I actually share firefox profile between the two OSes. Very neat.

share|improve this answer
add comment

IMHO, it would be better to have a 'Data' partition (NTFS formatted) that can be accessed by windows and linux, both. This is given that you want to have multiple OSs (I am assuming that you want to be able to access, say, your media files from all the OSs).

A separate home partition should be a good idea if you need to reinstall linux!

share|improve this answer
add comment

How you set up your partitions depend on a lot of different things. The best guide I have yet come across:

https://help.ubuntu.com/community/DiskSpace

Concise, to the point, and up to date. Hope it helps.

share|improve this answer
add comment

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.