Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a new laptop and I would like to try some different versions of Linux.

Can I dual boot and set the home to be on the same partition when installing? Will the installer work correctly if I do this (say between Mint and Arch)?

Can I use the same username and switch between them? What would I have to look out for if doing this? I guess user names and ids would need to match up.

Or is it a silly idea, better idea not to bother?

share|improve this question
    
What you can do is creating a data partition instead of a home partition and linking the actual data directories via symbolic links into the home directories, that's how I do it. –  FSMaxB Oct 14 '13 at 8:42

3 Answers 3

It's risky. While a lot of programs would probably work (especially if they're the same version), some distributions compile their applications to look one place for a configuration file while others put it in a separate folder. In the end you're better off making a partition to share files rather than share users.

share|improve this answer

Not a good idea. The major problem lies with configuration files. Most applications have several places on your pc where they store "local" information necessary to their correct functioning. The info include hardware available, user preferences, version of complementary packages, and so on. Quite often these info are stored in hidden files and/or directories in your home dir, hence the bad idea.

What is going to happen is that these files might refer to a version of a program installed with OS n.1, but still unavailable on the version installed by OS n.2. There is no guarantee that these configuration files are at all compatible; they might be different, and one version might be overwritten, and the package calling on it might malfunction severely.

If you think that the problem of different package versions running on different OSes is a minor one, you should take a look at this table, which shows the percentages of packages for each distro for which there is a more recent version than the one available in the distro's repos. As you can see, these percentages are dis-heartening.

Unfortunately, the same may apply to code. Do you know for sure the two distros are running the same versions of gcc, make, automake, and so on? You know for (nearly) sure that the linux headers are going to be different (Arch Linux runs kernel 3.11, Debian Wheezy 3.2, everybody else in-between). And so on.

While it is fun to have two or more distros installed, it is much less of a pain to install n-1 of them in a VM. You laways have the possibility to share a folder, when necessary, and you can do something which is more complex with a real disk, i.e., resize the disk as per your needs.

share|improve this answer

It's no problem if you do it right. Michael Pobega and MariusMatutiae have both identified possible problems, but these issues apply only if both installations use the same home directory -- for instance, if /home/fred is the home directory for both installations. If instead you use two different home directories, such as /home/mfred for Mint and /home/afred for Arch, you'll be fine. Both of these directories can reside on the same /home partition, and you can set up symbolic links from one to the other for easy access between them.

The tricky part about this is setting it all up. Some distributions, such as Mint, provide very limited account-setup options during the OS installation process. These distributions use the username as the subdirectory name within /home for the account's home directory, so if you use fred as your username, Mint will use /home/fred as the home directory. You can change this after the fact by using the usermod utility, but given Mint's maintenance model, this will require that you either create a second user account with administrative privileges or activate the root account by giving it a password. Given that your second distribution is going to be Arch, it's likely to be simplest to just let Mint create the account in its default way and then use Arch's much more flexible user-management approach, as detailed in the Arch wiki. The wiki doesn't currently mention the -d/--home option to useradd, though; this option enables you to specify the home directory. Thus, supposing you're creating an account for fred, and Mint has already created a /home/fred directory, you might use something like this in Arch:

useradd -m -d /home/afred fred

This will create an account called fred, but make it use /home/afred as its home directory. Thus, you'll use the username fred in both Arch and Mint, but each distribution will have its own home directory on the shared /home partition.

One more point: You should be sure to match the user ID (UID) values used by both distributions. Most distributions, including Mint, default to using UIDs starting at 1000. I'm not sure offhand what Arch uses as its default. If the UID values don't match between distributions, you may run into problems accessing files you create with one distribution in the other one.

share|improve this answer
    
UID values are the same in Debian et al and Arch, but GUIDs are different. The ownerships will require more work... –  MariusMatutiae Oct 12 '13 at 16:26
    
GUID = Globally Unique ID. GUIDs are not used for managing or identifying Linux accounts. They are used in some drivers and in the GUID Partition Table (GPT) to uniquely identify partitions and as partition type codes. Thus, GUIDs are not an issue in terms of account maintenance. Although it's about HFS+, my answer to this question on askubuntu.com covers UID use in accounts an on filesystems. –  Rod Smith Oct 12 '13 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.