Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to install ArchLinux and I've run into something extremely weird.

Its guide suggests that you should create 2 partitions:

  1. ~15gb root partition
  2. Home partition [filling the rest of the space].

I have a few issues with this:

  1. Where is the boot partition [and bootable flag, which I can't seem to find in cgdisk]?
  2. Where are its swap recommendations?
  3. Why separate the root space [which includes installed applications] from the home directories?

Are the instructions incorrect about this?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

'Incorrect' is perhaps a strong term, but my experience over the last few years has been that making a lot of partitions tends to be a mistake -- specifically, later on, I'll want /home or /var or what-have-you to contain more bytes than the partition size permits, which results in a big pain in the neck no matter how it's solved. I've lost track of how many times I've needed to do this, and it just never gets any easier.

This being the case, unless you've got a really strong reason to do otherwise (or you just really love doing sysadmin work, which I did until I'd had my fill of it), I'd recommend simply making one big / partition on the disk, along with a swap partition if you feel the need for one. (I've lately been just swapping to a file; see 9.2 here for how that's done. You might need to add the swapon command there to /etc/rc.local or some similarly suitable place to ensure it persists across boots.)

Granted there's a slight additional risk here that /home will grow too large and starve the system, or similar, but as long as you keep a decent eye on how much space you're using, you shouldn't need to worry too hard on that score -- and the additional convenience of not having to, for example, periodically transfer /var to another disk, mess with /etc/fstab, and reboot, far outweighs the slight risk in my experience.

share|improve this answer
    
/home growing too large isn't really an issue... since you can only use the space that you have. –  monksy May 6 '13 at 15:15
3  
@monksy What I mean by this is, if you've got one big bucket of bytes as I'm recommending, then if /home gets large enough that, for example, services lack space to write tempfiles in /var, you can end up in a weird and broken state requiring careful intervention to resolve -- something else I've seen happen. Again, though, as long as you keep an eye on how much space you're using so that you don't completely fill up your disk, it doesn't become a problem. –  Aaron Miller May 6 '13 at 15:21
    
I usually keep my /home as large as possible, to avoid filling it. My configuration uses only three partitions (well, I have others but they are used by dual-boot windows), which are a 20GB root, 1GB swap (and the system uses it very rarely) and all the rest rest is /home. I've never been in need of changing them. –  Sekhemty May 6 '13 at 15:23
    
@Sekhemty Services tend not to use /home; a lot of my experience has been administering web servers whose MySQL databases live in /var/lib/mysql and may grow very large without warning. Different situations, no doubt, but that's a lot of why I give the advice I do; making /home huge is one thing, trying in advance to predict the balance you'll need to strike between /home and /var is another. –  Aaron Miller May 6 '13 at 15:50
    
@AaronMiller I didn't think about the services filling var. However you might want to watch out for postgres, it puts the dbs in /var/lib unless you configure it differently –  monksy May 6 '13 at 15:55

I generally use the following:

/
/home
/boot
swap

On a 1TB drive, I'd look at something like the following:

swap       18GB
/home      500GB
/boot      1GB
/          remainder
share|improve this answer
1  
Why a swap so huge? –  Sekhemty May 6 '13 at 15:07
1  
@Sekhemty Good question -- I was wondering that myself. Assuming the usual advice of 'make your swap as big as your RAM', maybe the box just has a lot of memory? –  Aaron Miller May 6 '13 at 15:12
2  
@Sekhemty - I always follow the RHEL standard of RAM+2GB because it's "safest" (and vital if you run JVM - as I found out a couple years ago (antipaucity.com/2011/08/08/why-technical-intricacies-matter/…)). If I don't have 16GB of RAM, I'm safe for my expansion. If I have 32GB, I bump to 34GB swap. –  warren May 6 '13 at 15:17
    
@warren Wait a minute, how does the JVM even have the ability to decide whether it's in core or in swap? Shouldn't that be up to the kernel? I mean, the whole thing's insane, but leaving that aside for a minute, how does it even work? –  Aaron Miller May 6 '13 at 15:24
1  
@warren ...wow. Good to know, though, thanks! –  Aaron Miller May 6 '13 at 15:38

I generally use the following:

/ 30 ~ 40 GB
/boot 256 MB
swap    4 GB (might need more if you want to use hibernation)
/home   20 GB
/mnt/data  the rest

In /home I will usually have only dotfiles; all my data is stored in /mnt/data - this is mostly personal choice; also, if you dual-boot Windows/Linux you can have this partition as NTFS for accessing from both OSes.

The point of having a separate /home partition is that:

  1. if you wipe your root partition, you don't lose settings/personal files
  2. if you dual-boot Linux distributions, you can use the same /home everywhere

As for swap, I have 6 GB RAM and the 6 GB swap partition I have is barely touched.

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.