Partitioning in order to make running multiple distros as convenient as possible

I know pub is not supposed to be so technical but I thought this was the best place for it.

As I have been using VFIO to pass through my graphics card etc. I have been running my Desktop OS on top of a server’s hypervisor.

Checking out different distros has been so simple as it’s just spinning up a new VM.

However I’ve decided to separate my server so I can finally run my desktop on bare metal.

I’ll have a 1Tb SSD for my linux distros and I want to figure out how to partition my drive and organise my data up to the level of sharing my KDE desktop setup.

My basic thought was to have a separate partition for home an other stuff I haven’t figured out. Then mount that lot through fstab in the correct places.

Anyone any thoughts?

I would (though you could finagle it with links and stuff), probably keep home discrete for each distro due to all the config settings stored in home.
I would make a separate agnostic data directory for large and common file storage.

I’ve tried to share home…but it’s just not a good idea unless you want to tinker with all kinds of links elsewhere (imo).

I was figuring that I could develop a fstab setup that while being really complicated to setup could be pretty much copied across to every distro after I’ve installed everything I need.

It’s currently mostly a shower thought but it could be cool to make it work.

My opinion is that you shouldn’t use partitions at all. Well, it is my opinion so take it with a grain of salt​:grin:

The idea is to create a single BTRFS partition and moving distros to different subvolumes.
I currently have only Windows and 1 Linux distro installed and managing even that is difficult for me, creating many partitions for many distros would inevitably result in lost disk space and complicated booting.
This is how I do it:

  • Install any Linux distro as normal. Choose your BTRFS volume as root and disable formatting
  • Boot from live media, from the live media
    • Move the subvolumes
    • Mount subvolumes and EFI partition
    • Edit /etc/fstab
    • Reinstall bootloader
  • Add new installed bootloader to your current bootloader of choice. If you use GRUB, use the command configfile.

I am not a fan of sharing /home. I think it is better to share the items under /home.

I would create a data partition and then use symlinks or bind mounts to share directories inside that into various distros for multi-booting.

For example, on my laptop, I share these items:

name location
shared-libvirt /var/lib/libvirt/images
shared-snapper /etc/snapper
shared-localbin /usr/local/bin
shared-appimage /home/dalto/Applications
shared-dotsteam /home/dalto/.steam
shared-steam /home/dalto/.local/share/Steam
shared-dotmozilla /home/dalto/.mozilla
shared-dotthunderbird /home/dalto/.thunderbird
shared-dotminecraft /home/dalto/.minecraft
shared-dotlibrewolf /home/dalto/.librewolf
shared-atjoplin /home/dalto/.config/@joplin
shared-joplin /home/dalto/.config/joplin-desktop
shared-vivaldi /home/dalto/.config/vivaldi
shared-documents /home/dalto/Documents
shared-downloads /home/dalto/Downloads
shared-pictures /home/dalto/Pictures
shared-videos /home/dalto/Videos
shared-music /home/dalto/Music
5 Likes

.steam is just a symlink to .local/share/steam, why share both?
EDIT: Also no ~/Desktop?

I have done that for many years. Either it wasn’t always a symlink or I just didn’t realize it at the time.

If that is supposed to be a symlink, I will have to look at how to fix it.

My ~/Desktop directory is always empty. I don’t use desktop icons. I loathe them at a deep emotional level. :scream:

2 Likes

On my 3-month-old EOS install, .steam and .local/share/Steam are (2) separate directories.

2 Likes

It looks like my memory failed me. .steam isn’t a symlink, .steam/steam is a symlink to ./local/share/Steam :man_facepalming:

2 Likes

When I share these directories with multiple users (on a single distro), I always seem to have permission issues even when I change the permissions properly, creating a common group, adding all users to that group, and changing ownership of all files and folders to that group. I’ve even tried sticky bit permissions but even that didn’t help unless the permissions were very relaxed.

Well, that is completely different use case. :slightly_smiling_face:

Can you share why you have multiple users all sharing the same files? Is there a reason that those users need different permissions?

One user per DE :smile: . First user is KDE and 2nd is LXQt. It seems they don’t play nice together when used with the same user.
I reason I do this is because I don’t distrohop (like many people), but I DE hop. :sunglasses:

I would like all users to have the same permissions for the common folders including Downloads, Documents etc. and certain folders which are synced from other folders using syncthing.

2 Likes

In this case, you can use the same UID and GID for all the users but give them separate home dirs. That way they will quite literally have the same permissions.

3 Likes

I’m getting this error when I’m trying to change the uid of the 2nd user to match the first

sudo usermod -u 1001 sralxqt                          
usermod: UID '1001' already exists

I’m trying to create a new user. Even that isn’t working.

sudo useradd -u 1001 -g 1001 -m  sraqt 
useradd: UID 1001 is not unique

Edit:
Reading the manual helped. It seems that I have to add an -o option

2 Likes

This is a nice list of suggestions and I’ll definitely start off with it.

1 Like