delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/08/14:44:39

X-Spam-Check-By: sourceware.org
Date: Wed, 8 Mar 2006 14:44:24 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: =?ISO-8859-1?Q?Ren=E9_Berber?= <r DOT berber AT computer DOT org>
cc: cygwin AT cygwin DOT com
Subject: Re: Moving Home dir to another partition
In-Reply-To: <dun6hc$ldu$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.63.0603081438410.13150@access1.cims.nyu.edu>
References: <dun1i8$uv3$1 AT sea DOT gmane DOT org> <dun6hc$ldu$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

---559023410-959030623-1141847064=:13150
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT

On Wed, 8 Mar 2006, René Berber wrote:

> Mool wrote:
>
> > 1) Cygwin Installed on C:\Cygwin (C: partition win winXP SP2)
> > 2) First run created /home/$USER in C:\Cygwin
> >
> > how to MOVE my home dir in another partition D:, so I'll use
> > D:\cygwin\home\$USER?
>
> cp -rp /cygdrive/c/Cygwin/home/$USER /cygdrive/d/Cygwin/home

Unless cp has changed in multiple ways, a better idiom would be

tar -C /home -cf - $USER | tar -C /cygdrive/d/Cygwin/home -xf -

which will preserve symbolic links, etc.  In both cases, any extra ACLs on
the files will be lost.  Also, depending on the text vs. binary mode
settings of /cygdrive and /, there might be issues with that as well.

It may be better to *move* (not copy) the directory using Windows,
instead.

> Edit /etc/passwd changing $USER's line with the new home (i.e. from
> /home/$USER to /cygdrive/d/Cygwin/home/$USER)

No reason.  Just "mount -fs D:/cygwin/home/$USER /home/$USER", and you
won't have to change anything.

> _test it_, if it works then you can delete the old home directory.
>
> All this is assuming you haven't changed the cygdrive prefix.  And if
> you do change it in the future the new $HOME will not work, you'll have
> to edit passwd again.

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

---559023410-959030623-1141847064=:13150
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
---559023410-959030623-1141847064=:13150--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019