1

I tried search for an answer to this question but whether it was bad luck or ineptitude on my part I was unable to do so.

Here's the situation I'd like to get a better understanding of before attempting to undertake it.

I have a 2.0TB (or 1,862 GiB, which will make math easier in a bit) internal HDD upon which I would like to install 2 or 3 separate distributions because there's parts of all of them that I like although they can't all be in one distribution for one reason or another.

I'd like to partition my disk as follows:

|  Partition  |    Format   |     Use     |     Size    |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda1     |     EX2     |  Bios Boot  |     1 GiB*  |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda2     |     EX4     |  Linux-1 /  |    50 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda3     |     EX4     |  Linux-2 /  |    50 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     ....     |     ....    |  .....-# /  |    50 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda4     |     Swap    |     Swap    |    12 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda5     |     EX4     |     /usr    |   100 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
                           TOTAL THUS FAR |   163 GiB   |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
                       REMAINING FOR HOME |  1,699 GiB  |
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
     sda6     |     EX4     |    /home    |  1,699 GiB  |
  • Bios Boot (/boot) will be much lower, but it was easier to calculate everything as GiB. MATH.

So anyway, I have several questions about doing this.

  1. Is it possible for 2 or more distrobutions to share the same /usr and /home partitions? In case you're wondering, I'd like to have access to everything in /home as well as everything in /usr like icons, themes, and so forth.
  2. Would the partition scheme above work?
  3. I know that some of these are going to have to be Logical partitions, however I have no experience using them. How would you go about setting that up if you were me?
  4. Assuming everything above seems legit, I seem to remember reading somewhere that whenever /usr is on a separate partition, you have to go through some extra steps in order for the OSes to boot up properly. If that's the case, what should I do to get this working properly?
  5. Let's also assume that I'm fairly new to linux but am learning so much about it very quickly. What are my chances of getting this right the first time? How about my chances of messing everything up altogether and having to re-install a single distro until I have more experience?

That's all I can think of for now. I'm happy to answer any questions you might have about this idea of mine. I'm very excited to hear what you have to share with me about this little project!

Seth
  • 59,332
Ev-
  • 325

2 Answers2

5

Sharing /usr between distributions is so close to impossible as to make no difference. That's where program files reside, and one of the key differences between distributions is their different program files. Thus, the only way that sharing /usr would make any sense is if the two distributions were just different installations of one distribution, or possibly minor variants (like Ubuntu and Lubuntu). Even then, you'd have problems with conflicts because of different packages being installed, different package versions (even when they differ only during package upgrades), etc. Overall, it might be theoretically possible to share a /usr partition in some limited cases, but actually managing it would be impractical in the extreme; and in most cases (Ubuntu and Fedora, say), sharing /usr just plain won't work.

Sharing /home is more practical, but still presents some challenges. Basically, user configuration files (~/.config-for-some-program) often include distribution-specific references -- for instance, pointers to icons that might differ from one distribution to another. Differences can even exist between different versions of one distribution (Ubuntu 14.04 and 15.10, for instance). Thus, although sharing the /home partition is practical, it's important that you take steps to ensure that users on the different distributions have different home directories. In the case of Ubuntu, and many other distributions, this is most easily done by giving the users different usernames -- for instance, use a username of ubuntu for Ubuntu and fedora for Fedora; or trusty and wily for Ubuntu 14.04 and 15.10, respectively. After installation, you can change the username without altering the home directory location by using a tool like usermod, although this is best done from another account. (Personally, I usually activate direct root logins for things like this, although that's something that's discouraged by Ubuntu's security policy. That issue is a long debate in and of itself.)

One more point: You refer to the "Bios Boot partition," but I think you mean a separate /boot partition. Such a partition should not be shared between distributions. In most cases, a separate /boot partition is not required; but if you do use one, you'll need a separate /boot partition for each distribution. The issue is similar to the one of /usr, but less extreme -- kernels and GRUB configurations reside in /boot, so there's a possibility of file conflict, particularly for closely-related distributions.

OTOH, the name BIOS Boot partition refers to a small (typically ~1 MiB) partition in which GRUB stores part of itself. This partition has no filesystem; GRUB just dumps its code there "raw." It's used only by GRUB, only on GUID Partition Table (GPT) disks, and only when booting in BIOS/CSM/legacy mode (rather than in EFI/UEFI mode). On a new installation on new hardware, I recommend using EFI mode rather than BIOS mode, which obviates the need for a BIOS Boot Partition, but creates a need for an EFI System Partition (ESP), which is a ~100-1,000 MiB (I recommend >= 550 MiB) FAT32 partition that holds the EFI boot loader(s). One ESP can be shared between distributions. I realize I've just tossed out a whole bunch of terminology and concepts with which you may not be familiar. If so, good; you'll be better off learning about these things now rather than later, after you've botched your installation because you've made mistakes because you didn't understand what you were doing. Here are some references to help you avoid making such mistakes:

This is all simpler when single-booting because you don't need to coordinate boot modes between multiple distributions -- you can install one distribution in either BIOS mode or EFI mode and it doesn't really matter which mode you use. If the boot modes differ between two distributions, though, that's where the troubles begin.

Rod Smith
  • 45,120
  • 7
  • 66
  • 108
4

I don't think that /usr would be a good idea because of then things might clash and replace each other with their Distro's files but for /home, even though it would be less damage than /usr on the same 2 distros, I still wouldn't recommend it unless you also want a corrupt system (Especially if you do things such as Hibernate, etc).