Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

sharing /home directory accross installations??

  • 31-10-2004 1:59am
    #1
    Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭


    Hey all,

    I've just installed slackware on my computer yesterday, and I already have mandrake installed, and now what I was thinking of doing is creating a new partition to put the /home directory on and pointing slackware and mandrake to that partition as their /home directory. The thing is I dont really know how to do this (properly).

    I was going to boot into mandrake and create a new partion with diskdrake, but after that I get a bit lost.
    1. How do I transfer my Mandrake /home directory to the new partition (correct me if I'm wrong, but I'm assuming I won't need to do this for slackware because so far I've only logged on as root, and root uses a different directory to store its configuration and settings files [big assumption based on nothing that])
    2. If my assumtion above is wrong, how will I merge the two different home directory's without losing date (I've used mandrake more, so it would have the more important options.)
    3. Will it just work??? From what I've read in magazines, this should just... work... somehow, I would have thought that with slackware storing files in odd places (compared to other distros [again just something I've read in magazines, and probably here too]) that there would be some disparity that would make it not work... somehow. (confused yet? I know I am)
    4. Will I need to ensure that the different os's have the same versions of various window managers installed? (absolute nightmare if so).
    5. How do I then make the two alternate os's point to the same place and call it home?

    I think you will all agree that it makes absolute sense to do it this way (half of you probably do), and it also makes the installation, testing and generally trying out of new distros a hell of a lot easier when you can just point your distros /home directory at the seperate partition and have all your favourite files available to you.

    Anyway, if anyone could shed some guidance on the matter I would be eternally grateful.

    ta
    Baz_


Comments

  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    I prefer to do this kind of stuff from a Live CD - for me, it avoids the confusion that you are currently dealing with. Knoppix will do fine, although I like SystemRescueCD as well.

    Boot from your Live CD, and use the partitioning tools to review tour existing partitions, and create a new one for home. Mount your Mandrake partition, and the new home partition. Find the home directory on the Mandrake partition, and copy everything in it to the new home partition.

    Find /etc/fstab in your Mandrake partition and create a new entry so that the new home partition will be mounted on /home when the system boots. It will look something like this:
    /dev/hda3	/home      ext2   defaults   1   2
    

    Mount your Slackware partition, find /etc/fstab in it, and repeat.

    Reboot into Mandrake, and everything will be there. The same with Slackware.

    If you have the same apps installed in both, then they will use the relevant files from the home directory. If either distro does not have an app that is installed in the other, the relevant files will be ignored.


  • Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭Baz_


    thats great tomk, cheers, one quick question though, what if the accounts dont exist in slackware. If i create them after point /home at the other partition, will it initialise them accounts i.e. delete everything in them??

    ta again
    Baz_


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    I'm not sure about that, Baz, I'm afraid. Probably safest to create the Slack accounts before you do any of this.


  • Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭Baz_


    whooops, a bit late for that advice, I had already gone ahead and pointed slacks /home at the new partition, but thankfully, it all worked out in the end, so its all good.

    So I can now install different distros to my hearts content and not worry about having to mount other partitions to get my stuff from another distros account. luvly jubly.

    thanks again tomk
    Baz_


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    Glad it worked out for you. IMO, that's what Boards is all about.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Baz_ wrote:
    thats great tomk, cheers, one quick question though, what if the accounts dont exist in slackware. If i create them after point /home at the other partition, will it initialise them accounts i.e. delete everything in them??

    ta again
    Baz_

    You probably won't need much of this, but it's worth bearing in mind
    as it might head off some small problems in the future.

    It shouldn't initialise them, though it may overwrite things like your .bash_profile and other basic files which it finds in /etc/skel .

    You might however run into a different problem.
    Unless you create the users in the same order and with the same starting
    UID, the directories won't be owned by the right people.
    e.g. If slackware has george with uid=501 and mildred with uid=502.
    You then add mildred and george to mandrake and look at /home:
    Run 'ls -n' and you get

    drwxr-xr-x 6 501 1000 4096 Oct 21 04:56 george/
    drwxr-xr-x 10 502 1000 4096 Oct 13 00:25 mildred/

    but an ordinary ls gives:

    drwxr-xr-x 6 mildred guest 4096 Oct 21 04:56 george/
    drwxr-xr-x 10 george guest 4096 Oct 13 00:25 mildred/


    This will cause problems.

    Take a look in the original /etc/passwd before adding a user, and make sure you
    give it the same ids.
    No problem editing by hand carefully if you've already been hit by it.

    You might be tempted to just copy the first /etc/passwd and /etc/shadow over to the new distro,
    but you will run into problems as system accounts may be different.
    Think for a moment of a web server that can't read its own files, which seems odd
    because mysql has no problem reading them...
    This problem gets much worse between for example linux and solaris, or linux and some bsd's where the file formats are similar but not equivalent.

    Hope it's going well for you,
    NiallB


  • Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭Baz_


    ta niallb,
    I did actually have that problem tonight, but thanks to your post, I was expecting it to happen and I knew what to do, some positive karma to you my friend.

    as for tomk how about a double helping of the karma magic.

    helping mad skills the pair of yis.


Advertisement