Is it possible to share 1 home partition among 2 distros?
So here the idea:
- I will create 4 partitions on my hard disk
- One of them will be /home/myname
- I will install 3 OSes on the other partitions, say they're Mint, Arch, Manjaro.
- Mint, Arch and Manjaro will share the same home directory
The reasons behind it are to save space, prevent data from being duplicated, and need not to reinstall packages. I know they're different systems, but I hope each one will use only the files it needs from in home directory and leave other files (belong to other OSes) untouched. Is it possible it works that way. Anyone have ever tried it?
About this post
- Posted
- Archived
- Score
- 44 · 100% up
- Kind
- Text
- ID
- ca2the
35 comments
I don't think it's a good idea to share home directory with multiple os as config file will be different for different distros
it would probably work fine (or at least won`t be horribly broken) if OP uses different DE for each distro
/u/xversion1 I do that, but with different DEs, it is Debian 9 and Arch for me. Even so I am prepared to solve broken config files if those distros ship different versions of packages, like Mint and Arch in your example. And I do backup my home folder.
Edit: also, packages are not in $HOME , so you will have to install them on every distro.
I intend to use Cinnamon, Openbox and KDE. So I guess it would be fine?
Can't we share /usr ?
I've done this before and it went horribly (Fedora & Elementary) and caused the second distro to be unusable due to config issues.
My advice would be to have two separate home partitions and to bind mount data folders (Documents, Photos, .etc) into your second OS's home directory.
Create a partition that contains your desktop, documents, download folders etc, then mount each folder into the relivent home folders for each distro.
This is what I was going to suggest. Make a “storage” partition that’s shared and keep the configuration files separated.
I second this opinion. I've done this before, experimenting with different distros until I settled on Kubuntu. I keep all of my docs, pics, music, etc. on a separate disk and whenever I do a new install, the first thing I do is delete the Documents, Pictures, etc. folders from home and then I create symbolic links to those folders on the other disk. I set up fstab to automount all disks at startup so they're ready to go.
I had seriously considered doing this a while ago. There's cases where it can mess up badly. The problem comes when you share the same home folder, not the same partition.
Let's say both Mint and Arch have home at
/home/myname. Both have the latest Firefox installed. The latest Firefox for Mint may be a different version than the latest Firefox of Arch. And it is also possible that both create config and cache files which are not parseable by the other. Firefox and other such apps may not expect two different versions of itself accessing the same files, which may lead to crashes. Firefox was just an example but such a thing can happen with any program which has different versions on both OSes.What you can do is keep different home folders on the same partition, like
/home/mint/mynameand/home/arch/myname. You can keep any shared files in a/home/commonfolder and symlink them to your different home folders.I tried that method for a while but it breaks snap programs if you use that system. Snap requires a direct /home/username if memory serves.
If that is true, that is just poor design. Your home folder path should always be obtained from the HOME env variable which is set from the passed file. So basically it can be any folder on the system as long as it is correctly reflected in the passwd file.
A better idea is to let them have their own home directory, but create a separate partition for your shared files. Then symlink directories like Desktop, Documents, Videos, etc. This way your config files won't be messed up.
You can but I wouldn't as there are things which are going to mess up.
However I have an alternative suggestion, note this is only really sensible for a small number of users who are willing to jump some small hurdles.
Install all 3 OSs as suggested but make sure each user name/UID/GID is constant across each OS.
Do not have a separate home partition. Instead have a /mnt/data partition. Create a user directory in /mnt/data/ e.g /mnt/data/bob/
use symlinks to connect folder in each /home to /mnt/data but ignore dot files e.g. ~/.config or .bashrc.
This way large files such as media and doc can be shared (and only use disk space once). Whereas small config files which may be slightly different from distro to distro will still be different.
The next stage is probably having a dotfile manager to manage consultant configs. E.g. gnu stow.
Yes, but it is a bad idea. Different software versions can do things differently, different distros can store stuff in different places.
If you use a different DE per distro this could largely be ignored.
this really
it can work where the distros are similar (say debian and ubuntu) but even there be prepared for one small thing to render the other unusable
at the end of the day it is not worth it
You can as long as your usernames are different so the config files do not conflict.
It's not a great idea IMO. Source: I did this for a couple of months between Arch and Linux Mint. I hardly touched Mint, and one day I booted into it and it just didn't allow me to log in anymore. I didn't spend much time debugging it so I am not certain if the home partition was the culprit though.
Now I store my dotfiles in a git repo and I just clone it when I want to bring my configs over to a new distro. I have always kept my personal data on a filthy NTFS partition so I don't need to worry about that. If I need/want anything else I just copy it over.
As others have said, if you're using the same user on all three so they share a home directory, you're going to run into problems.
There is one potential way round this.
Alternatively, you could have three config directories within your home directory and have a systemd unit symlink the right one to ~/.config at boot before you log in your DE.
Its a bad idea but honestly it doesn't work too bad
Conflicts can cause problems. One way (I used, but do not use now) is to create 3 or 4 /home folders one for each distro you use: e.g. /home/ubu/user. /home/SUSE/ user; /home/debian/user. This keeps the files separate to distro, but /home should be empty if possible
You can, but you shouldn't.
Share a data directory. Documents, music, videos, etc. It can even be mounted as a subdirectory of home.
But don't share home. Home has all your configs, which are very version specific. Different distributions will have different config files that will be incompatible. Things might seem to work ok, but you're dooming yourself to all kinds of weird behavior down the line.
To put it another way, the downsides outweigh the benefits.
Possible? Yes! Advisable: no!
Think of the config files or other distro specific files.
However what you could do, if you have a spare system, is set up a file server and share your files from there; mount the folders in the OS you are running.
This way you are safe from issues arising when you need to reinstall one of your operating systems.
You would be better off creating a common data area and sharing that between distributions. That way, the configuration files that define your desktop and userspace are separate, one per distribution.
The common data area would contain your data files, directories and project workspaces, things that aren't distribution-specific.
I think if you install each distro to it's own partition, AND you create a single /boot in which they all support the same version of grub (should be rare but some distros may not all support grub2) You should be able to share /home just use different user names between the distros so the user config files don't cause funky issues.
Yes, it's fine, just create different users for the different distros tho, as configs between distros may conflict. But so long as you have separate named /home directories, to keep things separate, you should be good
Deleted before we saved it.