LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-15-2006, 02:56 PM   #1
$PS1
LQ Newbie
 
Registered: May 2006
Posts: 2

Rep: Reputation: 0
Need help partitioning system


Hello all...

First off, I admit that I'm a newb to Linux. I've been doing much reading and have found that there is very limited documentation on partitioning your hard drive for a new system. I know there are partitions such as / , /swap, /usr, /usr/local, /var, /tmp, /boot, and /home. BUT how do I know which of these to make primary, which to make logical/extended, and in what order I should create them in.

From what a few people have told me, /usr should be one of the largest partitions as this is where all of my static paths, binaries and symbolics links will be. They also said I should create a separate /usr/local for all software, etc. not installed by Debian. Finally, they said that normally the remaining space on the hard disk goes into /home. Is this information valid?

I have a 60GB drive in my machine and here is how I was going to partition the drive if everything I have heard/read is correct:

/boot - 32Mb
/swap - 2Gb
/ - 1Gb
extended (?)
/usr - 30Gb
/usr/local - 10Gb
/var - 5Gb
/tmp - 1Gb
/home - remaining space

I will be the only user on this system. This will be used as a workstation for personal use (normal desktop use, i.e. internet, email, office and productivity, maybe games), as well as development (programming - software and web), etc.

I would appreciate any help. Thanks.
 
Old 05-15-2006, 03:35 PM   #2
marsguy
Member
 
Registered: Nov 2004
Distribution: Red Hat Enterprise & SuSe 10
Posts: 77

Rep: Reputation: 15
Hello

How you partition your hard drive depends on how you are planning to use your machine?

And since you are gonna use this machine for personal ordinary use, I suggest you that you increase the /home because there you will store all your files.

welcome to the world of Linux
 
Old 05-15-2006, 03:38 PM   #3
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
First I'll caveat that there's very few wrong ways to do it and you'll find out what works best for you over time.

Basically, linux doesn't care if it is a primary or logical partition, but in general, it's good to make /boot a primary partition.

In general, my advice to a Noob trying to partition is to do this
Code:
/boot 100MB -- which is probably too much, but space is cheap
/swap <1 GB -- Most machines with > 512MB RAM will almost never swap
/home 5 GB 
/ 10GB -- most distros will install around 5GB if you install everything, including the kitchen sink, so this leave plenty of room to grow
/shared remaining space -- this will depend some on what else you want to do with the system, but I put most personal files here
because as a single system user you don't need all the fancy partition schemes. Those are generally for servers to minimize overflow attacks. You can actually get by with just / and /swap if you really wanted to. All those other directories will just fall under / and use whatever space they need...

If you're dual booting with windows, then the shared space should be FAT32, otherwise use a journaled filesystem like ext3 (which is the default on most distros).

If you're interested in trying out a bunch of distros, you can leave more extra space at the end of the drive (like I said, about 5GB) to just fiddle.

If you want to play with linux for a while, I would suggest downloading KNoppix. Then when you're ready to partition, you can either use a nice gui program on Knoppix called qtparted or just use the distro's partition tool (some are more intuitive than others).
 
Old 05-15-2006, 05:41 PM   #4
$PS1
LQ Newbie
 
Registered: May 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for the help...I will tinker around with this tonight when I get home from work.
 
Old 05-16-2006, 02:29 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
The next partition scheme I will use (because my current is not perfect) will be something like this:
/ : 7G . Take care that /root is on this partition. This depends on what you will use your machine for.
/boot: 80M . I currently have 27 kernels inside and its not yet full... I'm not even sure I'll create this one anymore.
/home: 5G . This depends on the number of users and what they do.. my movies and music stuffs don't stay here, see below
/var: 1.5G. This is the minimum if you want to have no problem upgrading from one release to another (experimental->unstable, stable->unstable). THis was my mistake, only have 1G which is suffisient for 90% of upgrades. THis depends on the purpose of machine. If its a "normal server" you might want to keep a lot of logs.
/xfs: 10G This is for my movies and stuffs
 
Old 05-16-2006, 07:02 AM   #6
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
.../usr should be one of the largest partitions...
One of the largest 'specialty' partitions, yes ... but 30 GB is crazy.

As has been stated above, you don't need lots of different partitions on a machine that is primarily used by one person, but I like to set mine up like a professional workstation because it helps me stay aware of where things are going. After a bunch of installs and experimentation, this is the scheme I've settled on.

/ 1 GB
/swap .25 - .5 GB
/tmp 1 GB
/usr 5 GB
/var 4 GB
/home ... the rest

This is my current df -h ... Suggests that I probably have /var oversized.
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb1             897M  154M  696M  19% /
tmpfs                 219M     0  219M   0% /dev/shm
/dev/hdb9              63G   25G   35G  42% /home
/dev/hdb6             897M   17M  833M   2% /tmp
/dev/hdb7             4.6G  2.0G  2.4G  46% /usr
/dev/hdb8             3.7G  836M  2.7G  24% /var

Last edited by rickh; 05-16-2006 at 07:05 AM.
 
Old 05-16-2006, 07:41 AM   #7
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I happen to have a 120 GB disk, here's my partition scheme:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             267M  162M  106M  61% /
tmpfs                 443M     0  443M   0% /dev/shm
/dev/hda9             102G   11G   91G  11% /home
/dev/hda8             385M   33M  353M   9% /tmp
/dev/hda5             4.7G  2.7G  2.1G  57% /usr
/dev/hda6             2.8G  633M  2.2G  23% /var
tmpfs                  10M  740K  9.3M   8% /dev
Dunno where those tmpfs come from, but given the size of the disk I don't mind (yet ) Single user homecomputer, but putting /home on it's own partition saved me quite a bit of data-loss (none!) when I had to re-install my system... Not mentioned ('cause I did df -h) is the 1 GB swap on it's own partition, I have 2x 512 MB RAM installed

Regards, Dutch Master
 
Old 05-16-2006, 08:01 AM   #8
wraithe
Member
 
Registered: Feb 2006
Location: Australia
Distribution: Linux... :-)
Posts: 241
Blog Entries: 1

Rep: Reputation: 50
just to add another option that some of us too lazy to worry....
i've been using linux for close on 15 yrs and i dont bother with more than 2 partitions now....
/
and swap....
thats it...
i have two distros like it and xp...
so i have 1 drive with xp(ntfs)...swap...and / (mandriva)
second drive has just ubuntu and a partition unused at the moment...
you can be fancy or lazy...there are no rules in linux...
thats what i like about it...you can make your own...
 
Old 05-16-2006, 09:06 AM   #9
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Yes do it as you prefer, its a matter of taste.
Still for me the /var partition is very important. In case of crash, like disk corruption(never happened in 10/15 years) or human stupidity (still happens eh), first I can sometimes see what happended and more important, on debian system I can recreate a machine with the exact same packages installed. I suggest to think about it.
Well for home, you still have your documents and such.

/usr I use it only on servers to share things
/tmp interesting to mount it as not-executable for security eventhough it partially resolves the problem.

Do you have any other reason for having /tmp seperated?
 
Old 05-16-2006, 09:30 AM   #10
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Quote:
Do you have any other reason for having /tmp seperated?
No real reason it has to be on a separate partition. I think it adds a certain element of safety in that, since it's constantly being written to and deleted from, it makes a likely place for disk corruption. Having it separated makes it less likely that such an episode would affect a critical part of the system. As a separate partition, I could format it and restore it easily.

It's 1 gig to make sure I can write cdr temporary images. I also go there to run a lot of programs there that I want to output files that exist already on other partitions that I don't want to take a chance might be overwritten, like netselect-apt. One of the few places on the system I can run rm -rf without a moment's hesitation.
 
Old 05-18-2006, 05:35 PM   #11
scweej
LQ Newbie
 
Registered: May 2006
Distribution: Kanotix, Debian, openSUSE, Ubuntu
Posts: 11

Rep: Reputation: 0
i've got a dual boot system , windows/kanotix on a 80 gb harddisk

so i have 3 partitions + swap

windows = 12 gb
kanotix = 12 gb
swap = 1 gb
data = 55 gb

basically i try and store all my work in data, which is fat32.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning for dual-system Linunix Linux - Newbie 7 11-04-2005 07:53 AM
Mandriva's partitioning system - Can it partition NTFS relatively flawlessly? eBopBob Mandriva 1 07-08-2005 04:10 PM
Mandrake V10 Install partitioning error. system hang pdkcphil Mandriva 2 04-29-2004 03:00 AM
Rewriting the system then partitioning thorman82 Linux - General 2 11-30-2003 07:20 AM
Partitioning the system.. chuck77 Linux - General 7 03-14-2002 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration