Sharing data

Q I was running Linux Mint on an old laptop for about six months when I had to replace the hard drive. (Luckily, I was able to recover the partitions with Clonezilla.) I've been thinking about using all the extra space on my new hard drive by dual booting with other OSes. Except there seemed to be various pitfalls to sharing the home partition directory with hidden files. My question is, can you have a common partition to keep music, photos and text files that can be read and modified by the different OSes? If so, how do you go about setting this up, and would you still need to keep a separate /home for each OS or could the directory be left within the root folder? Also, would it be better to stick with the Gnome desktop in other OSes? You may say that I could use Samba or NFS to get at the files, but I've only been using Linux for about a year and just about productively since I installed Mint, so I'm not too au fait with how these work as yet. I'm still climbing the learning curve.

A Samba and NFS are for sharing files across a network, not within a single computer. You should have a single /home partition, but use a separate directory within that partition for each distro. The idea is that you then have one partition for each OS that you install, plus a single partition for all your own data (and a single swap partition as well). By keeping separate home directories within the single /home partition, you avoid any problems with clashing configuration files. The only thing you need to do is make sure that your users have the same numeric user ID in each distro.

As far as sharing data is concerned, you can do this with symbolic links. Let's say you have a username of steve on Mint, with a home directory of /home/steve and you install OpenSUSE. On that distro you would still use a username of steve, but set the home directory to be /home/steve-suse. Linux doesn't care what your home directory is called - /home/username is only used because it is easy to see which directory belongs to which user. Assuming you're incredibly well organised and keep your photos in /home/steve/photos, your music in /home/steve/music, your mail in /home/steve/mail and so on, create these symbolic links:

ln -s /home/steve/photos /home/steve-suse/photos
ln -s /home/steve/music /home/steve-suse/music
ln -s /home/steve/mail /home/steve-suse/mail

This makes the sharing totally transparent, and everything appears to be in your home directory, in the same layout, whichever distro you are running. If you're using KDE, you can create a symlink by dragging the folder you want to share over a directory and dropping it with the Control and Shift keys held down, or with no keys and choosing Link from the menu that pops up. The only reason to stick with the same desktop in all distros is if it's the only one you like. If you want to experiment, go for it. Each distro is separate, so what you run on one won't affect any of the others.

Follow us on or Twitter

Username:   Password: