delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/17/20:04:46

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_THEBAT,KHOP_THREADED,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Date: Thu, 18 Oct 2012 03:58:36 +0400
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <1524462524.20121018035836@mtu-net.ru>
To: Gary Oberbrunner <garyo AT genarts DOT com>, cygwin AT cygwin DOT com
Subject: Re: Mount Windows C drive as POSIX root?
In-Reply-To: <1446995784.289823.1350498100716.JavaMail.root@genarts.com>
References: <1446995784 DOT 289823 DOT 1350498100716 DOT JavaMail DOT root AT genarts DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Greetings, Gary Oberbrunner!

> 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.

Having single filesystem, and having cygwin mounted on root is not the same.

> I have an environment with lots of non-cygwin tools and translating paths
> between them is not workable. 

Especially not the same, when you start to interoperate with non-cygwin
applications, and when you start to update your Cygwin installation.

Heed my suggestion, don't do it.

> 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?

First, it just wrong. And were causing infinite grief in the past. So, Cygwin
maintainers changed scheme to force some mounts off of cygwin1.dll location.

If this is any help for you, I was intent to use something similar to what you
want, back in the days... well, back into over ten years ago.
I've tried, first on NT4, then on W2k, to setup a *NIX-like single-root
filesystem, where C:\ is the only root, and every other device is a [sub]folder
somewhere out there.
Guess, what? It didn't worked well past the HDD mounts. You can't reliably use
CD/DVD drives, when they are not represented as disk letters, you can't
unconnect removable drives without first breaking the mount point... it's just
too much trouble to maintain.
So far, I've stopped at the following configuration:
1. All partitions of all fixed drives are letter-less, except C:\. Various
disks or selected folders on them are propagated as junctions from folders on
C:\, like C:\Games -> \\?\Volume{4aee6480-972b-11de-b8ca-0015f2ef1bb5}\Games
(root of that volume don't have the mount point at all, by the way)
2. USBDLM handle USB stuff. Linky: http://www.uwe-sieber.de/usbdlm_e.html
3. CD/DVD drives left as is.
4. Cygwin happily living in C:\Programs\Cygwin (really it is in
\\?\Volume{907c2c4e-c109-11dd-a36b-806d6172696f}\Programs\CygWin, but that's a
different topic.)
5. You can make junctions back to C:\ from Cygwin\* folders, if switching root
is working for you. But I long since dropped that practice. (Been using it in
the past, but it pose more issues, than fix.)

[C:\Programs]$ mount
C:/Programs/CygWin/bin on /usr/bin type ntfs (binary,auto)
C:/Programs/CygWin/lib on /usr/lib type ntfs (binary,auto)
C:/Programs/CygWin on / type ntfs (binary,auto)
C:/home on /home type ntfs (binary,noacl,posix=0,user)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
E: on /e type udf (binary,noacl,posix=0,user,noumount,auto)
Y: on /y type nfs (binary,noacl,posix=0,user,noumount,auto)
Z: on /z type nfs (binary,noacl,posix=0,user,noumount,auto)

C:\home -> C:\Documents and Settings -> \\?\Volume{907c2c4e-c109-11dd-a36b-806d6172696f}\Profiles
(Yep, i'm jumping in loops here, but this was much easier, than to alter Windows
installation script to install profiles into a different directory.
I'm using C:\home base for most scripts, only programs native for Windows and
not involved in scripting look into D&S directory.)


--
WBR,
Andrey Repin (anrdaemon AT freemail DOT ru) 18.10.2012, <03:40>

Sorry for my terrible english...


--
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

- Raw text -


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