sharing a /home dir with dsl & other linuxes


Forum: Other Help Topics
Topic: sharing a /home dir with dsl & other linuxes
started by: aveline

Posted by aveline on July 19 2005,01:06
topic says it all.  I'm running ubuntu and was curious about loading dsl too but someone *forget who* on dsl's irc chan said thats not a good thing to do w/dsl.  Is this even possible or recommended?  it'd be nice to do so i could save my wallpapers & stuff on both distros in one place... a persistent /home that is.

thx
aveline

Posted by mikshaw on July 19 2005,02:42
You could try something like this in /opt/bootlocal.sh
(assumes ubuntu is on hda1):

#mount Ubuntu partition
mount /dev/hda1
#remove the '/home' symlink, replacing it with a home directory
rm -f /home && mkdir -p /home/dsl
#mount ubuntu home into /home/dsl
mount --bind /mnt/hda1/home/username /home/dsl

I'm not specifically recommending this, but i have been using something similar for months without trouble.

Posted by aveline on July 19 2005,06:58
well wish I could say I understood what you're doing but I don't really in some respects.  However if that idea would work what would the end result be exactly???

ty much milk

aveline

Posted by mikshaw on July 19 2005,14:55
The comments (lines starting with #) were in hopes of making it understandable-ish.
It does the following just before dsl logs in, as long as the customized /opt/bootlocal.sh is properly inserted into the system via restore or myDSL:
Mount the partition on which Ubuntu is installed, so now you'll have a /mnt/hda1 which contains all of your Ubuntu files. Remove the current /home, which is a symlink to /KNOPPIX/home. Create a /home/dsl directory so you'll have a mountpoint for Ubuntu home.  Mount the Ubuntu user's home directory to /home/dsl. "mount --bind" is used because the partition is already mounted, and using a symlink instead of mounting would make things ugly and incovenient. The result is that your system will look the same, except your home will be the same directory as the one in Ubuntu.  It will be mounted as /home/dsl, so only the contents of that directory will be different than the default DSL system.  Keep in mind that a few things may need to be copied over from DSL, such as .filetool.lst, .xserverrc, etc.  This is the main reason i do not specifically recommend sharing homes...there may be issues with same config files needing to be different in each system.

One important thing i forgot to mention is that you will need to have either the same user ID or group ID (or preferably both) in DSL and Ubuntu.  The usermod command will accomplish this task.
If not, you will have problems with file permissions.
< http://www.die.net/doc/linux/man/man8/usermod.8.html >
To make things easier, I've changed my main user in both Slackware and Suse to UID 1001 and GID 50 (the default uid and gid of user dsl), so i can read and write all i want between the 3 systems, and all three see me as the same user. The difference with what i'm doing is that I am not sharing homes...sharing only a user.  The bootlocal.sh script I use only to make a persistent home from a subdirectory (is that even necessary anyore?), but I posted it because it *can* be used to share a home.

Posted by aveline on July 20 2005,02:12
oy ok I think I hurt My head!!!   :p


heh ty for the full explanation and it sounds like this might be more trouble than its worth.  too bad really but oh well... I still learned something. :)  

aveline

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.