LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2009, 06:40 PM   #1
linux4life88
Member
 
Registered: May 2005
Distribution: Debian
Posts: 58

Rep: Reputation: 17
Question About Partitions


I've used many different distributions (Ubuntu/Kubuntu, Mint, Sabayon and Zenwalk mostly) and have always had my partition scheme for the Linux part as:

Swap
/

But when looking at installing Arch Linux in the installation guide it lists you should have:

Boot Partition
Swap Partition
Root Partition
/home Partition

For one is the root and boot partitions really necessary? And secondly what is a root partition anyway? (Isn't the the partition of / I had above call the root partition. And wouldn't that also be where my home directory would be. So before I was basically putting the two together?) I know what the boot partition is but I've just never used one before.
 
Old 10-07-2009, 06:54 PM   #2
camorri
LQ Veteran
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2, current, slackware-arm-currnet
Posts: 5,556

Rep: Reputation: 659Reputation: 659Reputation: 659Reputation: 659Reputation: 659Reputation: 659
Quote:
For one is the root and boot partitions really necessary?
This is not necessary, it is only a recommendation. I have to assume there are some maintenance benefits in separating / from /boot. I'm not sure what they are. I have always installed them on the same partition.

Quote:
what is a root partition anyway?
This is where the main system files go, not user files.

Quote:
And wouldn't that also be where my home directory would be.
/home should be on its own partition. In the event of a re-install, upgrade etc, if /home is on a separate partition from the / and /boot, then you can avoid reloading all your user data.

On a simple install, you can have / , /boot and /home all on the same partition. It will run.

Swap uses a different file system, and as far as I know has to be on a separate partition.
 
Old 10-08-2009, 09:09 AM   #3
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
This also allows you to specify different mount options in fstab. Such as ro for /boot and nodev,nosuid,noexec etc. for others. It is pretty convenient to be able to wipe out everything except for user files
 
Old 10-08-2009, 03:42 PM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by ubuntugeek194 View Post
I've used many different distributions (Ubuntu/Kubuntu, Mint, Sabayon and Zenwalk mostly) and have always had my partition scheme for the Linux part as:

Swap
/

But when looking at installing Arch Linux in the installation guide it lists you should have:

Boot Partition
Swap Partition
Root Partition
/home Partition

For one is the root and boot partitions really necessary? And secondly what is a root partition anyway? (Isn't the the partition of / I had above call the root partition. And wouldn't that also be where my home directory would be. So before I was basically putting the two together?) I know what the boot partition is but I've just never used one before.
Don't create all these partitions. To put it very simply, a system with a lot of partitions will fail sooner than one with few partitions. The reason is that the probability of a partition-full failure varies directly with the number of partitions. It is not uncommon for a system like this to fail because one partition has filled up while there is plenty of space on other partitions.

Use this scheme:

1. System root (/): all system directories. About 20 GB at present.

2. Swap: twice the amount of system RAM.

3. A data partition that uses up all the rest of the drive space.

Very simple. An argument can be made for a /home partition, so you can reinstall Linux without having to back up and restore (although backing up is very wise). In such a plan, the third large partition could be labelled /home, and have extra directories under the /home directory for large data archives as well as the normal user directories.
 
Old 10-08-2009, 07:01 PM   #5
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Quote:
Originally Posted by lutusp View Post
Don't create all these partitions. To put it very simply, a system with a lot of partitions will fail sooner than one with few partitions. The reason is that the probability of a partition-full failure varies directly with the number of partitions. It is not uncommon for a system like this to fail because one partition has filled up while there is plenty of space on other partitions.
I've never heard of this...would you mind explaining further, please? And if it's only in cases where some partitions are filled to the brim while others have free space, then what if it was planned out so they don't get filled completely? None of my partitions are ever used above 70%
 
Old 10-08-2009, 07:54 PM   #6
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by voyciz View Post
I've never heard of this...would you mind explaining further, please?
A hypothetical system with just one partition cannot fail due to excessive storage until the drive is completely full.

A hypothetical system with two partitions will fail if one of the partitions fills, regardless of how much space remains on the other partition.

It gets worse with more partitions -- the probability that one partition will fill before the others is very high and becomes higher as the number of partitions increases.

This is not rocket science. Imagine a special, self-defeating car with four fuel tanks -- if any of the four tanks empties before the others, the car suddenly stops on the freeway, regardless of how much fuel remains in the other tanks. That is what having multiple partitions does for system reliability. Partitions can be justified, but all such schemes should be weighed against their drawbacks.

Quote:
Originally Posted by voyciz View Post
And if it's only in cases where some partitions are filled to the brim while others have free space, then what if it was planned out so they don't get filled completely?
Such planning is fraught with unforeseeable chance factors, and such planning is not necessary if the partitions are never created in the first place. Obviously we cannot predict which of several partitions will fill first, and it is equally obvious that we shouldn't have to make such a prediction.

Your argument seems to be that, if the drive isn't used to its full capacity, then there's no problem. Even that is a shaky premise, but it argues for something with no upside -- where is the advantage of splitting the drive up into isolated blocks of storage?

A system partition separate from a user partition makes sense -- you can install a new version of Linux without having to back up and restore. A swap partition makes sense. That's three ... after that, it stops making sense.

I think many people assume multiple partitions make sense, but without actually thinking through the implications and the risks.

Someone will surely argue that a multi-partition system is like a multi-engine airplane, but for this "airplane", it falls out of the sky as soon as any of its engines fails. This, by the way, is why Charles Lindbergh turned down a multi-engine plane to fly across the Atlantic in 1927 -- he discovered the plane couldn't stay airborne on one engine, so he realized one engine was actually safer (fewer things to go wrong). Incidentally, a team of flyers in a multi-engine plane disappeared without a trace at about the same time.

Pardon my digression. Again, it's not rocket science -- more partitions only decrease system reliability.
 
Old 10-09-2009, 11:28 AM   #7
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Thank you, I see what you're saying. But is there no security gained by ro/nodev/nosuid mount options?
 
Old 10-09-2009, 11:48 AM   #8
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
Quote:
Originally Posted by voyciz View Post
Thank you, I see what you're saying. But is there no security gained by ro/nodev/nosuid mount options?
Just curious, what do you gain by using those options? I mean, what are the benefits, and for what type of user?
 
Old 10-09-2009, 02:48 PM   #9
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by voyciz View Post
Thank you, I see what you're saying. But is there no security gained by ro/nodev/nosuid mount options?
No, not if the partition can fill up. If the partition is mounted read-only to prevent anyone filling it up, it then represents a cure looking for a disease.
 
Old 10-09-2009, 03:56 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
In fact you can setup just one large partition and also have a swap file if you need it. This would not be a good idea if you plan on upgrading your system instead of complete wipe and reinstall. But, I'm just saying it's possible and it saves space, it's what I do. You don't even need swap usually, only if you edit large images or load large files into RAM that may slow the system to a crawl without swap space.
 
Old 10-10-2009, 03:16 PM   #11
linux4life88
Member
 
Registered: May 2005
Distribution: Debian
Posts: 58

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by H_TeXMeX_H View Post
In fact you can setup just one large partition and also have a swap file if you need it. This would not be a good idea if you plan on upgrading your system instead of complete wipe and reinstall. But, I'm just saying it's possible and it saves space, it's what I do. You don't even need swap usually, only if you edit large images or load large files into RAM that may slow the system to a crawl without swap space.
This is what I've usually done in the past is have a swap and the rest in one big file. When I get around to installing Arch on my system instead of in a virtual machine I will follow the 4 partition setup just for change. Thanks everyone for the help.
 
Old 10-11-2009, 04:44 AM   #12
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 camorri View Post
Quote:
For one is the root and boot partitions really necessary?
This is not necessary, it is only a recommendation. I have to assume there are some maintenance benefits in separating / from /boot. I'm not sure what they are. I have always installed them on the same partition.
there have been benefits in doing this, depending on the filesystems in use. At one time (& I'm not exactly sure about the current situation) you could not boot with the kernel on some partition types such as ext3. The ext3 part of the problem may now be cured, but I am unsure of the situation with ext4, reiser4, xfs, jfs, btrfs, zfs, nilfs...

the simple work-around for this problem was to have a small ext2 partition for /boot, and that always seemed worthwhile to me in the case that you didn't know what distro and which fs type you were going to use next.

Quote:
Swap uses a different file system, and as far as I know has to be on a separate partition.
Not quite true; if there is a swap partition, it has to have its own filesystem, but a swap file is a viable alternative. At one time a swap file was considered to impose a performance penalty, but Andrew Morton has claimed that this is no longer the case. Can't say i've felt moved to try it, though.

Quote:
(Isn't the the partition of / I had above call the root partition. And wouldn't that also be where my home directory would be. So before I was basically putting the two together?)
your wording is somewhat unclear, so:
/ is the root of the filesystem. You will have one of these whatever you do. You may or may not have other things (such as /home) on this partition; if you have a separate /home partition, then /home will be on that separate /home partition, if you don't, it won't. You will always have /home, the only question is whether it is on its own partition or not.

For most purposes, it looks exactly the same, whether you have the home partition separate (eg, you can cd up and down the tree without ever noticing the difference) or not. With the separate home partition, you do have the concern whether the separate home partition is filling up, and so, as a minimum, you should watch out for that.

When you come to re-install or upgrade you distro version, however, having home separate does give the advantage that you can preserve this partition while clearing the others. This has the potential to be easier and save time, but does not obviate the requirement for a back-up, in case things go wrong.

Of course, you do not 'need' convenience, so it is not necessary to do this.
 
Old 10-11-2009, 06:33 AM   #13
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 891

Rep: Reputation: 119Reputation: 119
/
/home

these are the basic partitioning I use

And I do add a 2x ram swap as well even though I don't think I ever use it.

Last edited by jmc1987; 10-11-2009 at 06:34 AM.
 
Old 10-13-2009, 11:32 AM   #14
Deviathan
Member
 
Registered: Dec 2005
Posts: 52

Rep: Reputation: 18
I agree with others here. /,/home, and swap should be all you need.
 
Old 10-14-2009, 04:20 PM   #15
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
Sorry, you didn't state this explicitly, but everyone (& I include myself) seems to be giving you advice assuming that the question concerns a desktop system; if this is a server, then the advice would get a bit more involved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on creating more partitions than default ones, i.e. /home,/root partitions casmac SUSE / openSUSE 1 12-20-2006 05:02 PM
Partitions Question adds2one Slackware - Installation 2 08-26-2005 04:48 AM
Partitions question mebrelith Linux - General 2 01-28-2005 05:07 PM
partitions question neilcpp Slackware 2 01-26-2004 01:14 PM
Partitions Question Mega Man X Linux - General 3 06-21-2003 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration