[clue-tech] Sharing Home directory with different distributions

T. Joseph Carter tjcarter at bluecherry.net
Mon Aug 7 01:30:11 MDT 2006


On Sun, Aug 06, 2006 at 01:30:06PM -0600, Jed S. Baer wrote:
> > I am thinking of installing (at least) a couple of distributions on my
> > laptop and sharing my home directory (on its own partition) between
> > them. Is there anything that I should be aware of or watch out for when
> > I do this?
> 
> RC files. Other "preferences" files, particularly Gnome and KDE. Version
> incompatibility could very well cause trouble.

I have a partial solution to that, but its ugly.  What if you mount /home
instead as /store and split your home directory into /store/<dist>/<user>
and /store/personal/<user>, with symlinks from the former into the latter?

If you follow the NeXTish layout Apple uses as I do, you might wind up
with something like this:

tjcarter at miya:~$ ls -F
Desktop/    Library/  Movies/  Pictures/  Sites/
Documents/  Mail/     Music/   Public/    Source/

Library is a Mac/NeXT thing, you wouldn't put that in /store/personal at
all, and you'd want the link to Sites to be named public_html on a typical
UNIX system.  Everything not a dotfile or other system-specific config
thing in eg, /store/ubuntu/tjcarter would be a symlink to a directory in
/store/personal/tjcarter.

Of course I have a simpler solution.  Those things I couldn't deal with
being "wrong" for the host system are basically my shell setup and my vim
config.  The latter is version-protected.  The former is very cleverly
written to figure out if I'm on a BSD, SysV, GNU, or Apple system and set
itself up accordingly.  What isn't automatic (basically my prompt colors)
can be set trivially:

export PS1="${c_usr}\u${c_sep}@${c_hst}\h${c_sep}:${c_dir}\w${c_nor}\$ "

Those are set for the specific host and then unset after they are used so
they don't needlessly clutter my environment.  On miya, they are:

	c_nor="\[\e[0m\]"
	c_sep="\[\e[0m\]"
	c_usr="\[\e[0;36m\]"
	c_hst="\[\e[0;35;1m\]"
	if [ "$EUID" = "0" ]; then
	    c_dir="\[\e[0;31;1m\]"
	else
	    c_dir="\[\e[0;36;1m\]"
	fi

Of course I'm unlikely to share the actual directory between my Mac and a
Linux box for a few reasons.  First, any method of doing this requires
that /home (or /Users on the Mac) be a separate partition.  Apple doesn't
make this impossible or even terribly difficult if you know what you're
doing, but some third-party apps are too stupid to properly handle /Users
being a separate partition *cough*MicrosoftOffice*cough*.

There's also the fact that most Linux distributions begin numbering users
at 1000 whereas the Mac starts at 500.  Fixable, but an annoying extra
step.

Once you'd corrected one system or the other, you still have the fact that
the only real reliable common ground between OSes is FAT32 and I'll be
damned if I'm going to put ~ on that craptacular filesystem.  I guess
Linux can write HFS+ nowadays without borking it, but I wouldn't know if
I'd trust it for ~ yet.  There's also the slight annoyance that HFS+ is
case-insensitive.  Rarely is that ever an actual problem anymore, but it
would feel strange to anyone who didn't use a Mac regularly.  You can
format HFS+ as case-sensitive, and I believe the Linux HFS+ support will
cope, but none of the third-party filesystem repair tools currently
support case-sensitive HFS+, despite the fact that servers often use it
and that you'd probably be more concerned about DiskWarrior or TechTool
Pro working on your server than your workstation.

(Not that I would ever actually run MacOS X on any server that didn't
involve massively parallel setups, mostly because of XNU's crappy I/O
throughput...)




More information about the clue-tech mailing list