-   Linux - General (
-   -   Could two distros share the same /home? (

Cultist 07-27-2010 08:45 PM

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?

j1alu 07-27-2010 09:43 PM

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.

GrapefruiTgirl 07-27-2010 09:53 PM

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. :twocents:

I'll report this for a move to "Linux - General". 07-27-2010 10:17 PM

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.

frenchn00b 07-28-2010 01:12 AM


Originally Posted by Cultist (Post 4047415)
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

# /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)


On client(s),
Code:  /home  nfs  defaults 0  0
and at boot, the client gets its home from the file server

Dutch Master 07-28-2010 05:53 AM

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)

XavierP 07-28-2010 06:48 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

lxf 07-28-2010 06:20 PM

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.

tommyttt 08-02-2010 01:35 AM

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.


dasy2k1 08-02-2010 06:35 AM

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

DJ Shaji 08-02-2010 08:12 PM

if you are the only user it would be better to umask 0777 rather than messing around with username and uid's as such

jefro 08-02-2010 09:05 PM

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.

jkraloff 08-05-2011 08:36 PM

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.

mike_rhce 08-05-2011 08:41 PM

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.)

All times are GMT -5. The time now is 11:01 PM.