Results 1 to 10 of 10

Thread: Two OSes, one /home?

  1. #1
    Join Date
    Sep 2009
    Location
    Columbus, Ohio, USA
    Posts
    178

    Thumbs up Two OSes, one /home?

    I have 11.4 KDE installed with / on sda and /home on sdb. 11.4 has so many problems that it's pretty useless to me at this point. But I don't want to get rid of it either. I want to tough it out and learn how to fix whatever's wrong with it.

    On the other hand, though, I also want 1. an openSUSE os on this computer, 2., since Ubuntu is Gnome, I'd like for openSUSE to be KDE., and 3., I want one that works.

    I just happened to stumble upon a 11.3 KDE live cd that I'd forgotten that I had. So I thought I'd try to install the root partition on some spare space on sda, but not having anymore "spare" space, I'd like to use 11.4's /home partition as 11.3's /home partition as well. But the installer wouldn't do that and I don't know what to do to get around that.

    It seems to me that if different Linux systems can use the same swap partition, they can use the same /home partition as long as they are fairly similar. The 11.3 installer did want to assign sdb1 (where I have Ubuntu all on one partition) to 11.3 for /home, though, even though it had already detected a "native linux" on there.

    Any thoughts on this? Any help is always appreciated and will continue to be so if and when it's forthcoming.
    Thank you.
    AMD Athlon II X2 220, 2.8 GHz, 6 GB, PNY GeForce 210; 1 TB: Windows 7HP, Ubuntu 13.10, DBLab/Linux Mint 16 Remix, Suse 12.1 KDE.

  2. #2

    Default Re: Two OSes, one /home?

    The issue you will face is if you have two different versions of the
    OS/DE running (11.3 vs 11.4, KDE 4.4 vs KDE 4.6) the settings that they
    store in your home directory might conflict.

    You can share your files across OS's easily but sharing settings is much
    more error-prone.

  3. #3

    Default Re: Two OSes, one /home?

    Randymanme wrote:
    > I have 11.4 KDE installed with / on sda and /home on sdb. 11.4 has so
    > many problems that it's pretty useless to me at this point. But I don't
    > want to get rid of it either. I want to tough it out and learn how to
    > fix whatever's wrong with it.
    >
    > On the other hand, though, I also want 1. an openSUSE os on this
    > computer, 2., since Ubuntu is Gnome, I'd like for openSUSE to be KDE.,
    > and 3., I want one that works.
    >
    > I just happened to stumble upon a 11.3 KDE live cd that I'd forgotten
    > that I had. So I thought I'd try to install the root partition on some
    > spare space on sda, but not having anymore "spare" space, I'd like to
    > use 11.4's /home partition as 11.3's /home partition as well. But the
    > installer wouldn't do that and I don't know what to do to get around
    > that.
    >
    > It seems to me that if different Linux systems can use the same swap
    > partition, they can use the same /home partition as long as they are
    > fairly similar. The 11.3 installer did want to assign sdb1 (where I
    > have Ubuntu all on one partition) to 11.3 for /home, though, even though
    > it had already detected a "native linux" on there.
    >
    > Any thoughts on this? Any help is always appreciated and will continue
    > to be so if and when it's forthcoming.
    > Thank you.


    You can do it, and the installer will let you do it if you use the
    expert/manual partitioning.

    BUT ... IMHO it's a bad idea.

    Your home directory contains lots of 'hidden' 'dot' directories where
    various applications keep data. These can vary between versions, so you
    can easily experience problems.

    What I find works reasonably well is to have a separate home directory
    for each system ( /home/me can just be in the root filesystem ) and then
    use symlinks to link to the subdirectories that contain my actual data
    (such as Pictures, Documents etc). Those directories are in a separate
    partition, which can be mounted anywhere convenient ( /home/data ?)

    So for example /home/me/Pictures -> /home/data/me/Pictures

    HTH, Dave

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Two OSes, one /home?

    On 2011-04-19 12:36, Randymanme wrote:
    > It seems to me that if different Linux systems can use the same swap
    > partition, they can use the same /home partition as long as they are
    > fairly similar.


    You can share files and data, but better do not share configs.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,664
    Blog Entries
    3

    Default Re: Two OSes, one /home?

    I tried that once - two different linux distros using the same "/home" partition.

    It causes problems, due to incompatible configurations.

    Here's what I would do:

    I would mount my home partition as "/xhome". I would leave "/home" as part of the root partition for each distro.

    I would make sure that I have the same uid (numeric value) for both versions.

    In my home directory, I would make symlinks to the corresponding files in "/xhome", with the exception of where files are related to the particular version of linux. For example, $HOME/bin was a link to the appropiate directory in "/xhome", so I could share personal scripts etc between the distros. But "$HOME"/.kde4 (or whatever) would be distinct in each version.

    That's not too hard to setup, and it avoids having conflicts between user settings in the two versions.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  6. #6

    Default Re: Two OSes, one /home?

    Hi,
    I use the same /home partition for *many* Linux distros on the systems I set up for many years and never reformat it. Sharing the /home partition is not a problem. What you should not do is sharing the home base directory. The trick is to change the home base directory for each distro or version of the OS, so you would have /home/Ubuntu, /home/openSUSE, etc or /home/11.4, /home/11.3 or whatever, and user Paul's home directory under the different OS would be /home/Ubuntu/Paul, /home/openSUSE/Paul. Further you can also have a /home/Paul directory and use symlinks between that one and /home/openSUSE/Paul, etc, for things that could be shared between OS, such addresbooks, bookmarks, etc.

    During the setup, I create a 'dummy' user with a different login name for each distro and either remove it or keep it, but rarely use it. Then, before adding the real users, I change the home base directory (You have to create the directory first). openSUSE uses the command:

    Code:
    useradd --save-defaults -d /home/openSUSE ... other options
    while most other Linux distros (here Ubuntu) use:

    Code:
    useradd -D -b /home/Ubuntu ... other options
    Look at the useradd manpage. Under openSUSE you can see the defaults with the command:

    Code:
    useradd --show-defaults
    If it's sound too complicated, just forget about it. When you understand the concept, it's rather simple and certainly less confusing than having 5 or 6 /home partitions if you install many distros. Every time you install Linux, you'll never reformat this partition. Every distro's setup gives the possibility to mount but not format a partition.

    * Of course, you should also give your users the same UID under the different versions. See man useradd.

  7. #7
    Join Date
    Jun 2008
    Location
    Yorkshire
    Posts
    391

    Default Re: Two OSes, one /home?

    You can easily use the same /home partition but create a different user (myname and myname1) for each system. You can then set up links to common files eg firefox profiles and that sort of thing. You can also set up 1 main folder for your files and create links from each user folder (eg Documents, Pictures, Music etc) to the central folder.
    I've been doing it for a couple of years without a hitch. It even works with 2 different linux operatiing systems.
    Pete

  8. #8

    Default Re: Two OSes, one /home?

    Quote Originally Posted by peteh100 View Post
    You can easily use the same /home partition but create a different user (myname and myname1) for each system.
    A simple and in some way "less elegant" solution but it always works for sure. You could also give these different users the same UID, so from the different OS point of view, they will be the same user (have the same access rights to files in their home directory).

  9. #9
    Join Date
    Sep 2009
    Location
    Columbus, Ohio, USA
    Posts
    178

    Default Re: Two OSes, one /home?

    Thank you all very much. At this point, the directions on how to do it are rather beyond my expertise; but nonetheless, as I continue reading and dealing with other apps and so forth, when I come across something that compliments directions given in this thread or remind me of it, I'll get to where I can implement this didactic objective.

    I just did some searching and googling to find out what UID and man useradd mean. I ended up (on this last foray at: forums.opensuse.org/english/get-technical-help-here/install-boot-login/454820-creating-multiple-user-logins-assigned-multiple-groups-one-time-4.html. That way out of my league (for now) but I'm sure I'll get to it (Gw).

    One question. In the third post, djh-novell said, “You can do it, and the installer will let you do it if you use the expert/manual partitioning.” I did try the custom partitioning I don't think I recall “expert/manual partitioning (sic).” But even so, if I go back and look, I take it that I need to first create system-specific/username-specific /home folders within the big /home directory (I'm hazy on the proper use of words: file, folder, directory, archive) for each distro/release version that I want to have using that same /home directory? And that each user should have the same UID?

    How about I install 11.3 KDE (username: randall) with both / and /home on a seven GiB partition. Then, let's say I go the the current 11.4 /home directory and create a /home/11.3/randall folder inside of there. Then (new question), may I cut and paste /home from 11.3 to /home/11.3/randall (using Ubuntu's Gparted to do it) and it will still work as 11.3's functioning /home? I need to make sure that 11.3 and 11.4 have different usernames but the same UID? But not the same as Ubuntu's UID since it has it's own /home directory?

    You, know, I just love it how threading on openSUSE's Forums is sort of like building a Linux system. The opening question is like the kernel and various replies are like modules which when put together, become a functioning machine. Sometimes. Depends on the kernel, I suppose.

    Thank you very much.

    Randall
    AMD Athlon II X2 220, 2.8 GHz, 6 GB, PNY GeForce 210; 1 TB: Windows 7HP, Ubuntu 13.10, DBLab/Linux Mint 16 Remix, Suse 12.1 KDE.

  10. #10

    Default Re: Two OSes, one /home?

    Quote Originally Posted by Randymanme View Post
    One question. In the third post, djh-novell said, “You can do it, and the installer will let you do it if you use the expert/manual partitioning.” I did try the custom partitioning I don't think I recall “expert/manual partitioning (sic).”
    That's what he meant.
    http://unixversal.com/linux/opensuse..._install12.jpg
    http://unixversal.com/linux/opensuse..._install13.jpg

    Quote Originally Posted by Randymanme View Post
    I take it that I need to first create system-specific/username-specific /home folders within the big /home directory (I'm hazy on the proper use of words: file, folder, directory, archive) for each distro/release version that I want to have using that same /home directory?
    Let's call /home the /home partition and everything else directories. If you choose to change the default location of the home base directory (which is /home by default on all distros) into for example /home/Ubuntu , that /home/Ubuntu will become the home base directory for this distro. But you can NOT do that first (before or during setup). You have to do it after. If it sounds too complicated, just use different login names ( = different user names) under each distro and you'll be fine.

    Quote Originally Posted by Randymanme View Post
    And that each user should have the same UID?
    It is more convenient but not necessary. Linux identifies users by their UID, not by their login names*. So if two different user (names) have the same UID under two different Linux (or Unix btw), they will be considered as the same user.

    Quote Originally Posted by Randymanme View Post
    How about I install 11.3 KDE (username: randall) with both / and /home on a seven GiB partition. Then, let's say I go the the current 11.4 /home directory and create a /home/11.3/randall folder inside of there. Then (new question), may I cut and paste /home from 11.3 to /home/11.3/randall (using Ubuntu's Gparted to do it) and it will still work as 11.3's functioning /home?
    I dont' quite understand the question. But I'm sure gparted is not part of the answer. You're using gparted to create (or delete) partitions. A partition is a division of the hard disk. Under Linux it gets 'mounted' in a mountpoint which is indeed a directory on the root filesystem (/). Under normal circumstances, you won't use gparted except during (or before) installing Linux.
    To create (sub)directories (anywhere assuming you have write access to the parent directory), you'll use the command mkdir . For each command, there is one (or more) manual pages. So whenever you're wondering what a command does and how to use it, type man followed by the name of the command. Example:
    Code:
    man mkdir
    Quote Originally Posted by Randymanme View Post
    I need to make sure that 11.3 and 11.4 have different usernames but the same UID? But not the same as Ubuntu's UID since it has it's own /home directory?
    It has nothing to do with that. These are 3 independent OS with their own users. Again, using the same UID is just more convenient but not necessary, in particular if you are the only user on these systems.

    To put it in a simple words: If you want to share one single /home partition between 2 or 20 Linux distros/versions:

    • either change the default location of the home base directory, as root, on an installed system (not during setup) and create your users afterwards.
    • or give your user under each distro a different login name (during setup).
    • Give your user (as far as it is you) the same UID if you wish (better but never required). This can be done either during installation if the setup offers this possibility (openSUSE does) or afterwards by changing the user UID (not so easy because you have to change the ownership of this user's files too).


    * although this is not true for the login process.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •