X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Mool Subject: Re: Moving Home dir to another partition Date: Thu, 09 Mar 2006 01:03:28 +0100 Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Thunderbird 1.5 (Windows/20051201) In-Reply-To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Igor Peshansky wrote: > 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. > Tried 'mount', worked fine. - I haven't needed -f (force) option. - The copy was done via Win for easiness, just 2 clicks (cut & paste) >> _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 > Simple and effective. Thank you all! -- 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/