public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Wells, Roger K." <wellsr@leidos.com>
To: <cygwin@cygwin.com>
Subject: Re: Is it OK to mount cygdrive on / ?
Date: Fri, 03 Feb 2017 21:33:00 -0000	[thread overview]
Message-ID: <c4f52c91-7d54-673e-0ab8-85885055ba9c@leidos.com> (raw)
In-Reply-To: <CAPzS6u_N5qnKOYJejdxfBWCzbc3tn=iyqEEyP5E_Vwp7RCC-KA@mail.gmail.com>

On 02/03/2017 04:10 PM, Rustam wrote:
> 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
>
> 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).
>
> Thanks,
> Rustam

The way that I do it (and have for a long time) is a line in my 
.bash_profile file:
mount --change-cygdrive-prefix /

then ls /c does what you want
but ls / may not

HTH
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>


-- 
Roger Wells, P.E.
leidos
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.wells@leidos.com


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

  reply	other threads:[~2017-02-03 21:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 21:09 Rustam
2017-02-03 21:33 ` Wells, Roger K. [this message]
2017-02-04 14:50 ` Andrey Repin
2017-02-04 22:51   ` Is it OK to mount cygdrive on / ? (usually, but may not be as portable) L. A. Walsh
2017-02-05  8:50     ` Andrey Repin
2017-02-05 20:24 ` Is it OK to mount cygdrive on / ? cyg Simple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4f52c91-7d54-673e-0ab8-85885055ba9c@leidos.com \
    --to=wellsr@leidos.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).