Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39072 - Better "newbie" partitioning scheme
Summary: Better "newbie" partitioning scheme
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Gentoo Linux x86 Installation Guide (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Docs Team
Depends on:
Reported: 2004-01-22 13:33 UTC by John Richard Moser
Modified: 2004-10-20 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Richard Moser 2004-01-22 13:33:14 UTC
I'm getting somewhat annoyed by newbies and even somewhat experienced users who come to me and say, "I want to reinstall, but I have to back up everything!  It's going to take forever!"  There's always qtparted, but it 1) Needs the partition umounted, and 2) Needs X.  Usually getting things backed up involves a lot of CD-Rs or a live cd, and users don't always have the CD-R stack or the knowhow to burn with CDRecord.

Needless to say, I've come up with a simple solution to this by giving a better answer to the "How should I partition" question, one that doesn't recommend / /boot /swap.  I believen it should be used in the install documentation.  I only use x86 machines, but you should adapt it to all architectures.

Instead of a 32 or 64M /boot, a [1-2]*RAM_SIZE swap, and the rest on / recommended as at least 1.5G; you should recommend also a /home as well as somewhere to stash data.  The way I do it is as follows:

/boot - Optional; if needed, put it at the beginning of the drive.  32M if not journaled (EXT2, minix); 64M if journaled (ReiserFS, ext3).  NOTE:  Old versions of lilo need the 'notail' option to be set on this to boot; newer versions of lilo and all versions of grub work fine without 'notail'.

/  - At least 3G, no less than 1.5G.  My preferred is 5G; 10G if /usr/src and /var/tmp are to exist on /.  Attempt to use a journaled fs like reiserfs (preferred) or ext3 (second preferred); may use xfs or jfs if you are so inclined.  Avoid nonjournaled FS like ext2

/home - 256M per user, discounting root.  Make this reiserfs (preferred) or ext3 (second preferred); may use xfs or jfs if you are so inclined.  Avoid non-journaled FS like ext2

BEGIN EXTENDED PARTITION:  Your fourth partition will be an EXTENDED partition, to hold the last 2 drives.  This can start after the swap partition if you have no /boot.

swap  - [1-2]*RAM_SIZE, but assure that RAM_SIZE + SWAP_SIZE >= 256

/data - Pack everything else in here.  When it's first mounted, chmod a+rwx /data so that it's root inode is world-writable.  This will be shared data storage for users' data; their home directories will hold a symlink into a directory they create here with the proper permissions.  This way, users don't pack their home with their MP3 collection and random files.  You may quota this.  Reiserfs or ext3, xfs or jfs if so inclined, avoid ext2

This way, / will always be expendable.  Also, the system administrator can symlink a directory in /data to /usr/src, and one to /var/tmp, and keep a 3-5G / partition.  If the user needs to reinstall the system, he won't run around through the irc channels screaming, "Help me, how do I back up my data?!"

I used to have about 9 partitions on my hard disk (including the extended itself); now I use the 5 partition scheme (/ /home swap extended={/data}).  It's fairly simple and easy, and is the result of my trying a lot of combinations out.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2004-01-22 23:56:07 UTC
I disagree. The more you partition / into separate partitions, the more users will wine about little diskspace on this partition and too much on that. For instance, you say that 256M per user for /home is sufficient. My user alone takes 3.2 Gb.

The reason we keep this small partitioning information is to allow users to take full advantage of their disk (having everything in one /). It does indeed have the disadvantage that you list, but if you really want to make a decent partitioning scheme, you should read the "Designing a Partitioning Scheme" at

Partitioning schemes are very individual. 
Comment 2 John Richard Moser 2004-01-23 21:49:42 UTC
I disagree, and I'll point out why.  After that, I won't argue with you.

First off, you suggest at least a 1.5G root.  I actually recommend a 3-5 gig, unless you have kernel sources there, then I recommend more.  I actually use 2 gig before kernel sources sometimes.  My first concern was not allowing enough space for root.

Second, I recommended 256M per user because I don't believe in users storing large amounts of data on their home.  I realize a lot of people do this, but I figured that people would learn to point their ~/dcc and ~/data directories at some folder on another partition if they're able to install Gentoo.  I even suggested this.  You could easily migrate most of your home directory (or even have root migrate all of it) to /data; the only real reason to have /home is to preserve the directory structure if you need to reinstall.

Third, we can guess how much binaries and such will take up.  1-3 gig depending on how much is installed.  We know how big the portage tree is.  We can pick out how big / is going to be, and recommend how to squash things into a tiny /home, maybe have a /boot, and have our swap; and then pack the rest of the space onto one big partition where we toss everything else that has nothing to do with the actual system.

You say partitioning schemes are very individualized, and this is true; but I personally believe that giving users a way out without panicing and backing up data like mad when the system needs a re-install is worth the minor added level of complexity.

I won't reopen this bug.  It's up to you.  All I can say is, sit down, run the scenarios.  How many people new to Gentoo will be able to at least learn to symlink and manage their home directory?  How many of them will probably need to reinstall eventually?  How much will they usually pack root with, and can you statisticize it to 95% or 99%?  Would you rather deal with "My home is filled" "Go symlink ~/data to /data/username/data" "how?" "ln -s", or with users confused about backing up and reinstalling?  Which is easier for the user?  Will the extra pain pay them off greatly in the long run?  Is the extra pain a pin prick or a broken arm?

Just sit down once, make one pass at it, if you still are against it, leave it closed.  If you think it might be worth considering, reopen it and try to adjust the partitioning scheme to match what most users will need.  I'm not revisiting the issue.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2004-01-23 23:09:48 UTC
I'll ping the rest of the docs team for their input; personally I still disagree strongly.
Comment 4 Gustavo Felisberto (RETIRED) gentoo-dev 2004-01-24 04:03:13 UTC
I personally ALWAYS make /home a separete partition. But i make it large, and i dont mind spending some minutes with fdisk making partitions and deleting them, and having a small paper next to me where i take notes.

Bluefox: I dont like your setup, it is two weired. The idea of having directories with data that are world writable are to windows(r) like to me.

Swift: There is one thing not talked here (and the handbook). There are security implications on having all the system in one partition. I always try to put directories users can write to on separate partitions (and use nosuid and stuff like that).
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2004-01-24 04:27:16 UTC
Sure there are implications with the current setup, and yes some of them are security-related. However, it is imho the best setup we can provide to the users without too much hassle.

It is not perfect, but it is a working setup. Any other setup requires a more thorough insight in the environment and the goal of the system.

I would be more than happy to have a better explanation on the implications of partitioning a system (if possible with LVM2 included), first as separate guide and perhaps later as part of the handbook. But as it currently stands I believe this situation is the best we can do.

The example partitioning scheme on is the one from my laptop. I know how my partition setup should optimally look like. Most users however don't.
Comment 6 Kurt Lieber (RETIRED) gentoo-dev 2004-01-24 04:58:19 UTC
Partitioning is another holy war discussion similar to languages and editors.  We will never get consensus on the "right" way to partition something.

I am against changing the default partitioning scheme as suggested.  I feel the current way is find and the proposed way adds unnecessary complications.  

If we were do to anything, I would suggest writing a separate "advanced partitioning" guide and link to it from the insallation doc with something like, "If you'd like to learn more about different ways of partitioning your system, please see our advanced partitioning guide".  

My $.02.
Comment 7 SpanKY gentoo-dev 2004-01-24 11:18:25 UTC
ugh, i lost my previous comment so i'll some it up here:

(1) i agree with swift that current setup is fine
(2) i agree with kurt that partition setups == holy war
(3) making *another* guide just how to do advanced partitioning is kind of dumb ... everyone has a different idea and we'll get a lot of suggestions on how to change it due to (2)
(4) first time users dont know ANYTHING about how their system is going to pan out, so having just swap, /, and /boot is PERFECT
(5) it takes quite a bit of experience (that is very user-specific, again see (2)) to figure out what kind of partitioning setup is 'best'
Comment 8 Sven Vermeulen (RETIRED) gentoo-dev 2004-01-26 10:59:30 UTC
Okay, I'm closing this one. Bluefoxicy: sorry, but we'll keep the current partitioning scheme.
Comment 9 John Richard Moser 2004-10-19 17:29:14 UTC
Reflecting back, could we possibly consider targetting /home for "the rest of it"?  A /home/shared rather than /data would be appropriate, and better than my original scheme.  I must now reinstall, thankfully all my important data is not on /, which is about to be trashed :)

Quick summary:

/boot - Optional; doesn't seem to be needed on newer lilo and grub versions, or on newer hardware, or something.  (I've never personally needed this; I've had my kernel >3000 cylindars in since 200MHz pentiums).
/ - Figure out your own best minimum
swap - [1-2]*RAM_SIZE
/home - Everything else

It's interesting to note that the beginning of the disk is the fastest accessible, and so swap "should" be there.

Also interesting, swap can be some ungodly size like 1G or 2G; and /tmp can be mounted as tmpfs with options size=2G,nr_inodes=200k,mode=01777.  Then /var/tmp can symlink to ../tmp.  This will relieve space issues with emerge eating up all of / or /var, although it will create memory/swapping issues.  This is a little advanced, but interesting.

Summerically, the below seems to work for me, although tweaking of the size of / need be done case-by-case.  I can't see / eating >10G space this way.

swap - 2G
/ - 8G in extended
/home - 30G in extended (I have a 40G drive, yes)
/tmp - -t tmpfs -o size=2G,nr_inodes=200k,mode=01777
/var/tmp - /var/tmp -> ../tmp
/usr/src - /usr/src -> ../home/shared/sysdirs/usr/src
/home/shared - chmod 1777; should be sticky world writable

Notice the last symlink; /usr/src is an unpredictable beast on any setup, because new kernel sources will fill it without most users noticing.  even I don't notice until I'm up against the wall; then I start erasing kernel trees that I've never even configured.

If you have at least 12G of hard disk (bare minimum), the above should be fairly generic, to a point.  It's also more fair to the FHS than my original layout.  Obviously those with <12G will be up against a wall, and probably shrink / and install less stuff; although those with smaller hard disks will need more skill, since they won't be installing KDE or GNOME due to space constraints.

A final note, with /var/tmp on a tmpfs, the files stay in memory.  If they stagnate, they go to virtual memory; so they won't just hog your ram for eternity, don't worry.  Filling this up may (WILL) cause OOM kills though, so size=1.3G may be more prudent; this should never happen though, unless X and Mozilla fail to merge and you merge something else big without cleaning up /tmp.

At any rate, I'm not advocating a specific partitioning scheme this time; I'm just saying that it may be prudent to consider focusing on /home and making a note that excess space should go on /home.  Breverity is a virtue here; if you're going to mention it, be brief so that the user doesn't see twice as much about partitioning and get confused.  Things such as:

  An alternative method may also be used, where excess space may
  go to /home instead of /, allowing data to be stored off / in
  case of a re-install.  In general, / does not need to be larger
  than 10G.

are generally harmless to comprehension, where things such as:

  An alternative method of partitioning places excess space in
  /home instead of /.  This would allow you to store all user
  data in /home so that in the event of a re-install, / can be
  freely erased without losing user documents as well as user
  configurations.  This requires an assessment of how large /
  should be.  In general, 10G should be more than sufficient,
  especially if /var/tmp and /usr/src are kept off /.  This
  can be done using tmpfs mounts and symlinks.  The below scheme
  may result:

  [Insert partition diagram here]

Will get a ". . . so. . . what the @#*% should I do?" response from confused users.  Avoid very long sidenotes; brief but complete explainations are easier to chew in general.

As long as we're on space usage, I might as well bring back up the point of /usr/src and /var/tmp.  These can be filled with stagnant kernel trees and failed merges, which will eat space and leave the user wondering wtf it all went.  A note about this should be placed near partitioning:

  Although / should be of ample size, it may still fill up,
  especially when /usr/src and /var/tmp are on /.  If the
  partitions holding these directories begin to overfill, you
  may purge unneeded kernel trees from /usr/src and may purge
  /var/tmp/portage* when emerge is not running.

I've reopened this bug, just to get some attention.  You may reclose it with FIXED if you decide to add brief comments such as those above to the docs, or WONTFIX if you deem these inappropriate.  There are other, more advanced solutions which could be done and would create a much easier scenario; but they require certain functionality which is not yet stable.
Comment 10 Xavier Neys (RETIRED) gentoo-dev 2004-10-20 01:04:09 UTC
12G a bare minimum, tell that to my P1 with 4G ;-)

Our current partitioning example will work for anyone.
There are many reasons for using many different parition schemes, but like it's been said above, it will only end in a chaotic holy flame war because almost everyone will come up with a different approach.
We'll keep it as it is so it stays simple for users and simple for the doc maintainers.

/boot serves 3 purposes:

The beginning of the disk is admittedly accessed faster which is why it is usually placed after /boot but I have yet to see hard figures about the performance gain. When your system needs cache, it's busy doing something else and it most likely needs to access other parts of the disk. Therefore, the disk heads have to keep travelling back and forth. Having the swap in the middle of the disk might very well yield better results.

> / - Figure out your own best minimum
How on earth can users answer that?
Those who know already know about partitions IMO.

Trying to write an extended partitioning doc will lead to unending discussions and there is already tldp ( )

Reclaiming disk space from /usr/src /usr/portage/distfiles /var/tmp is talked about on forums.g.o on every odd days. Maybe we'll include a note about that somewhere (FAQ?) later on.

So it's a mix of WONTFIX and LATER.