This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

bash: /usr/sbin/exportfs: cannot execute binary

Hi, am reposting this blog bcoz I had no response the first time around, and unfortunately I'm still on this problem.

 

I just bought a DVEVM DM365.   I step through the details of  GSG: DM365 DVEVM Software Setup for MontaVista Kernel (http://processors.wiki.ti.com/index.php/GSG:_DM365_DVEVM_Software_Setup) on a pentium desktop using Fedora-14-i686 operating system.

 

These first two (2) stages were straightforward and without a problem encountered:

         Stage 1:    Installing the Target Linux Software

         Stage 2:    Installing the DVSDK Software

 

Problem was in the third stage (Creating a Shared File System Between Host and Target).

Here are the details ($ is account user,   # is root user):

 

Exporting a Shared File System for Target Access (first part of Stage 3)

 

The following shell commands were still alright:

 

         [royc @ home]$      cd /home/roy

         [royc @ roy]$          mkdir  -p  DVworkdir/filesys

         [royc @ roy]$          cd  DVworkdir/filesys

         [royc @ filesys]$     su  root

         [root @ filesys]#     cp  –a  /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/target/* .

         [root @ filesys]#     chown  –R  roy  opt

         [root @ filesys]#     gedit  /etc/exports

 

Then I copy/paste to  /etc/exports  (which was an empty file) the following line:

         /home/roy/DVworkdir/filesys *(rw,no_root_squash,no_all_squash,sync)

 

And the problem started with the next shell command:

 

         [root @ filesys]#   /usr/sbin/exportfs –av

         bash:  /usr/sbin/exportfs:  No such file or directory

 

I also tried:

 

         [root @ filesys]#   usr/sbin/exportfs –av

         bash:  /usr/sbin/exportfs:  cannot execute binary file

 

         [root @ filesys]#   ls  -lsa  usr/sbin/exportfs

         40  –rwxr-xr-x.   1 root  root  39272  Aug 30 2008  usr/sbin/exportfs

 

I tried doing a  man for  exportfs  and other binaries in  filesys,  but the textual

display were all encumbered with shaded characters like ^?, ^B^D, ^L, ^E^D^C, ^G

...  these looked like formatting symbols to me.

 

Even as a root, why can’t I execute a binary?  And why can’t I read (‘man’) any binary in sysfile ??

Am really cluless on what to do with this problem!

  • I believe the problem lies in the commands you are issuing:

    [root @ filesys]#  usr/sbin/exportfs –av

    From the log above, you are issuing the command in "filesys" directory. When you issue the command - as here - you are trying to run the command "exportfs" from the cross-compiled filesystem. Whereas, you should be running the exportfs from Fedora host.
    [root @ filesys]#   /usr/sbin/exportfs –av
    bash:  /usr/sbin/exportfs:  No such file or directory

    This seems to confirm my belief. Notice the "/" highlighted here. You are missing the command in your host machine.

    You seem to be missing this package on your Fedora host - nfs-utils. Install it via yum and run the command again as:

    $ /usr/sbin/exportfs -av

  • Thanks Sanieev!
     
    Following your lead, I downloaded and successfully installed NFS:

     
           [roy @ filesys]#   su -c 'yum install -y nfs-utils system-config-nfs'
           [roy @ filesys]#   password:
           [roy @ filesys]#   rpm -q nfs-utils    
           [roy @ filesys]#   nfs-utils-1.2.3-5.fc14.i686

    Testing the Shared File System
     
    Now that I could continue with
    GSG: DM365 DVEVM Software Setup for MontaVista Kernel,  I  turned OFF the firewall, i.e.,  /etc/init.d/iptables stop,  and then downloaded and set-up 'minicom'.   Then the subsequent trial commands that followed could be simplified in gist with the following,

     

           DM365 EVM # setenv nfshost 192.168.0.3 
           DM365 EVM # setenv rootpath /home/roy_london/DVworkdir/filesys

           DM365 EVM # setenv bootargs 'console=ttyS0,115200n8 noinitrd rw ip=192.168.0.4:192.168.0.3:192.168.0.1:255.255.255.0:::off root=/dev/nfs nfsroot=192.168.0.3:/home/roy_london/DVworkdir/filesys,nolock mem=76M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_imp.oper_mode=0 davinci_capture.device_type=4' 

    Note the last command is just one LOOONG command line with the variables $(rootpath) and $(nfsroot) replaced

    by actual values, and also, I used static IP addressing since dhcp is not working.  Unaccountably, the first boot was successful(?)

    as shown by the file Success_DM365_boot.log.  However, after shutting down Fedora and afterwards rebooting it again, the

    next Uboot was enigmatically not successful with an output display as follows

     

     

            DM365 EVM :>boot

     

           ..... intermediate messages here were CUT for brevity ......

     

           Looking up port of RPC 100003/2 on 192.168.0.3
           portmap: server 192.168.0.3 not responding, timed out
           Root-NFS: Unable to get nfsd port number from server, using default
           Looking up port of RPC 100005/1 on 192.168.0.3
           portmap: server 192.168.0.3 not responding, timed out
           Root-NFS: Unable to get mountd port number from server, using default
           mount: server 192.168.0.3 not responding, timed out
           Root-NFS: Server returned error -5 while mounting /home/roy_london/DVworkdir/filesys
           VFS: Unable to mount root fs via NFS, trying floppy.
           VFS: Cannot open root device "nfs" or unknown-block(2,0)
           Please append a correct "root=" boot option
           Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

     

    What could possibly be wrong?  Why could not I Uboot again?

    Then I noticed I always get Errno 256 whenever I download or request updates thru either yum or at the system's Add/Remove Software, as follows: 

    At the  System->Administration->ADD/REMOVE SOFTWARE:

     

    Errors were encountered while downloading packages.

    libgssglue-devel-0.1-8.fc12.i686: failure: Packages/libgssglue-devel-0.1-8.fc12.i686.rpm from fedora: [Errno 256] No more mirrors to try.

    nfs-utils-lib-devel-1.1.5-3.fc14.i686: failure: nfs-utils-lib-devel-1.1.5-3.fc14.i686.rpm from updates: [Errno 256] No more mirrors to try.

    nfs4-acl-tools-0.3.3-6.fc13.i686: failure: Packages/nfs4-acl-tools-0.3.3-6.fc13.i686.rpm from fedora: [Errno 256] No more mirrors to try.

     

    I've tried breezing the mail threads on other Linux foras but could not find a replica of my problem.  There are some common follow-up feedback and is posting them here for completeness:

     

    At the  SYSTEM --> ADMINISTRATION --> SOFTWARE SOURCES

    Enabled the following:  Fedora 14-i386  and  Fedora 14-i386-Updates

     

    And at the Bash terminal: 

    [root @ selco]# vi -r /etc/yum.repos.d/fedora-updates.repo

    E305: No swap file found for /etc/yum.repos.d/fedora-updates.repo

     

    [root @ selco]# vi -r /etc/yum.repos.d/fedora.repo

    E305: No swap file found for /etc/yum.repos.d/fedora.repo

     

    [root @ selco]# yum update

    Loaded plugins: langpacks, presto, refresh-packagekit

    Adding en_US to language list

    Setting up Update Process

    No Packages marked for Update

     

    #vi /etc/yum.conf

     

    [main]

    cachedir=/var/cache/yum/$basearch/$releasever

    keepcache=0

    debuglevel=2

    logfile=/var/log/yum.log

    exactarch=1

    obsoletes=1

    gpgcheck=1

    plugins=1

    installonly_limit=3

    color=never

     

    # PUT YOUR REPOS HERE OR IN separate files named file.repo

    "/etc/yum.conf" 24L, 825C

     

    Is this related to Uboot problem?? (I remember during downloading NFS, at one point there was

    either a warning or error display which I ignored then)

    Thanks again!

     

    Roy


     
    Respectfully yours
     

     

  • Roy Closa said:

    by actual values, and also, I used static IP addressing since dhcp is not working.  Unaccountably, the first boot was successful(?)
    as shown by the file Success_DM365_boot.log.  However, after shutting down Fedora and afterwards rebooting it again, the next Uboot was enigmatically not successful with an output display as follows:


    - Do you have selinux installed on your system?
    - Did you make the firewall changes permanent?
    - Did you ensure that NFS server start automatically at boot time?

    I will share some basic steps below, and hopefully thing should work well. Else, you should respond with answers to these queries.

    Roy Closa said:

           Looking up port of RPC 100003/2 on 192.168.0.3
           portmap: server 192.168.0.3 not responding, timed out
           Root-NFS: Unable to get nfsd port number from server, using default
           Looking up port of RPC 100005/1 on 192.168.0.3
           portmap: server 192.168.0.3 not responding, timed out
           Root-NFS: Unable to get mountd port number from server, using default
           mount: server 192.168.0.3 not responding, timed out
           Root-NFS: Server returned error -5 while mounting /home/roy_london/DVworkdir/filesys

    These errors indicate that services nfsd, mountd and probably portd are not running on your system.
    Since you are on Fedora machine, you can try running these commands:
    $ service rpcbind status
    $ service nfslock status (Only if you are explicity running NFSv2 or NFSv3. Else ignore it.)
    $ service nfs status

    I am guessing that one or both are not runnning. Depending upon which one isn't running, you can start them as
    $ service rpcbind start
    $ service nfslock start

    nfs can be started only if both are running.

    $ service nfs start  (OR restart if t was already running... but not working)

    To ensure that these services start automatically at next reboot, you can run these commands:
    $ chkconfig rpcbind on
    $ chkconfig nfs on

    NOTE: Almost all commands need root privileges.

    Alternatively, you can check and set the status graphically. On KDE, that would be:
    (f) -> Applications -> Administration -> Service Management

    Roy Closa said:

    Then I noticed I always get Errno 256 whenever I download or request updates thru either yum or at the system's Add/Remove Software, as follows:
    At the  System->Administration->ADD/REMOVE SOFTWARE:
    Errors were encountered while downloading packages.
    libgssglue-devel-0.1-8.fc12.i686: failure: Packages/libgssglue-devel-0.1-8.fc12.i686.rpm from fedora: [Errno 256] No more mirrors to try.
    nfs-utils-lib-devel-1.1.5-3.fc14.i686: failure: nfs-utils-lib-devel-1.1.5-3.fc14.i686.rpm from updates: [Errno 256] No more mirrors to try.
    nfs4-acl-tools-0.3.3-6.fc13.i686: failure: Packages/nfs4-acl-tools-0.3.3-6.fc13.i686.rpm from fedora: [Errno 256] No more mirrors to try.

    Are you sure your machine is still connected to the network? It appears that your host machine has lost network connectivity altogether.
    - Run the command /sbin/ifconfig
    - Try ping to your router's IP address. Does it succeed?
    - Can you paste exactly the commands from your history. Esp the ones related to iptables and networking that you executed in last session.
    Roy Closa said:

    [root @ selco]# vi -r /etc/yum.repos.d/fedora-updates.repo
    E305: No swap file found for /etc/yum.repos.d/fedora-updates.repo

    The option -r is used to indicate recovery. But you may not have had any errors when editing this file. The message is indicating that.
    Just running the command "vi /etc/yum.repos.d/fedora-updates.repo" should be fine.

    Roy Closa said:

    next Uboot was enigmatically not successful with an output display as follows:

    'boot' is overall process of bringing up the board... and U-Boot is one of the components that helps in the process - of course, there are alternative for this. I noticed both 'boot' and 'Uboot' being used interchangeably in your response. so, thought to clarify....