delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/24/09:03:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 24 Dec 2007 04:01:28 -0800
From: Jeff <for DOT listmail AT verizon DOT net>
Subject: Re: ls: reading directory /: No such file or directory
To: cygwin AT cygwin DOT com
Message-id: <Y+5bHx3lQn4L092yn@verizon.net>
MIME-version: 1.0
Newsgroups: lists.cygwin
Lines: 179
References: <476E5113 DOT 20902 AT bigfoot DOT com> <476E5430 DOT 3D01052D AT dessent DOT net> <5JvbHx3lQrwa092yn AT verizon DOT net> <fkn1gp$99n$1 AT ger DOT gmane DOT org> <kHxbHx3lQ7YO092yn AT verizon DOT net> <fknuka$vio$1 AT ger DOT gmane DOT org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

On Mon, 24 Dec 2007 04:37:11 -0500,
Robert Pendell <shinji+gmane[at]elite-systems[dot]org> wrote:

>Now looking at your mount points I would say that there are 7 potential
>problem points.  The 3 mounts pointing to smb shares and the 4 mounts
>for your drives.  If the drive doesn't exist then it can cause this.  If
>the smb share cannot be reached it may be causing this and the 2 second
>delay.

That's "bingo!" :)

  Now creating a folder in the root to match the mount point will
>resolve this issue without having to change your mount table however.  I
>just checked and that cleared it right back up.

It did for me, too-- I now get error messages that actually make some
sense, and fit the circumstances. Previously, my mount table was...

>>>> \\Winxp-inspiron\c on /inspiron type system (binmode)
>>>> C:\WINDOWS\TEMP on /tmp type system (binmode)
>>>> \\Winxp-desk\c on /desk-c type system (binmode)
>>>> \\Winxp-desk\d on /desk-d type system (binmode)
>>>> C:\Cygwin\bin on /usr/bin type system (binmode)
>>>> C:\Cygwin\lib on /usr/lib type system (binmode)
>>>> C:\Cygwin on / type system (binmode)
>>>> A: on /a type system (textmode)
>>>> C: on /c type system (textmode)
>>>> D: on /d type system (textmode)
>>>> E: on /e type system (textmode)

First, I removed the bogus drive 'E: on /e', which I think was for
mapping network drives (before I knew that Cygwin could handle the
'\\host\drive\' smb share syntax directly). For the rest, I created the
empty directories to match the mount points. Being that Cygwin has its
own way of mapping POSIX file permissions onto Windows ones, I
'umount'ed each entry, created the directory with 'mkdir' (instead of
cmd.exe or Explorer), then remounted, which I was then able to do
without resorting to 'mount -f'.

When I went to mount my network shares, things got more interesting.
When I mounted one machine that is currently powered down, 'mount'
accepted it without comment after a slight delay. When I mounted the
other, which is currently accessible...

Administrator AT winxp-notebook ~
$ mount '\\Winxp-desk\c' /desk-c
mount: defaulting to '--no-executable' flag for speed since native path
       references a remote share.  Use '-f' option to override.

So I went back and mounted the powered down machine with the same flag.
My mount table now looks like this:

Administrator AT winxp-notebook ~
$ mount
\\Winxp-inspiron\c on /inspiron type system (binmode,noexec)
C:\WINDOWS\TEMP on /tmp type system (binmode)
\\Winxp-desk\c on /desk-c type system (binmode,noexec)
\\Winxp-desk\d on /desk-d type system (binmode,noexec)
C:\Cygwin\bin on /usr/bin type system (binmode)
C:\Cygwin\lib on /usr/lib type system (binmode)
C:\Cygwin on / type system (binmode)
A: on /a type system (textmode)
C: on /c type system (textmode)
D: on /d type system (textmode)

'ls -la /' now produces this:

Administrator AT winxp-notebook ~
$ ls -la /
ls: cannot access /a: No such file or directory
ls: cannot access /d: No medium found
ls: cannot access /inspiron: No such file or directory
total 425
drwx------+ 20 Administrator  None        0 Dec 24 03:55 .
drwx------+ 20 Administrator  None        0 Dec 24 03:55 ..
???????????  ? ?              ?           ?            ? a
drwx------+  2 Administrator  None        0 Dec 19 12:23 bin
drwxrwxrwt+ 13 Administrators SYSTEM      0 Dec 23 17:52 c
dr-xr-xr-x   1              0 root        0 Dec 31  1969 cygdrive
-rwx------   1 Administrator  None      766 Jan  8  1997 cygnus.ico
-rwx------   1 Administrator  None       55 Jun  1  2002 cygwin.bat
-rwx------   1 Administrator  None     7022 Dec 19 11:08 cygwin.ico
drwx------+  6 Administrator  None        0 Dec 19 10:39 cygwindl
???????????  ? ?              ?           ?            ? d
drwx------   1 Administrator  None        0 Dec 24 01:27 desk-c
drwx------   1 Administrator  None        0 Dec 23 15:25 desk-d
drwx------+  2 Administrator  None        0 Dec 19 02:25 dev
drwx------+ 11 Administrator  None        0 Dec 19 12:55 etc
drwx------+  6 Administrator  None        0 Dec 24 03:22 home
???????????  ? ?              ?           ?            ? inspiron
drwx------+ 22 Administrator  None        0 Dec 19 02:24 lib
dr-xr-xr-x   1 Administrator  None        0 Nov 30  2006 proc
drwx------+  2 Administrator  None        0 May  9  2006 sbin
-rwx------   1 Administrator  None   415232 Dec 13 06:11 setup.exe
-rwx------   1 Administrator  None    29636 Oct  1  2005 setup.log
-rwx------   1 Administrator  None     1381 Oct  1  2005 setup.log.full
drwx------+  2 Administrator  None        0 Dec 24 03:22 tmp
drwx------+ 19 Administrator  None        0 Dec 19 02:22 usr
drwx------+  8 Administrator  None        0 Dec 19 02:22 var

This now makes total sense: This Cygwin is on a notebook with a
hot-swappable drive bay. A: or /a is a floppy drive that currently is
not on the system. D: or /d is an optical drive that /is/ on the
system, but has no media in it. \\Winxp-inspiron or /inspiron is
currently powered down. \\Winxp-desk\ or /desk-[cd] is up and
accessible. What's more, the /proc virtual file system, which has not
shown itself on my system in the last couple of cygwin1.dll revisions,
is once again visible, sparing me the embarrassment of posting a "Where
did /proc go?" message to the list.

Not wanting a bunch of empty directories on my system, I created my
mount table with 'mount -f'. This created no problems with earlier
versions of the dll and utilities:

Administrator AT winxp-desk ~
$ uname -a
CYGWIN_NT-5.1 winxp-desk 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin

Administrator AT winxp-desk ~
$ ls --version
ls (GNU coreutils) 5.94
[...]

As opposed to:

Administrator AT winxp-notebook ~
$ ls --version
ls (GNU coreutils) 6.9
[...]

Administrator AT winxp-desk ~
$ mount
\\Winxp-notebook\c on /notebook-c type system (binmode)
C:\Cygwin\bin on /usr/bin type system (binmode)
C:\Cygwin\lib on /usr/lib type system (binmode)
C:\Cygwin on / type system (binmode)
D:\TEMP on /tmp type system (binmode)
A: on /a type system (textmode)
C: on /c type system (textmode)
D: on /d type system (textmode)
E: on /e type system (textmode)

Administrator AT winxp-desk ~
$ ls -la /
total 602
drwx------+ 11 Administrator None       0 Oct 31 09:41 .
drwx------+ 11 Administrator None       0 Oct 31 09:41 ..
drwx------+  2 Administrator None       0 May 20  2006 bin
dr-xr-xr-x   7             0 root       0 Dec 31  1969 cygdrive
-rwx------+  1 Administrator None     766 Jan  8  1997 cygnus.ico
-rwx------+  1 Administrator None      55 Jun  1  2002 cygwin.bat
-rwx------+  1 Administrator None    7022 May 20  2006 cygwin.ico
drwx------+  3 Administrator None       0 May 20  2006 cygwindl
drwx------+  2 Administrator None       0 Dec 19  2004 dev
drwx------+ 10 Administrator None       0 May 20  2006 etc
drwx------+  5 Administrator None       0 Dec  6 03:10 home
drwx------+ 22 Administrator None       0 May 20  2006 lib
dr-xr-xr-x  11 Administrator None       0 Dec 24  2007 proc
drwxrwx---+  2 Administrator Users      0 May 20  2006 sbin
-rwx------+  1 Administrator None  305664 Jan 10  2006 setup.exe
-rwx------+  1 Administrator None   29636 Oct  1  2005 setup.log
-rwx------+  1 Administrator None    1381 Oct  1  2005 setup.log.full
drwx------+ 18 Administrator None       0 May 20  2006 usr
drwx------+  8 Administrator None       0 May 17  2005 var

Notice that this 'ls -la /' (ver. 5.94) doesn't try to list out
everything mounted under '/'. This is significantly different
behaviour from that in ver. 6.9. "Let the user beware," as they say--
this time, of using 'mount -f'.

This has been most instructive, and I thank you for your help. Please
forgive me for writing at such length, but I wanted to document this
for the list archives, for the next person who stumbles across this
problem.

Jeff
-- 
"Sorry, my life is still in beta, and nowhere near stable enough for a
release."

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

- Raw text -


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