LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-19-2005, 07:45 PM   #1
superdude_876
Member
 
Registered: Jan 2005
Location: Canada
Distribution: SuSE 10.0
Posts: 55

Rep: Reputation: 15
Partitioning


Could anybody out there please tell me the most logical way to partition a harddrive for linux. I can't remember what it was but I'm sure it was more than having a swap and another partition for everything else. Any help would be appricated.
 
Old 10-19-2005, 08:05 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
The setup depends on what the system is going to do (i.e. be a desktop, server, etc). I believe partitioning is something of a choice, setup and future requirements blend into one. Here's my setup:

For desktop (120GB w/ 1GB RAM)
/boot - 100MB
/ - 15GB
swap - 1GB
/home - about 60GB

on the server (80 GB hard drive 768MB RAM)
/boot - 100MB
/ - 3GB
swap - 2GB
/home - 1GB
/var - all the rest

Hope this helps.
Tux,
 
Old 10-19-2005, 08:21 PM   #3
superdude_876
Member
 
Registered: Jan 2005
Location: Canada
Distribution: SuSE 10.0
Posts: 55

Original Poster
Rep: Reputation: 15
I am running a desktop machine but shouldn't the swap be twice the RAM? Also, with this setup would I install my programs in /usr/bin or /home?
 
Old 10-20-2005, 12:56 AM   #4
tw001_tw
Member
 
Registered: Mar 2003
Location: St. Louis, MO
Distribution: kubuntu-current
Posts: 551
Blog Entries: 4

Rep: Reputation: 31
superdude_876 - Alot of this in my humble opinion comes down to personal preference. tuxrules gave some good examples.

How simple or complex do you want to get?

example #1 for a 80GB
xda1 = /boot = 100MB
xda2= / = 15GB
xda3 = /tmp = 1.5GB
xda5 = /home = 62GB
xda6 = swap = 1GB

OR example #2
xda1 = / =79.5GB
xda2 = swap = 500MB

Theres ideas behind both methods. Do what you like and/or are comfortable with.
Mine is:
sdb1 = /
sdb2 = /tmp
sdb4 = swap
sdc1 = /home
sdc2 = /root
But I'm sure this wouldn't work for you, but it works for me just fine. (and there is a lot more partitions, but no need to get overly complicated here)

"shouldn't the swap be twice the RAM?"
As far as the swap file being 2X ram? I'm sure some would diagree with me, but I tend to think that applied alot more back in the old days. I have 512MB ram, and SELDOM use my swap file, so I use a 512MB swap, as to not tie up disk space.

"I install my programs in /usr/bin or /home?"
Since your using slack, installpkg will decide that for you - it is generally installed in /usr/somewhere. If you are asked by a non-slack package, I tend to go for /opt .

Just one persons thoughts and opinions,
Good luck.
-tw
 
Old 10-20-2005, 04:01 AM   #5
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Not really much to add, but I did want to re-affirm: it's all a matter of personal choice.

Here's what I use:
Code:
hda1     /                      4.7G
hda2     swap                   0.5G
hda3     /usr                    14G
hda5     /opt                   2.8G                           
hda6     /var                   6.6G
hda7     /tmp                   9.4G
hda8     /home                   75G
hdb2     /usr/share/multimedia  103G
But just because you can do something like this, doesn't mean that you should. One downside is that boot time is increased as all the filesystems are checked.

Something like this can be handy, though. For instance:

I have all my multimedia on a separate disk drive. I feel it's easier to maintain that way. Plus, this idea is pretty handy on multi-user systems. Say you have three people with MP3 collections. Probably a lot of dupes. This can be set up as a shared location for multimedia. Control access with groups.

/tmp can be placed on a separate partition and mounted noexec, nosuid, etc. for increased security (paranoia )
/home can be placed on a separate partiton for similar reasons. Plus, it can make upgrades easier.
/var can be mounted on a separate partition to avoid DoS attacks that attempt to fill up server logs.

Heavy partitioning can be used for lots of other reasons, too. It's easier to add diskspace. For instance ,let's say home is on it's own partition, and that partition gets full. You can always pop in a new harddrive, copy /home to it, edit /etc/fstab, and have all the room you need.

Learning the right partitioning scheme for you can take a bit of frustrating trial and error, in my experience. You don't want partitions too big, because you may need the space they occupy for somethign else. You don't want them too small, because you'll run out of space. Also, locking your box down with options like noexec, ro, nosuid, etc. can lock your box down so tight that you aren't able to easily do the things on your box that you want to do.

On the issue of swap: I always use the lesser of 2X RAM or 512MB. If you have a lot of ram, you aren't going to be swapping very often. Unless you are running certain software, in which case, you should probably already have an idea what type of requirements you will have.
 
Old 10-20-2005, 10:28 AM   #6
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Rep: Reputation: 30
Quote:
Originally posted by shilo
Not really much to add, but I did want to re-affirm: it's all a matter of personal choice.

Thanks for the explanation. That was very enlightening. I always wondered why else you'd put all those root subdirs under different partitions.
 
  


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... Ophidian Slackware - Installation 2 09-04-2005 05:12 PM
Re-Partitioning under_r_run Linux - Newbie 4 10-15-2004 03:45 PM
Partitioning alexidoia Linux - Newbie 2 10-11-2004 03:41 PM
partitioning help bobby4004 Linux - Newbie 6 10-09-2004 09:22 PM
Partitioning cxiii Linux - Newbie 4 08-24-2004 05:03 AM

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

All times are GMT -5. The time now is 02:18 AM.

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