The pitfalls of sharing '/home' partition in multi-boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mediclaser
Level 4
Level 4
Posts: 492
Joined: Tue Mar 20, 2018 2:28 pm

The pitfalls of sharing '/home' partition in multi-boot

Post by mediclaser »

I have started setting up a multi-boot on my desktop pc at home, and I thought it would be convenient to have a '/home' partition shared by all the installed Linux distros. But my experimentation hit a snag... the desktop panel on one of the distros (LM 18.3 Xfce) got messed up after changing something in the panel of another distro (Debian 9.5). The panel in the Mint Xfce got replaced with the same exact Xfce panel the Debian has.

The question is how can I avoid this kind of mess while using a common '/home' partition? I don't want to resort to using different user IDs. Can the issue be avoided by making sure no two distros use the same type of DE (Cinnamon, Xfce, MATE)? Is this just a case of distros (like Debian) behaving badly in this kind of multi-boot setup?

Any other pitfalls to watch out for when sharing a common '/home' partition?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If you're looking for a greener Linux pasture, you won't find any that is greener than Linux Mint. ;)
gm10

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by gm10 »

You can mostly avoid it by using different desktops, but there is no guarantee, as soon as they share components you will share their settings.

The issue will mostly be with the settings stored in ~/.config/dconf/user - one way to handle that could be a script that switches the file depending on the system you booted.

But you'll also have issues with configuration files. For example, if you configure your preferred applications in one installation then they may not work in the other which does not have that application but reads the same ~/.config/mimeapps.list file.

Long story short, it's generally a bad idea to share the same settings across different systems and versions. And not just for desktop stuff. Using different Thunderbird versions can mess up your mail database, for example.
mediclaser
Level 4
Level 4
Posts: 492
Joined: Tue Mar 20, 2018 2:28 pm

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by mediclaser »

gm10 wrote: Thu Sep 27, 2018 8:02 pm ...Long story short, it's generally a bad idea to share the same settings across different systems and versions. And not just for desktop stuff...
Thanks for the advice. I may have to think of another way to conveniently share the home partition between distros. I'm getting tired of having to move/copy files from Home folders of different distros to a common storage. :)
If you're looking for a greener Linux pasture, you won't find any that is greener than Linux Mint. ;)
lazarus

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by lazarus »

What, exactly, do you want to share between the distros?

If it's only the data dirs such as ~/downloads, ~/music, etc., you can accomplish this fairly simply by mounting common, shared dirs to these folders in each distros /home.

eg. setup each distro with /home on their /root partition, so that each distro will keep it's config files separate. Then, instead of having a separate /home partition have just a plain old /data partition and on that have /data/downloads, /data/music, etc.

For each distro edit your mountlist to: mount /data/downloads ~/downloads, mount /data/music ~/music, etc.

You could probably make hard/soft links instead, but I'm fairly sure there are pitfalls down that road.

Also be aware that should any program store cfg data in one of these mounted dirs (eg. a music player saving playlists) you'll need to be sure that this sw is the same across distros, else you have the same problem... best if you can cfg them to save in an original part of /home rather than one of the mounted /data dirs.

I'm explaining it badly - I need more caffeine - but do you get the idea?
User avatar
slipstick
Level 6
Level 6
Posts: 1071
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by slipstick »

I have two editions of Mint on my computer - 17.3 and 18.3. Both have their own home partitions (I actually didn't need to use separate partitions) and both share a common Data partition, as described here:
viewtopic.php?f=46&t=274215&start=40#p1502429

I use this method primarily to help transition from an older edition to a newer one; i.e., from 17.3 to 18 or 18.3 to 19, for example. (Point upgrades are done "in place".) After I got 18.3 up and running well, I quit using 17.3, but it is still usable as a backup in case 18.3 breaks and TimeShift can't restore it.
In theory, theory and practice are the same. In practice, they ain't.
rbmorse

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by rbmorse »

I do what Slipstick does...each distro gets its own /home under / for settings and configurations and the like. I keep user data in a separate partition and give each distro access by adding the user data partition to the fstab so it is mounted when the session loads.

This is a very low risk arrangement, and with Mint I can use Timeshift to save all the Mint configs and settings without including the content of the user data partition which mounts under /media. Timeshift ignores /media by default.
mediclaser
Level 4
Level 4
Posts: 492
Joined: Tue Mar 20, 2018 2:28 pm

Re: The pitfalls of sharing '/home' partition in multi-boot

Post by mediclaser »

Thanks for all those valuable tips. As a result, here is my new approach to multiboot:
1) Instead of using a separate /home partition, I simply reserve a data partition.
2) For each distro, I utilize the data partition via /etc/fstab entry. Then:

Code: Select all

rm -r Documents
rm -r Downloads
rm -r Pictures
rm -r Videos
rm -r Music
ln -s /media/data/Documents ~/Documents
ln -s /media/data/Downloads ~/Downloads
ln -s /media/data/Pictures ~/Pictures
ln -s /media/data/Videos ~/Videos
ln -s /media/data/Music ~/Music
This works perfectly for my intents and purposes. :)
If you're looking for a greener Linux pasture, you won't find any that is greener than Linux Mint. ;)
Locked

Return to “Installation & Boot”