This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mount Windows C drive as POSIX root?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]