X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_YG X-Spam-Check-By: sourceware.org X-IronPortListener: Outbound_SMTP X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAFAJ0uf1CcKEcX/2dsb2JhbABFhhK5LHeBCIInEhEEDUUSAQgNDQIYDgIEHRMVAgEOAQQODRqHYp8jiX2TEYEhijeFMDJgA40kjkuKMIML From: "Buchbinder, Barry (NIH/NIAID) [E]" To: "cygwin AT cygwin DOT com" CC: Gary Oberbrunner Date: Wed, 17 Oct 2012 18:24:50 -0400 Subject: RE: Mount Windows C drive as POSIX root? Message-ID: <0105D5C1E0353146B1B222348B0411A20ACC615655@NIHMLBX02.nih.gov> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id q9HMP22v002302 Gary Oberbrunner sent the following at Wednesday, October 17, 2012 2:22 PM >I understand about not installing cygwin in c:\. But I really want a >single filesystem, so cygwin's / is Windows c:/, and cygwin /Program\ >Files is Windows /Program Files and so on. I have an environment with >lots of non-cygwin tools and translating paths between them is not >workable. > >I'm not really doing cygwin-based software development (not using gcc >etc.); I just want cygwin for its utilities, so "ls /Windows" works the >same as "dir \Windows". > >For years I've done this by installing cygwin into c:\cygwin, and >adjusting the /etc/fstab mount points so everything works. My fstab >looks like this: > >c:/ / ntfs binary,override >c:/cygwin/etc /etc ntfs binary,override >c:/cygwin/usr /usr ntfs binary,override >c:/cygwin/bin /usr/bin ntfs binary,override >c:/cygwin/lib /usr/lib ntfs binary,override >c:/cygwin/var /var ntfs binary,override >c:/cygwin/dev /dev ntfs binary,override >c:/cygwin/lib /lib ntfs binary,override >c:/cygwin/proc /proc ntfs binary,override >c:/cygwin/srv /srv ntfs binary,override > >But as I'm installing a new machine with a fresh cygwin, this no longer >works. The mounts in fstab don't take effect (though interestingly c:/ >-> / does work), and it then can't find /etc and many things then don't >work. > >I can manually mount it from a bash shell, but putting it in fstab >doesn't work as it used to. > >Is this still a plausible setup for 1.7? Is there a better way? Yes. Sort of. Not ~exactly~ the same thing. The cygdrive prefix gives you a "single filesystem". To save typing, you could change the cygdrive prefix to /. In /etc/fstab: none / cygdrive binary 0 0 (and get rid of all the other C:/cygwin/ lines in fstab.) Then C:\Windows becomes /c/Windows and "C:\Program Files" becomes /c/Program\ Files. I, too, have a lot of non-cygwin tools/files; I find that prefixing paths with "/c" is not inconvenient. Another thing that you could do is to set up bash functions with cygstart if it is a GUI, posix paths to your windows apps, and cygpath to convert any posix paths given as arguments to Windows paths. Something like this (untested): function name ( ) { cygstart /path/program args "$(cygpath -w "$1")" } Good luck, - Barry Disclaimer: Statements made herein are not made on behalf of NIAID.