LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-27-2010, 08:45 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
Could two distros share the same /home?


Just out of curiosity, suppose I had a harddrive with three partitions. One partition contains Slackware (or whatever), and one partition contains Debian (or whatever). Could both of these installs use the third partition as its /home, without causing any problems?

edit: meant to put this into Linux General, not Debian. Could anyone move it?
 
Old 07-27-2010, 09:43 PM   #2
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
The better option would be to make a very small home-partition for the hidden config files and store all data on a partition which is used and mounted by both OSes (e.g mounted under /home/user/data).
If it is possible at all? I wouldn't know.
 
1 members found this post helpful.
Old 07-27-2010, 09:53 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
The trouble with having the same /home partition or same /home folder to be shared between multiple OS's is mainly due to a user having the same username on each of the distros.

Let's say on Slack, you're name is "bob" - now "Slackware bob" has a load of configuration files & folders in his home folder, which are all set up for the applications & desktop environment that "bob" likes.

Now, go to Debian, and have a username "bob" using the same /home area as used by Slackware's "bob" - the Debian "bob" is going to set stuff and configure his applications a certain way, and these settings may over-write, or screw up, the Slackware "bob" configuration settings.

Now, go back to Slack, and find "Slackware bob"'s settings have been messed up by "Debian bob"'s settings. Both "bob" users are trying to use the same /home/bob folder for their homes.

In short: if you want to share a /home folder across multiple distros, be sure to use a different username(s) on each distro. This has worked for me; it may or may not for you, but it should.

I'll report this for a move to "Linux - General".
 
1 members found this post helpful.
Old 07-27-2010, 10:17 PM   #4
no.guru
LQ Newbie
 
Registered: Jul 2008
Distribution: Slackware
Posts: 28

Rep: Reputation: 16
I've shared the same /home between two different distributions many times without problem. It is absolutely necessary, however, to have different user names in each.

I've also mistakenly installed another distribution using the same /home and with an existing user name. Believe me, you won't make that mistake twice.
 
Old 07-28-2010, 01:12 AM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
Quote:
Originally Posted by Cultist View Post
Just out of curiosity, suppose I had a harddrive with three partitions. One partition contains Slackware (or whatever), and one partition contains Debian (or whatever). Could both of these installs use the third partition as its /home, without causing any problems?

edit: meant to put this into Linux General, not Debian. Could anyone move it?
It is surely no problem to share the same home but but however it depends on the version of the packages, which have to be rather or exact similar. I may quote some applications that have got novel type of rc file, configuration file. It may cause some conflicts one day

The best way is however to use a sharing NFS of the /home, ie to have a file server to it, with rather similar packages not too old.
It is simple you simply have to install nfs server package and somehting like this on nfs server


Like for most debian stable and testing, with several machines, I never had experience of a screwed config file. Maybe once or twice, but I then upgraded the distro. Basically kde change more often their config files; fluxbox never almost

cat /etc/exports
Code:
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#

/home   10.10.1.0/24(rw,root_squash)
On client(s),
/etc/fstab
Code:
10.10.1.100:/home   /home   nfs   defaults 0   0
and at boot, the client gets its home from the file server

Last edited by frenchn00b; 07-28-2010 at 01:15 AM.
 
Old 07-28-2010, 05:53 AM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Next to he issues already mentioned, there's the UID that will cause havoc. Linux doesn't 'use' usernames, it uses a number to represent that user. That number is stored as metadata to each file created by or for that user and if the numbers don't match, you're in for a rough ride... Distro's start numbering regular users from either 500 or 1,000 upwards and reserve the numbers below for the system (root, init, etc)
 
1 members found this post helpful.
Old 07-28-2010, 06:48 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 07-28-2010, 06:20 PM   #8
lxf
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Rep: Reputation: 2
It's probably useless to point Cultist to a NFS share, since that's a completely different thing. Sure, you could provide a common /home share on two different machines with NFS, but that is not what the thread starter wants to do. He doesn't want to make his /home shared across different machines, he just wants to know whether it is an issue to use a shared home for different Linux distributions residing on the same machine (and therefore very likely not run at the same time - which prevents all those locking issues).

Short answer is: No, this is not problem and possible without much fuss - but you probably don't want to do this, as some people already mentioned.

From a technical perspective this is absolutely no problem. Just make a dedicated partition for /home and mount it on both distributions (this will even work across different operating systems e.g. Linux and/or Solaris and/or FreeBSD if you can find a common supported file system) and make sure you share the same user id (UID) for your local user that accesses the files in his home, the username is irrelevant.

However be warned that some programs may create references out of their configuration directories to external paths and/or programs that may live on different locations on both distributions. This could (more likely: will) create some troubles to you. This may be especially true for Gnome and/or KDE configuration directories.

Furthermore, someone already pointed out, that you should have the same version of programs installed on each site. While I wouldn't enforce this demand strictly, you should make sure that program version live at least more or less in the same main version. Configuration files tend to change over time and become hence unparsable to older program versions. This could lead you to some problems with older program versions on either one of the two locations.

Beside of that: no problem. Especially if you do only care about your data. If you really wanna make sure, no programs interfere with each other across different distributions just make a simple if/else branch in your login shell that moves files around according to the hostname of the local system.

Last edited by lxf; 07-28-2010 at 06:28 PM.
 
1 members found this post helpful.
Old 08-02-2010, 01:35 AM   #9
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
I've found it best to have small /home on each distros root (/) partition and a common "data" partition that is shared. The "data" partition contains /Documents. /Music, /Pictures, etc. subdirectories with symlinks from /home in each distro. Be sure to change the UID in /passwrd and /group so they all agree with those in "data". I also found it convenient to put the hidden settings sub-directory of my mail program (claws-mail) in "data", allowing mail retreived in any distro to stay in sync.

Tom
 
Old 08-02-2010, 06:35 AM   #10
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
i have a small home dir on each distros / partition which mainly holds the config files for stuff

my actual data is on /mnt/data (on a diffenrt hard drive) and each folder there is symlinked into /home/username

as i allways use the same username, and in most distros get assigned the same UID (can allways change it if im not) then this works fine
 
Old 08-02-2010, 08:12 PM   #11
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
if you are the only user it would be better to umask 0777 rather than messing around with username and uid's as such
 
Old 08-02-2010, 09:05 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
So what Cultist seems to want is every time he boots he wants all of his documents and such available to him.

I am not sure all distro's can do that but I'd guess you could try it on a few an tell us how it goes. I'd be kind of interested. The link idea may also work well.
 
Old 08-05-2011, 08:36 PM   #13
jkraloff
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Rep: Reputation: 0
Two distros sharing one /home

I read somewhere that there should be no problem with sharing /home - so I went ahead and did it with Ubuntu 11.01 and openSuSE 11.4. No problems at all thus far. The reason I wanted to do so was to share files as the last comment mentioned. The sharing of Firefox bookmarks and kmail files has been useful for myself. I have problems in general regarding the updates on versions messing up the grub or grub2 booting, but have seen no evidence of problems like those mentioned in this thread- thus far [ a couple months ]. I also have kubuntu and edubuntu on the same machine with separate /home partitions.
 
Old 08-05-2011, 08:41 PM   #14
mike_rhce
Member
 
Registered: Jun 2011
Posts: 164

Rep: Reputation: Disabled
Actually, that's what I do on my laptop -- I share a common /home partition between RHEL 6 and Ubuntu 10.04.

As suggested by others, I've had to set up a UID on Red Hat of 1000, with the same username and UID as Ubuntu 10.04. But everything on both systems work fine, even email.

To keep things simple, I set up GRUB 0.97 on a common /boot partition as well. When I update the Ubuntu kernel, I have to update the menu.lst file manually.

It has worked fine since I installed RHEL 6 back in Nov '10. (I had installed Ubuntu 10.04 earlier.)

Last edited by mike_rhce; 08-05-2011 at 08:45 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Share /home between distros IBall Linux - General 4 03-19-2006 10:58 PM
How do I move /home to share between distros? glenn69 Linux - Newbie 5 06-07-2005 10:31 PM
How to share /home with two or more distros? wilshaw Linux - Newbie 3 07-16-2004 10:09 AM
how to share /home between diff distros? letdoit Linux - Newbie 2 05-20-2004 07:30 AM
can two distros share a /home dir ? ruwach Linux - Distributions 3 03-06-2004 08:37 PM

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

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