-   Linux - Newbie (
-   -   a very small question bout partitioning (

h/w 08-17-2003 09:10 PM

a very small question bout partitioning
hey all.

i was running win2k and rh till now on my laptop. thing is, it was the first time i had tried linux, and had opted for the auto partitioning done by diskdruid - so it had a /boot, a swap, and the rest under '/'.

i have a 40gb HD, of which i have given win2k 12gb. so, im left with about 28gb for linux.

i wanted to re-install it in a more optimised way than wht the auto partition did (everything just felt a bit slow too).

but im a bit confused bout how much space i will be allocating to the various mounts, and dont want to just go ahead without really understanding it - as once i make the partitions, if i do allocate space for some mount which just grows, ill have a few headaches.

ive been readin a few how-to's but most were written in the days when 10gb was state-of-the-art.

my system is a p4-2.4ghz, with 512 mb ram, and a 40gb HD. running win2k right now with 12gb space, and need an idea of wht the various mounts should be sized under linux. im thinking of separate partitions for :

1. /boot
2. swap
3. /tmp
4. /
5. /usr
6. /home
7. /var

while i only know wht to give /boot and swap, i am not sure bout the rest. i got confused at the difference between the other partitions as till now, i only saw them in action after the auto install. im especially confused bout '/', '/usr, and '/home', and how they should be sized.

i think most of my confusion comes from the fact that im not sure how the packages are installed, and what '/home' is really used for other than installing stuff from source.

also, i dont understand how /usr/local/XXX is to be treated differently from /home/userxxx.

i keeeeeeep getting confused between these ... :(

i would really appreciate any ideas and help on this (im not gonna go ahead with my install till i am reasonably sure of it).

thanks all!

leonscape 08-17-2003 10:16 PM


/boot -- Basically for the kernel and bootloaders. I've given mine 50Mb. Does find Plenty of space left.

swap -- The size of your RAM is a good guide I used to double the size of RAM for swap now I use half, but thats still probably more than you need.

/tmp -- for temporary files only, maybe a few megs but can get very big at other times. I leave this as part of root.

/ -- Everthing you dont put anywhere else. I use about 5Gb for this and its still only got about 1.1Gb used. Root is the filesystem and other mount points that aren't assigned anywhere else still live inside root. The system reassembles everthing so It all apears under root anyway. So no matter how you partition your computer everthing will still work.

/usr -- This needs to be a good size, as its where most of your software will live. Its usually the largest of all the mount points. I have 15Gb set aside for this, and its got 5Gb used.

/home -- got a My Documents folder? This is the UNIX equivalant. everthing belonging to any user should be here. I have 5Gb set aside for home.

/var -- Log files, spool files, mail, caches, etc.. they all live here a decent size is needed at least a couple of Gb's. I have this as part of /.

Thats your list. As for /usr/local/ Its usually where software you have compiled and/or written yourself for this machine would go. Kind of like a minuture /usr but for local purposes only. Well you can put things in their without messing up your entire system if things go wrong. Well thats how I use it anyway. :)

The ideal way though is to look at how your current system is looking at these directories and how big they are now.

the 'du' command will tell you how big directories are now.

h/w 08-17-2003 10:31 PM

thank you soo very much - much better now (the 'my documents' analogy realllly opened my eyes - i had never thought of anything remotely similar to windows all this while).
cant thank u enuff - its like a few hours of reading cleared up by ur post. todays been a reasonably productive day now.
ty ty ty. heh! :)

DrOzz 08-17-2003 10:34 PM

the only thing i would suggest from what leonscape has said is to make your /boot a little bigger then 50mb...i know a slack box i have that /boot is 55mb after a fresh install, so whenever i setup a box i just set aside 100mb just for percautionary reasons.

leonscape 08-17-2003 10:35 PM

Your Welcome!

h/w 08-17-2003 10:48 PM

"/tmp -- for temporary files only, maybe a few megs but can get very big at other times. I leave this as part of root."

how big is big? im assuming this is where running processes write temp data to?
so, if i set aside 2gb for /tmp, would it be too much or too little with a lot of programs running at the same time?

thnks again!

h/w 08-17-2003 10:49 PM

drozz : yup, i will set aside a 100m too.

ty! :)

leonscape 08-17-2003 10:57 PM

Well I'm running KDE and Gnome.

in KDE
Kdevelop IDE, Konq, Shells, Kwrite, and a media player.

in Gnome just a few shells for checking my stuff.

and tmp totals about 1Mb.

It depends on the programs you run. and how your distros set up.
I have had it upto 100Mb but I think that was just a weird scenario. but other people have had quite large tmps.

check it with

du /tmp

to see how large your tmp dir is. Thats about probably your best guide, or leave it as part of / and don't give it its own patition (Thats what I did!).

h/w 08-17-2003 11:03 PM

aha ! ok!
so, going by ur advice, i should have some that looks like this :

/boot - 100mb
swap - 1024mb
/ - 6gb
/usr - 12gb
/home - 7gb

for a grand total of ~26gb

u think this would make much performance diff from a :


not that im gonna do it. ill be installing with wht u suggested.

thanks again!

leonscape 08-17-2003 11:12 PM

Should make a bit of diffrence, not huge mind you :)

One bit of advice: put swap on the outside of the disk.

As its the fastest part of the HD. Some people recommend the middle though, but I've found the first partition to be the best.

h/w 08-17-2003 11:13 PM

hmm, ok. u mean at the outside end? where the little 8mb dos partition is?

leonscape 08-17-2003 11:15 PM

Just after should be fine!

h/w 08-17-2003 11:16 PM

also , dont u think latency is increased in gettin to the ends of the disk ?
im only unsure bout it cos its swap, but it shud actually get a bit slower, right?

leonscape 08-17-2003 11:22 PM

The outside of a HD actually spins quicker than the inner side. But the way the drives are built has the same density of information (Unlike a record where the outside edge has a lower density, or it would sound faster).

The heads move around the drive quite a bit anyway, but are usually parked on the outside of the drives.

I think thats right, but Its been a while since I did my partioning and I was going through this stuff myself :)

h/w 08-17-2003 11:28 PM

haha yeah, ur right, u just reminded me too.

so, im gonna have the swap partitioned last now (with the dos one)

uve been great. im gonna go do that install now.
thanks a million again! :)

All times are GMT -5. The time now is 09:10 PM.