This is the mail archive of the
mailing list for the Cygwin project.
Re: Is it OK to mount cygdrive on / ?
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Rustam <rustamabd at gmail dot com>, cygwin at cygwin dot com
- Date: Sat, 4 Feb 2017 17:39:39 +0300
- Subject: Re: Is it OK to mount cygdrive on / ?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp3m.mail.yandex.net; dkim=pass firstname.lastname@example.org
- References: <CAPzS6u_N5qnKOYJejdxfBWCzbc3tn=iyqEEyP5E_Vwp7RCC-KA@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
> I've added an extra / mountpoint in /etc/fstab in order to be able to
> access C: without /cygdrive like this:
> none /cygdrive cygdrive binary,posix=0,user 0 0
> none / cygdrive binary,posix=0,user 0 0
Only one cygdrive mount is effective.
> It seems to work, I can access the C: drive with just /c.
> But normally an "ls /cygdrive" should list the drives, whereas "ls /"
> lists the contents of the Cygwin root. So it seems there are now two
> root mountpoints overlaying each other.
> So I was wondering if my approach is if this is technically undefined
> behavior and might conceivably break something or is it OK (less the
> drive listing limitation mentioned above).
Undefined behavior, but only because you're using two mount entries at once.
Accessing drive letters directly from inside Cygwin is often considered a grey area.
Too much may happen on this border. You have to clearly understand, how Cygwin
interact with other system, to avoid issues.
If you want to access Windows path, recommended route lies through the use of
cygpath utility to convert native paths to the Cygwin scheme. Et vice versa.
With best regards,
Saturday, February 4, 2017 17:17:15
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple