Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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'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.
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.
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)
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.
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.
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.
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.
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.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.