#59 FIND does not work with USB key?

1.0
closed
nobody
None
2017-02-05
2014-07-25
No

When I use an USB key that Windows identifies as driver E:, the command FIND does not seem to work. For example:

$ find /e/ -name "*pdf"
find: failed to read file names from file system at or below ‘/e/’: No such file or directory

Instead with drive C:,

$ find /c/ -name "*pdf"
/c/cygwin64/bin/dvipdf
/c/cygwin64/bin/ps2pdf
/c/cygwin64/bin/texi2pdf
...

Under Cygwin it works as expected:

$ find /cygdrive/e/ -name "*pdf"
/cygdrive/e/dati/251496_07_11.pdf
/cygdrive/e/dati/251496_10_11.pdf
...

Ciao,
Angelo.

Discussion

  • Alexx83

    Alexx83 - 2014-07-25

    Can you try add to cygwin /etc/fstab line
    none / cygdrive binary,posix=0,noacl,user 0 0

    then restart Cygwin and try as on MSYS2:
    find /e/ -name "*pdf"

     
    • Angelo Graziosi

      Angelo Graziosi - 2014-07-25

      I am afraid.. at moment I don't have the USB key with which I saw this issue (my brother asked me to print a PDF on his USB key.. and perhaps only in the next days I can retry with that USB...). I tried with other USB keys but I wasn't able to reproduce the issue. FIND works in this case.

      Anyway I don't understand why changing Cygwin configuration can change the behaviour of MSYS2. It sounds as changing Office-Word configuration influences Libreoffice... anf if one does not have Cygwin installed?

      Do your statements mean one cannot execute Cygwin and MSYS2 in parallel?

      Ciao,
      Angelo.

       
  • Ray Donnelly

    Ray Donnelly - 2014-07-25

    Hmm. At the very top of this sourceforge webpage in which I am typing it says:

    "MSYS2 is a Cygwin-derived Posix-like environment for Windows"

    On the frontpage of this SF project: https://sourceforge.net/projects/msys2/ it says

    "MSYS2 is an updated, modern version of MSYS, both of which are Cygwin (POSIX compatibility layer) forks with the aim of better interoperability with native Windows software"

    The mind boggles.

     
    • Angelo Graziosi

      Angelo Graziosi - 2014-07-25

      I know what is Cygwin and what is MSYS2. I have used intensively Cygwin and build on it many software (Cernlib, ROOT, GCC, Emacs, TeXLive...) for more than 10 years, and before I used Msys/MinGW [*]. I don't need to read what is written on the web page..

      You should explain why changing Cygwin configuration influences MSYS2 and if to run MSYS2 one have to install Cygwin.

      Being a fork, MSYS2 should not need Cygwin, so an user which hasn't installed Cygwin, how could follow what Alexey suggests? What am I missing?

      In my replay I asked to explain these things...


      [*] I use also GNU/Linux and OSX.

       
  • Matthieu Vachon

    Matthieu Vachon - 2014-07-25

    Hi Angelo,

    I think that Alexx only wanted to know if putting this change in Cygwin /etc/fstab would produce the same error. I don't think he implies that it would fix the issue. He only can confirm so let's wait for his answer.

    I think that he was trying to understand the error and that it could be a difference between MSYS2 /etc/fstab and Cygwin /etc/fstab.

    Regards,
    Matt

     
  • Ray Donnelly

    Ray Donnelly - 2014-07-25

    Sure MSYS2 doesn't need Cygwin installed at all, Alexey was asking you to perform a test on Cygwin to identify if the issue is to do with the Cygwin core of MSYS2. If the issue is not also present on Cygwin then it is because of our modifications that adapt Cygwin to turn it into MSYS2.

    I missed and you misunderstood that part I think. :-)

     
  • Alexx83

    Alexx83 - 2014-07-25

    Yeah, I'm only want to know if Cygwin is affected to this issue too or this is only MSYS2 problem

     
    • Angelo Graziosi

      Angelo Graziosi - 2014-07-25

      Bingo! I got that USB key and also Cygwin is affected by this issue:

      $ cp /etc/fstab /etc/fstab.orig
      $ echo "none / cygdrive binary,posix=0,noacl,user 0 0" >> /etc/fstab
      

      and after restarting Cygwin,

      $ find /cygdrive/e/ -name "*pdf"
      find: ‘/cygdrive/e/’: No such file or directory
      

      it seems that I can reproduce the issue only with the USB key of my brother..

      Ciao,
      Angelo.

       
      • Angelo Graziosi

        Angelo Graziosi - 2014-07-25

        But.. just a moment... on Cygwin the things are different.

        Adding "none / cygdrive binary,posix=0,noacl,user 0 0" to fstab, /cygdrive/ is empty so taht even drive C cannot be read, i.e. "ls -lrt /cygdrive/c", "ls -lrt /cygdrive/e" do not work.

        On MSYS2 FIND works on /c/ but not on /e and LS work on both /c/ and /e/..

         
        • Alexx83

          Alexx83 - 2014-07-25

          Adding
          "none / cygdrive binary,posix=0,noacl,user 0 0"
          remove cygdrive prefix. We do it on MSYS2 (if you read /etc/fstab). This is standard action in Cygwin.
          Try on Cygwin run find command as on MSYS2

           
          • Angelo Graziosi

            Angelo Graziosi - 2014-07-25

            OK! On Cygwin it works:

            $ find /e/ -name "*pdf"
            /e/dati/251496_07_11.pdf
            /e/dati/251496_10_11.pdf
            ...
            

            So it seems MSYS2 related...

             
  • Alexx83

    Alexx83 - 2014-07-25

    You need try under Cygwin without /cygdrive prefix

     
  • David Macek

    David Macek - 2015-04-19

    Does this still give an error in MSYS2?

     
  • PietroDi

    PietroDi - 2015-05-01

    Hi,

    Unfortunately this behaviour still exists, when eg. mounting a TrueCrypt volume as FAT32 partition.

    $ find . -name a -ls
    find: failed to read file names from file system at or below ‘.’: No such file or directory
    
    $ find --version
    find (GNU findutils) 4.5.14
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Written by Eric B. Decker, James Youngman, and Kevin Dalley.
    Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
    
    $ cat /etc/fstab
    # For a description of the file format, see the Users Guide
    # http://cygwin.com/cygwin-ug-net/using.html#mount-table
    
    # DO NOT REMOVE NEXT LINE. It remove cygdrive prefix from path
    none / cygdrive binary,posix=0,noacl,user 0 0
    

    Please let me know if I can help troubleshoot this issue.

    Cheers,

    PietroDi

     
    Last edit: David Macek 2015-05-01
    • David Macek

      David Macek - 2015-05-01

      Unfortunately, I can't reproduce the issue with a FAT-formatted USB drive, nor with a FAT-formatted TrueCrypt volume. This is on Windows 8.1. What Windows version are you using? Are you able to reproduce the issue on a different computer?

       
      • PietroDi

        PietroDi - 2015-05-02

        Hi David, thanks for your fast reply. If I plug in a FAT(32) formatted USB disk as X: drive it shows up in the filesystem table, and find works:

        $ df -hT
        Filesystem Type Size Used Avail Use% Mounted on
        X: ntfs 59G 58G 824M 99% /x

        $ find x:/ -iname a -ls

        This command works.
        When I mount a FAT32 TrueCrypt partition (either as removable disk or as fixed disk) as T: drive it doesn't show up in the filesystem table as driveletter. You can reach it without any problems.

        $ pushd t:/
        /t

        ls etcetera, everything works.

        However, when trying a find it also shows the error.

        $ find t:/ -iname a -ls
        find: failed to read file names from file system at or below ‘t:/’: No such file or directory

        The plot thickens however: find without any extra arguments shows all files on that drive (and shows the error at the end):

        $ find t:/ -ls
        [a list of all files]
        find: failed to read file names from file system at or below ‘t:/’: No such file or directory

        I'm using 64-bit Windows 8.1.

        Hope this helps,

        PietroDi

         
        Last edit: PietroDi 2015-05-02
        • vincent quiniou

          vincent quiniou - 2016-02-04

          Hi Pietro,

          Did you solve your problem ?

          I am currently setting-up a USB key with all my favorite apps and get the same error message. I am using the tools provided with PortableGit.

          I have observed the following behavior (usb pen drive letter is F:)

          [0:/f> find . 2>&1 | tail -4
          ./PortableApps/PortableApps.com/App/Locale/Turkish.locale
          ./PortableApps/PortableApps.com/App/Locale/Ukrainian.locale
          ./PortableApps/PortableApps.com/App/Locale/Vietnamese.locale
          find: failed to read file names from file system at or below '.': No such file or directory
          [0:/f> cd /usr/bin
          [0:/usr/bin> find . 2>&1 | tail -4
          ./zless
          ./zmore
          ./znew
          ./[.exe
          [0:/usr/bin> cd /f
          [0:/f> /usr/bin/find . 2>&1 | tail -4
          ./PortableApps/PortableApps.com/App/Locale/Turkish.locale
          ./PortableApps/PortableApps.com/App/Locale/Ukrainian.locale
          ./PortableApps/PortableApps.com/App/Locale/Vietnamese.locale
          /usr/bin/find: failed to read file names from file system at or below '.': No such file or directory

          [0:/f> echo $PATH
          /mingw32/bin:/usr/bin:/f/bin:/f/PortableApps/ConEmu/App/ConEmu:/f/PortableApps/ConEmu/App/ConEmu/Con
          Emu:/c/Program Files (x86)/Java/jdk1.6.0_41/bin:/d/oracle/product/11.2.0/dbhome_1/bin:/d/oracle/prod
          uct/11.2.0/client_1:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/Wind
          owsPowerShell/v1.0:/c/Program Files/TortoiseSVN/bin:/c/Program Files/nodejs
          [0:/f>

          Hope that helps

          Vincent

           
  • PietroDi

    PietroDi - 2016-02-09

    Hi Vincent,

    My solution was to use a NTFS-formatted TrueCrypt/VeraCrypt partition, instead of FAT32. That works like a charm.

    Cheers,

    PietroDi

     
  • David Macek

    David Macek - 2017-02-05
    • status: open --> closed
     
  • David Macek

    David Macek - 2017-02-05

    Since I couldn't reproduce this error (nor the other find error mentioned on this tracker), I assume it's fixed. If not, file a new issue.