eric@lucii.org on 18 Nov 2004 15:01:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Sharing home directories between two distros


On Thu, Nov 18, 2004 at 08:01:51AM -0500, Art Alexion wrote:
> eric@lucii.org wrote:
> 
> >On Wed, Nov 17, 2004 at 07:13:23PM -0500, Art Alexion wrote:
> > 
> >
> >>Two distros.  Assume compatible data and config formats.  One distro 
> >>sets up the first user as 500:100, the other as 1000:1000.
> >>
> >>How to share things like mozilla directories (mail bookmarks, etc) 
> >>without screwing one up?
> >>
> >>   
> >>
> >
> >I tried this several years ago and had no end of trouble with different
> >versions and settings between distributions.  I've finally solved it on 
> >a workstation by maintaining a separate partition that gets mounted the
> >same way in both distributions.  Then, even though you have separate 
> >home directories, certain directies can be linked (soft link) to this
> >common directory.
> >
> >An example:
> >
> >          distro A                      distro B
> >  --------------------------      ------------------------
> >  /home/eric (/dev/hda5)          /home/eric  (/dev/hda6)  <- diff
> >  /home/common (/dev/hda7)        /home/common (/dev/hda7) <- same
> >
> >To keep Mozilla's files in sync, I move the desired .mozilla directory 
> >from /home/eric/.mozilla to /home/common/.mozilla.  
> >
> >Then:
> >   ln -s /home/common/.mozilla /home/eric/.mozilla 
> >for each distro.  Seems to work so far.
> >The same is true for your mail directories but you MUST be sure that the
> >mail program you use in each distro will not mess up the mail files for 
> >the other.  Since email is so crucial, I'd recommend using the same 
> >program and the same verison on each side.  That's what I do.
> >
> > 
> >
> This is an excellent solution as what I want is primarily to share 
> .mozilla and the Documents tree. (Basically I want to get the bugs out 
> of the new distro before canning the old one.)
> 
> Another fact: /home on old distro is mounted on its own separate 
> partition.  I mount that partition in the new distro. This has caused me 
> some weird problems.  More below.
> 
> Question, do I have to use a common directory or can I just mount old 
> disto's /home to /mnt/rh_home on the new distro and then put symlinks in 
> new distro's /home/user doing things like replacing the .mozilla 
> directory with a .mozilla symlink pointing to /mnt/rh_home/user/.mozilla 
> and another symlink named /home/user/rh_docs pointing to 
> /mnt/rh_home/user/Documents?

This works as well.  I had two _new_ distros so the common partition was the 
answer I came up with at the time.  It actually has a drawback - you have 
to guess in advance the size of the directories you want to share.  
I like your solution better.

> Meanwhile, temporary mounting for copying between distros is not working 
> right.  If I mount Ubuntu's root directory in Red Hat using a simple
> 
>    mount /dev/hdb2 /mnt/ubuntu
> 
> I can read/write as user to my home directory in 
> /mnt/ubuntu/home/arthur.  But a corollary command in Ubuntu
> 
>    mount /dev/hdb1 /mnt/rh_homes
> 
> will not permit a regular user to even view /mnt/rh_homes/arthur.
> 
> Does this have anything to do with the fact that there is no root 
> user/password in Ubuntu -- instead uses sudo with regular user's password?
  
I'm not sure about that because, until last week, I've never even *heard* of
a distro called "ubuntu" :-P

I'd try: sudo mount /dev/hdb1 /mnt/rh_homes

Also you will have to match the user and group IDs.
If you are uid 501 in RedHat then you must be 501 in ubuntu.
  
Eric
-- 
------------------------------------------------------------------------
#   Eric Lucas 
========================================================================
Peace is not the absence of war, but a virtue based on strength of
character. 
  -- Spinoza
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug