LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-15-2010, 03:44 AM   #1
betula
Member
 
Registered: Aug 2008
Posts: 165

Rep: Reputation: 15
two distros and one /home partition


Hi,

I intend to pre-partition my hard drive for two distros. If I create two 20gb partitions, but one 50gb /home partition, will the distros automatically save data to /home?

Or would I have to select the /home partition every time I saved something?

And I presume that one swap partition would span the two distros as well?
 
Old 05-15-2010, 04:13 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,546
Blog Entries: 1

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
AFAIK, the only partition that the installer can automagically recognise is the swap one. You'd have to choose a manual partition setup during the installation process and point it to your /home partition of choice.

Note that in some cases it MIGHT not be the best idea to share the home partitions. It contains some config files that might clash. But then again, it might work. What I always do is not to create a separate /home partition, but I have a separate DATA partition which I mount in one of my /home folders and store all data there (music, docs, films, projects, backups of config files, etc. - anything you wouldn't like to lose when reinstalling the system)
 
Old 05-15-2010, 04:13 AM   #3
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,190

Rep: Reputation: 159Reputation: 159
Don't.
Sharing two /home partitions will share the many configuration files as well (the . maps).
Keep a separate /home and share a big data partition.
One swap is enough.
 
Old 05-15-2010, 04:26 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by jens View Post
Keep a separate /home and share a big data partition.
+1 to that. In case you have many users the data partition could have one subdirectory for each user that needs it and you could create a symbolic link in each /home/user1 directory to /data/user1.

As a refinement of this system, some of the files under /home/user1 are not system-specific and you could most conveniently move them to /data/user1 and create symlinks to them in /home/user1. Here are examples to clarify the concept (the data for user c is in directory d for brevity)
Code:
c@CW8:~$ ls -la | grep '\-> d'
lrwxrwxrwx  1 c    users    13 2010-02-21 15:09 .VirtualBox -> d/.VirtualBox
lrwxrwxrwx  1 c    users    10 2010-02-21 15:08 .azureus -> d/.azureus
lrwxrwxrwx  1 c    users    14 2010-02-21 15:08 .googleearth -> d/.googleearth
lrwxrwxrwx  1 c    users    10 2010-02-21 15:08 .keepass -> d/.keepass
lrwxrwxrwx  1 c    users    11 2010-02-21 15:09 .mozilla -> d/.mozilla/
lrwxrwxrwx  1 c    users    18 2010-02-21 15:08 .openoffice.org -> d/.openoffice.org/
lrwxrwxrwx  1 c    users    11 2010-02-21 15:08 Templates -> d/Templates
 
Old 05-15-2010, 04:44 AM   #5
betula
Member
 
Registered: Aug 2008
Posts: 165

Original Poster
Rep: Reputation: 15
You're a bit over my head here, guys. I'll ask another question to help clarify my mind:

If I create a 20gb partition for one single distro, and elect to have a /home partition when I install, would the OS create the /home partition within the overall 20gb?

If the answer to that is yes then I could just do the same thing for the second distro. I don't mind that at all.

Now to the data partition. I've no idea how to create that but lets assume that I've done it. I write an important letter I don't want to lose so would I have to specify that it be saved within the data partition? Or could I set it up so everything I save goes in that partition and I clear out the dross when I get round to it?
 
Old 05-15-2010, 05:00 AM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,546
Blog Entries: 1

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Quote:
If I create a 20gb partition for one single distro, and elect to have a /home partition when I install, would the OS create the /home partition within the overall 20gb?
When installing a distro, you'll reach a step where you need to do partitioning. Assuming that there are no partitions on your hard drive yet. You'll first create a partition (20GB) and the installer will ask you where to mount it. You'll specify / meaning root. Then you create a swap partition. If you leave it like that, your home directory will be within your /

If, however, you create another partition, eg 10GB during the installation, the installer will ask you again where to mount it, and you'll specify /home. Then, /home will be on a separate partition.

When It comes to a data partition, don't worry about it during the installation process. You can easily create it once your system is up and running.
Quote:
I write an important letter I don't want to lose so would I have to specify that it be saved within the data partition? Or could I set it up so everything I save goes in that partition and I clear out the dross when I get round to it?
Each application has its own default save location.
 
Old 05-15-2010, 05:07 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,144

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Different distros may appear to "automagically" do things for you. Including recognise (and mount) partition. A good example is swap, a bad example is home.
Different uid/gid per distros - different versions of the same apps. All sorts of shit just waiting to happen.

Do it at your own peril ...

A common data partition is an excellent idea - your data can be shared, but the system - uh uh (IMHO of course).
 
1 members found this post helpful.
Old 05-15-2010, 05:22 AM   #8
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
Originally Posted by jens View Post
Keep a separate /home and share a big data partition.
One swap is enough.
I agree with the swap, disagree with having separate /home partitions. Reason is, if you use the same programs under both distributions, they'll use the same configurations stored under the home directory (common partition). If you have separate partitions, you'll have to alter their config separately, which means more work. Very probably the two (or more) distributions have close enough program versions so that configuration files don't cause much trouble. Even if some exceptions did, you could probably get away by dealing with them separately rather than overshoot having two separate home partitions. Also, having more partitions means fragmenting the disc more, and while that's usually not a problem if you have very big disk (thus partitions), at some point it might: one partition is filling up while another one has plenty of space. If both were home partitions, you were just making your life difficult for no reason. A separate data partition is a good idea when you have several operating systems some of which "don't talk well", for example if you wanted to share some data more or less "natively", e.g. between Windows and Linux operating systems (in which case you'd pick up either FAT or NTFS for the filesystem, because Windows is poor working with EXTs). But talking about home partitions, this is not the case.

Usually Linux installers have an option (could be default even) that says something like "automatic partitioning". Again, usually this means it creates one big partition for the system (either fills the disc or, in some cases, resizes existing partition(s) and fills the newly created empty space) and one for swap. The result may differ a little depending on the case, but usually /home is in this scheme on the root partition itself, not as a separate partition. I vote for having /home on its own partition (and sharing between distributions if needed), and that usually means you'll need to step into the "manual" partitioning, unless the installer has another "automatic" option for putting /home on a separate partition from root partition. In the first installation, you'll then want (in the "manual" partitioning) to create at least the usual root partition, swap partition (unless using SSD disks maybe) and home partition, and selecting their mount points respectively (swap does not have a mount point in that sense). In the other distribution installations do the same, but do not create a new home partition; instead just select the existing home partition to be mounted under /home (and make sure that it is not marked for getting formatted -- e.g. do not change the filesystem on it). Simple as that. The same applies to any other partitions you might want to share between the distributions, whatever they might be ("data" if you like).

EDIT: this is of course a matter of personal preference, but I haven't had any trouble sharing /home between three distributions, and it's kept the partition table a bit shorter and thus easier to read.

Last edited by b0uncer; 05-15-2010 at 05:23 AM.
 
Old 05-15-2010, 05:29 AM   #9
betula
Member
 
Registered: Aug 2008
Posts: 165

Original Poster
Rep: Reputation: 15
Right, now I've got the idea. Doesn't seem as hard as I thought it might be.

Thanks to all for the help over this. Pity I can't offer aid to others but that's the handicap of advancing years.

Best wishes,
 
Old 05-15-2010, 05:35 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by syg00 View Post
A good example is swap, a bad example is home.
Different uid/gid per distros - different versions of the same apps. All sorts of shit just waiting to happen.
Works for me. Harmonised user IDs (UIDs) and group IDs (GIDs) are essential.
 
Old 05-15-2010, 05:53 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,144

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Not saying it can't be made to work with care.
I just don't recommend it unless people are aware of what needs to be done.
 
1 members found this post helpful.
Old 05-15-2010, 05:55 AM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by b0uncer View Post
I agree with the swap, disagree with having separate /home partitions. Reason is, if you use the same programs under both distributions, they'll use the same configurations stored under the home directory (common partition). If you have separate partitions, you'll have to alter their config separately, which means more work. Very probably the two (or more) distributions have close enough program versions so that configuration files don't cause much trouble.
Nicely explained So well explained that I am going to use what you wrote to explain why having a common /home is not always right -- for reasons that syg00 alluded to with "All sorts of shit just waiting to happen".

"If you have separate partitions, you'll have to alter their config separately, which means more work". +1 to that. Taking Firefox as an example, you would have two sets of bookmarks.

"Very probably the two (or more) distributions have close enough program versions so that configuration files don't cause much trouble" -- but how much trouble is too much trouble? If the configuration files, partly written by one version and partly by another no longer work under either version the we are into "shit happened" territory.

But there is a way to have your cake and eat it which is what I illustrated in this post above. I knew [see note below] that some programs (VirtualBox, Azureus (Vuze), Google Earth, KeePass, the Mozilla programs and OpenOffice.org) are either at identical versions or are config-file compatible on both OSes. For these, the illustrated symlinks provide single sets of configuration files on both OSes on the "data" file system. The other programs have separate configuration files for each OS.

Note: actually I didn't fully know they would be compatible but I backed up the old config files and experimented with shared config files. So far, so good ...

Last edited by catkin; 05-15-2010 at 05:56 AM. Reason: sin tax
 
1 members found this post helpful.
Old 05-18-2010, 10:29 AM   #13
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,190

Rep: Reputation: 159Reputation: 159
Quote:
Originally Posted by b0uncer View Post
I agree with the swap, disagree with having separate /home partitions.
And I politely disagree

Quote:
Originally Posted by b0uncer View Post
Reason is, if you use the same programs under both distributions, they'll use the same configurations stored under the home directory (common partition).
Nonsense, KDE is a good example here.
It can even break with minor version numbers.

Quote:
Originally Posted by b0uncer View Post
If you have separate partitions, you'll have to alter their config separately,
Duh... It's supposed to work like that.
Do you dislike the whole multi-user concept as well?
Quote:
Originally Posted by b0uncer View Post
which means more work. Very probably the two (or more) distributions have close enough program versions so that configuration files don't cause much trouble. Even if some exceptions did, you could probably get away by dealing with them separately rather than overshoot having two separate home partitions.
Compare Debian Stable with Debian Sid ...
If you don't wish to use a seperate home partition, keep it in your root.

Quote:
Originally Posted by b0uncer View Post
Also, having more partitions means fragmenting the disc more, and while that's usually not a problem if you have very big disk (thus partitions)
I like "more fragmenting".
Big partititions are even worse on big disk (think ext3+fchk).
Your home partition needs to be fast for the many (small files) user-config files, I prefer different file systems for (big files) data.

Quote:
Originally Posted by b0uncer View Post
at some point it might: one partition is filling up while another one has plenty of space. If both were home partitions, you were just making your life difficult for no reason.
LVM

Quote:
Originally Posted by b0uncer View Post
A separate data partition is a good idea when you have several operating systems some of which "don't talk well", for example if you wanted to share some data more or less "natively", e.g. between Windows and Linux operating systems (in which case you'd pick up either FAT or NTFS for the filesystem, because Windows is poor working with EXTs). But talking about home partitions, this is not the case.
Windows has many ext2/3 drivers and they do work flawless.
This is a 100% offtopic though.

Quote:
Originally Posted by b0uncer View Post
<snip>
EDIT: this is of course a matter of personal preference, but I haven't had any trouble sharing /home between three distributions, and it's kept the partition table a bit shorter and thus easier to read.
Try KDE.
The OP never mentioned using the same software on both distributions.

Last edited by jens; 05-18-2010 at 11:14 AM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing /home partition between distros naz37 Linux - Software 12 03-10-2010 10:31 AM
/home partition shared by different distros odiseo77 Linux - Software 12 04-02-2006 06:32 PM
How do I know which partition my distros are on? (Multi distros) glenn69 Linux - Newbie 3 06-18-2005 02:43 AM
Is it possible to have two distros sharing the same /home partition felicehome Linux - General 4 05-21-2004 12:27 PM
Looking for a way to Share Home Partition among Distros Huddlebum Linux - General 1 03-31-2004 07:06 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration