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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2010, 11:03 AM   #1
McCordRM
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Rep: Reputation: 1
Partitioning question.


So I've been playing with installing Linux to get a feel for the process as part of my self-training.

I have discovered that creating a seperate partition for some directories helps you keep your setup backed up in case of a re-install or upgrade- specifically, the /home directory.

Anyhow, I'm trying to figure out the best file size combination for the directories and which ones I actually need to create a seperate partition for.

Thus far, for my 150GB hard drive I have:

*************************************
1. / : Root at 70GB
2. /boot : Boot at 100 meg
3. /swap : Swap file at 2GB
4. /home : Home at rest of the drive
**************************************

This would keep my personal settings (UI, documents, downloads, etc) backed up. Should I create a partition for /etc to keep from having to re-install programs? And how do my size allocations look?

Last edited by McCordRM; 07-15-2010 at 11:05 AM.
 
Old 07-15-2010, 11:07 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
At a minimum I always create /boot at atlest 100MB, / at a minimum of 1024M, swap depends on how much memory you have and if it's a desktop or server. /home I always start low but add when necessary as I'll now point out I hope you are using LVM, it will make your life easier.

I always recommend separate /usr, /tmp and /var at a minimum as well. /usr is where most executables for applications go, along with libraries. With most distro's you can setup a 8192M partition and be okay forever for the life of the install. /tmp and /var, just depends, but starting at 1024M or 2048M is usually reasonable. The main reason these have their own partitions is tmp can grow fast, it's world writeable. so if it fills up, you don't want it sitting on / and you run out of space, because then things stop working til space is cleared. Same goes for /var, it's mostly for logging, if a process goes wacko and fills up /var, if it's on /, same scenario as above.
 
1 members found this post helpful.
Old 07-15-2010, 11:21 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I do exactly the opposite as I don't run a server and can afford to install a Linux with just one partition so that /boot, /var, /home etc are all subdirectories inside. I have one swap to serve all the Linux I install.

It is much easier to resize one partition if the total space runs out.

No Linux distro ever refused to be installed in one partition but Red Hat family distros always try to sell the user the LVM which cannot be read by a boot loader and so /boot is mandatory if LVM is opted for.

I put my own personal data in a separate partition accessible by all operating systems.
 
1 members found this post helpful.
Old 07-15-2010, 11:41 AM   #4
McCordRM
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 1
Obviously, I'm missing something.

Saikee: If you put all your personal data in a separate partition... but aren't putting /home in a seperate partition... what exactly are you saying there?

Trickykid: I'm running as a Desktop, with the intent being to be able to upgrade to a newer version of Mint in the future, or perform a re-install on a whim if I like and still have the same desktop configuration and programs ready to run.
You said to have / be at 1024M minimum... would I actually want it that low? Ever? And what about top-end? How big is too big for "/"?
 
Old 07-15-2010, 11:52 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by McCordRM View Post
You said to have / be at 1024M minimum... would I actually want it that low? Ever? And what about top-end? How big is too big for "/"?
Sure, when you separate the other partitions, / takes up very little space, most will end up being /etc which is configuration files that take little space. The bulk of an base install will end up in /usr. My own desktops, / usually accounts anywhere between 200-400MB of total disk space usage, never really growing either.

Most people on desktops are fine with just having one big / partition, some get away with just a /, /boot and swap. I like to keep them separated for filesystem integrity, etc.
 
1 members found this post helpful.
Old 07-15-2010, 12:10 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
A data partition can be mounted freely in any Linux. It doesn't has to be /home and can be any name. It is also very difficult to have one /home for several Linux because every desktop would want to keep its own settings. A data-only partition can be any filing system too and much easier to access by other operating systems, though it is possible to load a driver in a MS Windows to read a Ext2/3 partition.
 
1 members found this post helpful.
Old 07-15-2010, 12:28 PM   #7
McCordRM
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 1
Ah, now that answers my question. I'm still trying to learn where everything gets stored in Linux.
Overall, it seems a lot more logical and straight-forward. But I still don't understand program installs.

In Windows, if you install a program called Bob then a directory named Bob will appear in Program Files. However, not ALL of Bob's files will be in that directory: some may go to System32 directory, some may go elsewhere. Then there are dependancy links all over the place so even if you kept the Bob directory in tact during a re-install the program still wouldn't work because you need to re-install the program to re-create the dependancy links, registry entries, etc.

So it sounds to me like I really need to have a setup like:

1. / :About 1 gig to be safe.
2. /boot :Keep at 100 megs
3. /swap :2gig is fine
4. /home : 25% disk space
5. /usr : 75% disk space

But what about /etc? I thought configuration was mostly in your /home directory?
 
Old 07-15-2010, 01:04 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by McCordRM View Post
Ah, now that answers my question. I'm still trying to learn where everything gets stored in Linux.
Overall, it seems a lot more logical and straight-forward. But I still don't understand program installs.

In Windows, if you install a program called Bob then a directory named Bob will appear in Program Files. However, not ALL of Bob's files will be in that directory: some may go to System32 directory, some may go elsewhere. Then there are dependancy links all over the place so even if you kept the Bob directory in tact during a re-install the program still wouldn't work because you need to re-install the program to re-create the dependancy links, registry entries, etc.

So it sounds to me like I really need to have a setup like:

1. / :About 1 gig to be safe.
2. /boot :Keep at 100 megs
3. /swap :2gig is fine
4. /home : 25% disk space
5. /usr : 75% disk space

But what about /etc? I thought configuration was mostly in your /home directory?
Okay, first rule, drop all Windows knowledge and how it's setup or you'll just find yourself with more questions.

I would not allocate 75% of your space to /usr unless you plan on installing tons and tons of applications, which most distro's come with just about everything you need already.

The beauty of using LVM is you can grow when necessary. Most spaced used are user files, usually stored in /home directories.

As for configuration files, conf files in /home directories are usually pertained to user settings, not OS settings. /etc is the place for OS and services settings/configurations.

Honestly, I'd say something like this would work:

/ = 2048M A little bigger, provides a little more wiggle room, especially if you don't want a separate /var or /tmp.
/boot = 100M is usually sufficient in almost all cases, unless you like having dozens and dozens of different kernels to boot from.
swap = equal or double size of RAM installed. If this workstation isn't going to do really heavy RAM intensive applications, half of your RAM (that's if you have 1-4GB of RAM installed) is sometimes sufficient. But you're 2GB is likely fine and you're not wasting a bunch of disk space if you have a 150GB drive.
/usr = 8192M is usually plenty to start with. A likely distro install will start with roughly 2-5GB of disk usage, leaving around 4-5GB of space to grow into with more applications.
/home = rest of space or start a little larger if you plan to place all your user files here. I always start with say, 20GB and grow it on the fly if I need more.
/var = I still always say create a separate /var partition with at least 1024M in size, it might save you one day if it happens to fill up / and services and processes stop working suddenly.

Everything except /boot can be on an LVM layout, go with LVM is another recommendation.
 
1 members found this post helpful.
Old 07-15-2010, 03:32 PM   #9
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by McCordRM View Post
But what about /etc? I thought configuration was mostly in your /home directory?
/etc contains (largely) configuration for system services, the configuration for an individual user is within their /home/username structure as hidden files.

And don't even think about giving /etc its own partition; it can be done, but its hardly a newbie option.

Try reading this or this for the general background.
 
Old 07-15-2010, 03:46 PM   #10
McCordRM
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 1
The only reason I mentioned Windows was to point out the program installation method. In Windows, you always know where a program installs (default is program files folder), but not necessarily where all the files for that program go, or all the registry entries it requires. Now, I'm trying to figure the same stuff out for Linux.

For example, let's say I add a program to Linux. Instead of sticking with Firefox, I decide to install Chrome. If I re-install Linux, what folder should I leave alone (IE: Don't format) to have it ready to go as soon as the install is done? Kind of like having my settings saved because my /home partition is saved.

I understand not worrying about the /dev directory because in the event that I upgrade my hardware this could change anyhow. Whereas the "look" of my system is something I stick with once I have it right, thus partitioning /home. Which is also why I'd like to keep my programs directory seperate... I tend to stick with the same programs once I have the ones I like.

As for /var and /temp... what's a good reason to keep them seperate? I thought they were dynamic in that they both have to do with "right now" file writing. The files in those folders right now don't really do any good later on, or especially after a re-install.
 
Old 07-16-2010, 06:48 AM   #11
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 388
Blog Entries: 9

Rep: Reputation: 88
& I do even more different:=

what I do, is to install any O/S's / into it's own partition, which is about 10Gb in size,
& have a common /home.

Each O/S has a different UserName, so they can all use that same /home partition,
which is aways in a extended/logical partition,, this extented partition also has the /swap partition in it.

Generally, I only ever run three O/Ss, so they are all Primary partitions, for their / .

the 4th Primary contains the rest of the hdd as the extended partition.
 
Old 07-16-2010, 06:53 AM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Personally I don't have a separate /home partition, because I know I won't put so much data in it that it chokes up the system.

And AFAIK having a separate /boot partition was because of a hardware limitation of older PCs, and completely useless now. Correct me if I'm wrong about this.
 
Old 07-16-2010, 08:02 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
MTK358 ,

Your are not wrong. There was a time when both Lilo and Grub could not boot beyond 1024 cylinders. /boot could therefore be position earlier at the start of the hard disk to overcome this hurdle.

The other usage is Grub1 (not sure about Grub2) and Lilo cannot read a LVM so /boot has to be placed outside the LVM.

Users like to follow with questioning the purpose.
 
Old 07-16-2010, 10:59 AM   #14
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by MTK358 View Post
And AFAIK having a separate /boot partition was because of a hardware limitation of older PCs, and completely useless now. Correct me if I'm wrong about this.
No, it's used again because most use LVM, so /boot has to be on a non-LVM partition.
 
Old 07-16-2010, 11:19 PM   #15
McCordRM
LQ Newbie
 
Registered: Jul 2010
Posts: 16

Original Poster
Rep: Reputation: 1
Well, I only plan to use one Operating System.
There was absolutely no point to installing Linux with Windows since Windows did everything I needed. Jumping out of a game and rebooting to Linux seemed time consuming and stupid just to write a document or surf the 'Net.

Now that I'm switching, I plan to leave Windows far, far behind for exactly the same reason- no sense switching back and forth depending on what I'm doing at that specific time. I'll figure out how to get Linux to do what I want and be done with it... for free.

Right now I'm working on Arch Linux. It's going to be a pain in the ass to learn, but at least I'll have exactly the system I want in the end. I ALMOST did Linux From Scratch... but that was way over my knowledge level and desire to learn for the moment. I figured Arch was the next best thing.
 
  


Reply

Tags
install, installation, partition, partitioning, size



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
Can anyone help with this partitioning question, please. limeylew Linux - Hardware 3 12-22-2007 10:19 AM
Question about partitioning RAMMS+EIN Linux - Newbie 3 04-26-2005 04:43 PM
I have a question about partitioning... Wind_Sp00n Linux - Newbie 12 09-07-2004 02:29 AM
partitioning question as well as others Abe_the_Man Linux From Scratch 2 01-28-2004 02:46 AM
partitioning question rayne Linux - Newbie 2 09-26-2002 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:02 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