using only one /home with more than one Linux root system
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.
using only one /home with more than one Linux root system
I got to thinking just a few minutes ago about what @Hydrurga has said in another post where Hydrurga and I where in. commenting on it is a good idea to wipe out the home as well as the root directories on a fresh install. Due to probability of conflict of old files mingling with the new install files that are within the home directory.
As well as what others have said about it not being a good idea to run a dual system setup so that both Linux Systems use the same /home due to the .xinitrc, .xprofile, among other basic files that are used by the system when starting a session. This all being said with warrant.
if one uses just one /home partition and two or more distros. They all share this same /home the results being that things then can get confusing for the system because the other system too access the same files and can make changes to them resulting in conflict between the two different systems.
A thought entered into my mind that all one would have to do is a little bit of programming to have the system check which distro is starting up then have it go to a blocked off section just for that distro to use to keep it from mingling where it is not suppose to.
seeings how this is just the beginning of a thought. I have not completed it. Not everything sticking little detail has been worked out to see if this theory will work or not. The furthest I've gotten is this little bit of code. I have not tried it on a start up of the system though, (yet).
Code:
#!/bin/bash
distro=$( cat /etc/*-release | grep ^ID )
cksum="ID=\"void\""
if [[ "$distro" == "$cksum" ]] ; then
echo "$distro"
else
echo "Don\'t Know"
fi
Knowing prior to running it what the output of the code will look like the variable cksum then can be set. Knowing the output of the second distro would look like then the test could be set to check against it.
resulting in something like this.
Code:
#!/bin/bash
distro=$( cat /etc/*-release | grep ^ID )
cksum="ID=\"void\""
if [[ "$distro" == "$cksum" ]] ; then
#run everything that is used by void in this block
else
#run everything that is used by the other distro no matter what it is in
this block.
fi
This thought only goes towards the .bashrc file and or the .xinitrc because most distro's that uses a login manager do not use the .xinitrc, whereas all distro's do use the .bashrc
But what I have here is a proto type of what could be used to build off of in order to run two distro's sharing the same /home and not acquiring conflict between the two as a result of each distro modifying configuration files within the /home/user directory.
most configuration files the changes would be wanted. FireFox or whatever web browser, added bookmarks, and settings changed with one distro would not the user want to see them same bookmarks if he or she where to run the other distro using the same /home/user to alleviate having to go though the internet and finding them again then adding them again, or having to reboot back into that other distro to use them?
So I guess the next question would be. What application configuration files would really be needed to be worried about in order to keep the two systems from fighting against each other in changing what they should leave alone by giving them their own part of that configure file to use for themselves?
The only thing that does come to my mind is just the .x files used for a session that most systems do not use if using a log in manager.
I am assuming it'd only need to go into the .xinitrc file, but I could be wrong. Anyone want to venture into this and add your thoughts?
all comments welcomed within the guild lines and rules of LQ.
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627
Rep:
I've used one /home folder for quite some time now. At the moment I have opensuse tumbleweed and leap, both with kde plasma. But in the past I've also had Ubuntu and others.
All I do to make it work is to have two separate users (both me) and a joint /home2 for my own files common to both. For example a libreoffice calc file can be opened in any of the distros I've used.
I've had no problems with that.
I've used one /home folder for quite some time now. At the moment I have opensuse tumbleweed and leap, both with kde plasma. But in the past I've also had Ubuntu and others.
All I do to make it work is to have two separate users (both me) and a joint /home2 for my own files common to both. For example a libreoffice calc file can be opened in any of the distros I've used.
I've had no problems with that.
I have never used a separate partition for home, although I have read about the merit of doing so.
I always thought it should be easy and trouble free.
Thanks Pete.
I've always/only used Xfce on the same /home partition for about 5 years now.
I would not expect different Desktop Environments to play well across distributions.
dunno that your idea might work especially for different kinds of desktop environment but i found no problem from copying my whole /home/user from debian to slackware on ssd and back after reinstaling debian on hde, but i use only tiny dwm
ps. but there is no problem with sharing one /home among many users with different accounts this is pretty old idea and cool client`s/server setup with /home via NFS.
It was implied, but I should have been explicitly stated as /home/user but it was like 5AM when I wrote that. If I can use that for an excuse. Like Slackware off the command line startx uses .xinitrc to find out what DT/WM to start. whereas Debian uses a login manager to tell the system what DT/WM to start.
two: as stated if one only uses the same DT/WM in all of the different Distros then it should not matter. But every time I've brought up using the same /home/user for different distros with dual boot (long time ago) and later times seen others with that same Idea. I'll read others stating it is not a good Idea due to the mingling of config files.
dunno that your idea might work especially for different kinds of desktop environment but i found no problem from copying my whole /home from debian to slackware on ssd and back after reinstaling debian on hde, but i use only tiny dwm
ps. but there is no problem with sharing one /home among many users with different accounts this is pretty old idea and cool client`s/server setup with /home via NFS.
I've done likewise mostly with just using config files that I needed from debian to a different distro and they worked fine.
With all of this reading thus far,I don't even see what problems may arise, at the present moment without actually applying a live testing. Which would require VBox so I'd not have to deal with my actual installed system.
From my little bit of toying around a shared home is not a good idea for exactly the reason of occasional file conflicts. I get around this with a /data partition with my stuff in it, then symlinked into each installations /home. Data is always the same and /home gets wiped out when I re-install or whatever. Best of both worlds.
From my little bit of toying around a shared home is not a good idea for exactly the reason of occasional file conflicts. I get around this with a /data partition with my stuff in it, then symlinked into each installations /home. Data is always the same and /home gets wiped out when I re-install or whatever. Best of both worlds.
symlinked? like
Code:
sudo ln -s /path/to/data/partition /home/user/datax <or some dir name> ?
I've always just mounted the data partition in fstab
Code:
/dev/sdax /media/data ext4 <or whatever format it happens to be that day> defaults 0 3
then it just shows up in the file manager when ever I open one up. But a link works to obviously.
The individual folders typically in home get linked from my data partition into /home. So for my use it runs as though it is all normal and seamless. I don't just link /data into /home.
To build on what jmgibson1981 said, if you try to use one /home across multiple distros in a multi-boot system, there is a good chance that you will encounter conflicts amongst settings and data stored in the hidden dot-config files.
To build on what jmgibson1981 said, if you try to use one /home across multiple distros in a multi-boot system, there is a good chance that you will encounter conflicts amongst settings and data stored in the hidden dot-config files.
that is a rather general statement, can you give me stats on that, actual data to prove this theory?
No, I can't give you stats from my personal experience. I have heard testimony from persons who have run into problems in such situations, but I can't provide citations, as I didn't bookmark them.
I can give you a for instance: Suppose you installed two distros that both used Gnome and you configured your Gnome one way in one distro. That configuration would then take effect in the other distro also, even if you didn't want it to.
If you do give it a whirl, please let us know how it works out.
All I can say is that, based on my experience with Linux, it's not something I would attempt.
Edit: I do the same as jmgibson1981. I symlink which folders I want to keep off of home taking up space in /media/_data and arrange the /media/_data mount as user on bootup by editing /etc/fstab. That keeps my /home slim and trim. Makes re-installs or edition upgrades a breeze also,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.