Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

Sharing /home in a dual Linux scenario


hendrik

Question

I currently have dual boot with Windows XP and Debian testing.

 

I'm considering adding funtoo to the mix, so I have an escape hatch should systemd become intolerable.

 

Can I share the /home between the two systems?  Or will that lead to indescribable chaos?

 

-- hendrik

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

There's no reason why you can't.  You just need to make sure that you configure your userids and groupids the same so that ownership is the same in both systems.  It may get a little tricky if your home file system is in a logical volume.  In that case you would probably need to make sure your LVM versions align pretty closely.  No problems there that I'm aware of but it would be prudent.

Link to comment
Share on other sites

  • 0

Doesn't LVM2 work by finding indexes and volume signatures and the like on disk, rather than in configuration files?  Aren't the configuration files there to help recovery in case of disaster, not for normal use?

 

I've definitely used multiple Debian systems (like testing and stable) with the (some of) same LVM partitions on the same machine and never had problems -- but then, the Debian default configurations may always just happen to be the same.

Link to comment
Share on other sites

  • 0

Doesn't LVM2 work by finding indexes and volume signatures and the like on disk, rather than in configuration files?  Aren't the configuration files there to help recovery in case of disaster, not for normal use?

 

I've definitely used multiple Debian systems (like testing and stable) with the (some of) same LVM partitions on the same machine and never had problems -- but then, the Debian default configurations may always just happen to be the same.

 

I believe that you're correct.  I had no problems mounting my Fedora home directory under Funtoo although I didn't switch back and forth - Funtoo or bust for me.   My wariness is more about the possibility that if one version gets too far ahead of the other it might do something the older version wouldn't deal with gracefully.  Even this seems unlikely if the configuration isn't changing.

Link to comment
Share on other sites

  • 0

I've done what you are trying to do before, but I switched to a different method.  The issue is you have your .config and .gnome, etc. type of config files and the OS'es can get things mixed up.  Better I think to use links for those folders you think you might want to share, then the config folders will be unique to each, sidestepping that problem.

Link to comment
Share on other sites

  • 0

I did a similar trick having the Documents, Pictures, Videos, etc linked to the Windows versions of those directories on my Dad's laptop.  That shares Linux and Windows files pretty seamlessly.  I also did a trick where I can boot other versions of Linux and then boot the other in a virtual machine.  The one in the virtual machine won't be able to see the shared partition and won't mount it, but it fails over to a network mount (shared by the host OS that does have it mounted) in the same location.  You won't be able to share the base of your home directory, just subdirectories, but this is probably more organized that way.  You could even make symlinks for ~/.cache and such.

Link to comment
Share on other sites

  • 0

There are many ways to achieve this. One I like much is to create symlinks.

 

Let's say my Debian /home is on /dev/sda5. Funtoo is installed on second DD and /home is on /dev/sdb2. I create a mount point which name is /mnt/guydata. Name may be anything to your likings.

 

Debian /home is added to Funtoo /etc/fstab.

 

For example if I want to use /home/guy/Documents/Notes_Debian from Funtoo, I create a symlink :

$ ln -sf /mnt/guydata/guy/Documents/Notes_Debian /home/guy/documents

You can also delete all folders from your Funtoo /home and create symlinks from your Debian /home in using same names. Thus if you download something to your Download folder when running Funtoo, downloaded file will be available from within your Debian Download folder  when running Debian.

$ rm -r ~/Download
$ ln -sf /mnt/guydata/guy/Download ~/Download

As stated earlier user id, ownerships and permissions must be identical.

Link to comment
Share on other sites

  • 0

There are many ways to achieve this. One I like much is to create symlinks.

Symlinks are my choice too.  I have all the things I need to share on a data partition, and a script that creates the symlinks.

The script is essentially a list of "if x is available, then create this link and backup the file if already there".  It will also check for different software versions if needed (some time ago I had two different versions of tmux installed in Debian and Funtoo which needed slightly different configuration files).

This way I also keep track of the stuff that I actually need to backup or share, as opposed of just sharing all the junk in /home.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...