Briefly: I’m running Kubuntu right now, just installed a second ssd. If I install another distro (say opensuse) on it, can I tell it to use the same /home that kubuntu is using (which is on a separate partition and drive)? Actually looking to switch distros, but I want to keep all my data where it is on the bigger hdd, while moving games to the ssd.
If you want/need more details:
- ssd1: windows, kubuntu /
- hdd1: kubuntu (opensuse) /home
- ssd2: (goal) opensuse /, second partition for games
You can share your
/home
partition directly, but you’ll likely find problems with things like theming and other configurations when you do. This is because you’re not only sharing the stuff you want, like~/Documents
and such, but also all of the hidden configuration directories like~/.local
as well. While most every distro uses the same visible directories, they are less likely to store their config files in the same places as others.To get around this, I mount my “universal” home directory somewhere other than
/home
, e.g./mnt/home
instead. Then I symlink the folders that I care about to each distro’s/home
directory, e.gln -s /mnt/home/<username>/Music ~/
. It works across all Linux distros as well as other Unices (as long as they can read the filesystem that you put your universal/home
on…ZFS is great for this). I’ve used this successfully to share my~/*
directories between Linux, FreeBSD, and MacOS installs at one time or another. But it still lets each distro or OS have its own configurations without interfering with the other stuff you’re multibooting with it.I tried to use the same /home for Ubuntu and Fedora… Shudder Things went sideways so fast! Within minutes, half my programs wouldn’t launch, my desktop went screwy, and I would up nuke and paving.
Using symlinks makes sense, I think I’ll try that (on a test box first.)
I see. So I’d probably do just as well to keep the /home’s separate and then store my files wherever then, right?
Yeah, But if I understand correctly that’s how you’ve already got it set up: your
/home
is on your hdd. Once you have your new ssd installed and your partitions set for opensuse/
and your games partition, usersync
to copy your games over to their new partition and mount it wherever you like. Make sure to verify that they all copied over correctly and work as expected before deleting them from your home partition.Once you’ve got your new ssd installed, your new OS on it, and your games transferred to their new partition, mount your home partition on opensuse somewhere that’s not
/home
itself…I like/mnt/home
, but it doesn’t really matter. Make your symlinks to your “content” folders (~/Documents
,~/Music
, etc.), and you’re golden. Likewise, mount your new games partition somewhere (perhaps/mnt/games
) and symlink it as well to wherever makes sense for your purposes.You can then go back to Kubuntu and move the mountpoint for your home partition, recreate a home directory for kubuntu (since you moved the mountpoint it will no longer have a
/home
directory), and make your symlinks like you did for opensuse. You don’t have to, though, unless you want to…having your home partition at/home
on Kubuntu and/mnt/home
on opensuse won’t break anything or matter to either OS, but consistency is nice and can make it easier for you as the user.One last thing: make sure your users and groups match up between your OSs so each has permission to see your shared home directories. If your username is “murdoc” and your UUID is 1000 on Kubuntu, make sure that they’re the same on opensuse. Likewise, make sure your user’s primary group ID matches between your OSes as well. Use
usermod
andgroupmod
if necessary, but hopefully opensuse lets you specify a UUID when you set up your new user.I think I get it, thanks. Looks like I can just do this slowly, one step at a time, instead of one big operation I was expecting. I suppose one of my main concerns was how opensuse would react to there being an existing /home upon installation, but it’s not going to just delete it because I told it to make its own. It counts as separate because it’s on a different device, I just have to tell it where to mount on the new fs, right?
Another little thing: will opensuse just add itself to the my current grub config, or do I need to do anything fancy there?
Sounds like you’ve got it right. As long as you tell opensuse to mount your existing home directory somewhere besides
/home
you’ll be fine. Even if you do mount it at/home
it won’t delete or overwrite it, you’ll just get lots of conflicts with the “foreign” pre-existing configuration files. So yeah, mount it somewhere like/mnt/home
and opensuse will leave it alone and make its own/home
directory on its own partition, and then you can symlink to your existing mounted partition.As for
grub
, it depends on how you do it. If you go with the defaults you’ll probably overwrite kubuntu’sgrub
with opensuse’sgrub
. If so, opensuse will probably detect your kubuntu installation and make an entry for kubuntu. Especially if you’re not planning on keeping kubuntu around long-term this’d be the way to go. It’ll work if you want to keep kubuntu as well, but if you don’t want to keep kubuntu around definitely go with this.Alternately, you could tell opensuse to not install
grub
when you install it. This would leave kubuntu’sgrub
installed and in charge, and then you’d go back into kubuntu and regenerategrub
’s configuration with theupdate-grub
command and kubuntu’sgrub
will detect your new opensuse install and add a menu entry for opensuse. This will keep your boot experience the same except for your new opensuse option, but you’ll have to keep kubuntu around since it’s still in charge of your boot menu.Regardless of which option you choose, if you keep both operating systems installed you’ll likely have to go into the os in charge of
grub
and manually updategrub
every time you install a new kernel in the os that isn’t in charge ofgrub
. It’s not hard, but it is another thing to remember.That’s exactly what I needed. Thanks!
Glad to hear it. Good luck with your computer!
Oh, and make sure that when you’re running opensuse’s installer that you tell it to NOT format your “universal” home partition. And just to be safe, backup your data somewhere else before doing anything!
I will, thanks! 🙂
My earlier post comment’s section might help you https://lemmy.ml/post/12543057
That helped, thanks.
It’s possible in principle, but if there’s different software versions at play, they’re likely writing incompatible cache and config files.
Instead, you could move your personal files (Documents-folder, Pictures-folder etc.; so without the dot-files) to a separate folder/partition/disk and only link those into each distro’s home-directory.
Ok, I get that now. Thanks!