TI E2E Community
Digital Signal Processors (DSP)
OMAP35x Processors Forum
problems with NFS mounting at runtime
I'm trying to mount a directory on my linux host machine from the OMAP35x EVM using NFS and having issues. I can successfully mount a root filesystem on my host via NFS by setting bootargs_nfs in uboot, so this tells me I must have the /etc/exports correct on host/nfs server. However, when I try to just do a "mount 192.168.1.123:/home/dir /mnt" I get the following errors...
rpcbind: server localhost not responding, timeout
RPC: failed to contact local rpcbind server (errno 5).
lockd_up: makesock failed, error=-5
mount: mounting 192.168.1.123:/home/dir on /mnt failed: Input/output error
Any ideas? It seems like something simple, but I figured if I could NFS mount my root at boottime, then I should be able to manually NFS mount some other dir as well.
Based on the logs, it appears there are RPC server issues; have you started your ipcbind or portmap services?
Also, if you search for 'rpcbind errno 5', you are likely to find other related Linux forum posts that may offer solutions to this issue.
The problem, apparently, is that when mounting from the client you must either have /sbin/portmap running (which isn't in the stock SDK filesystem) or you must specify the "-o nolock" option on the mount command line. I used the "-o nolock" and all appears to mount OK. One other alternative is to put "nolock" in the options portion of an /etc/fstab entry for the nfs mount.
Thank you for sharing this with the community; I am glad to see you have overcomed this issue.
Great. I was having eactly the same problem and "mount -o nolock host:/path /mnt" solved it. Thanks for sharing your solution!
Judging from the error message "rpcbind: server localhost not responding, timed out", rpcbind apparantly was checking localhost as the server. I wonder if adding the Linux host in EVM's /etc/hosts might also solve the problem. This brings up another (probably a very simple) question: how to update the file /etc/hosts on the EVM?
RobbySunhow to update the file /etc/hosts on the EVM?
You should be able to edit the hosts file directly on the EVM using a terminal based text editor like vi, or if you are using a NFS mount you could edit the file on your host (i.e. \home\user\workdir\filesys\etc\ or wherever you are NFS mounting).
I am facing the similar issue. I am unable to write anything into NFS directory from my board?How to change the /etc/hosts file which contains the following configuration
# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost
I am not sure that adding to the hosts file would help, if there was a hosts problem I would expect either intermittent or complete failure of NFS with error messages, since this means you would be disconnected from it, as opposed to just write failures.
Try changing your host /etc/exports file as suggested in the following post and see if the permission problems (unable to write) you are experiencing go away
is it not "mount -o lock" the same as passing to the kernel thru u-boot "root=/dev/nfs nfsroot=$(nfshost):$(rootpath), nolock, ..."?
In my case, I get nfs running without problems for the first boot. If I then run "init 0" I get the following messages,
#init 0INIT: Switching to runlevel: 0INIT: Sending processes the TERM signalINIT: SStopping telnet daemon.Stopping syslogd/klogd: stopped syslogd (pid 1279)stopped klogd (pid 1281)doneNOT deconfiguring network interfaces: / is an NFS mountSending all processes the TERM signal...Sending all processes the KILL signal...Unmounting remote filesystems...Deactivating swap...Unmounting local filesystems...mount: can't find /mnt/ram in /proc/mountsumount: none busy - remounted read-onlymount: cannot read /proc/mounts: No such file or directorynfs: server 10.0.0.114 not responding, still trying
and it does go down properly. So I reset my EVM and now nfs does not work, in fact, the kernel panics!
Sending DHCP requests .PHY: 1:00 - Link is Up - 100/Full., OKIP-Config: Got DHCP answer from 0.0.0.0, my address is 10.0.0.111IP-Config: Complete: device=eth0, addr=10.0.0.111, mask=255.255.255.0, gw=255.255.255.255, host=10.0.0.111, domain=, nis-domain=(none), bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=Looking up port of RPC 100003/2 on 0.0.0.0rpcbind: server 0.0.0.0 not responding, timed outRoot-NFS: Unable to get nfsd port number from server, using defaultLooking up port of RPC 100005/1 on 0.0.0.0rpcbind: server 0.0.0.0 not responding, timed outRoot-NFS: Unable to get mountd port number from server, using defaultRoot-NFS: Server returned error -5 while mounting /tftpboot/$(nfshost):$(rootpath)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; here are the available partitions:1f00 512 mtdblock0 (driver?)1f01 1792 mtdblock1 (driver?)1f02 256 mtdblock2 (driver?)1f03 5120 mtdblock3 (driver?)1f04 516608 mtdblock4 (driver?)b300 498176 mmcblk0 driver: mmcblk b301 497983 mmcblk0p1Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
I would appreciate any help.
My /etc/exports is
JoséRoot-NFS: Server returned error -5 while mounting /tftpboot/$(nfshost):$(rootpath)
I don't think it should be outputting $(nfshost):$(rootpath) here, it should have resolved to whatever you set nfshost and rootpath to in your U-Boot environment variables at this point. Try replacing the nfsroot=$(nfshost):$(rootpath) in your bootargs with nfsroot=10.0.0.114:/home/jrodrigu/workdir/filesys to see if that makes any difference (assuming that your NFS server is at 10.0.0.114).
Replacing nfsroot=$(nfshost):$(rootpath) by nfsroot=10.0.0.114:/home/jrodrigu/workdir/filesys makes a difference indeed,
(at least in u-boot 2009.03-dirty (Oct 15 2009 - 11:03:05))
Sending DHCP requests .PHY: 1:00 - Link is Up - 100/Full....., OKIP-Config: Got DHCP answer from 0.0.0.0, my address is 10.0.0.110IP-Config: Complete: device=eth0, addr=10.0.0.110, mask=255.255.255.0, gw=255.255.255.255, host=10.0.0.110, domain=, nis-domain=(none), bootserver=0.0.0.0, rootserver=10.0.0.114, rootpath=Looking up port of RPC 100003/2 on 10.0.0.114rpcbind: server 10.0.0.114 not responding, timed outRoot-NFS: Unable to get nfsd port number from server, using defaultLooking up port of RPC 100005/1 on 10.0.0.114rpcbind: server 10.0.0.114 not responding, timed outRoot-NFS: Unable to get mountd port number from server, using defaultRoot-NFS: Server returned error -5 while mounting /home/jrodrigu/workdir/filesysVFS: 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; here are the available partitions:1f00 512 mtdblock0 (driver?)1f01 1792 mtdblock1 (driver?)1f02 256 mtdblock2 (driver?)1f03 5120 mtdblock3 (driver?)1f04 516608 mtdblock4 (driver?)b300 498176 mmcblk0 driver: mmcblk b301 497983 mmcblk0p1Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Nonetheless the kernel keeps panicing. NFS is up & running and I am able to ping the nfshost from other computers.
Trying ping from u-boot does not work. Why? What could it be wrong?
Interestingly enough I change my host /etc/network/interfaces to
auto eth0iface eth0 inet dhcp
allow-hotplug eth0iface eth0 inet static address 10.0.0.114 netmask 255.255.255.0 gateway 10.0.0.138 network 10.0.0.0 broadcast 10.0.0.0 up route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.138and now it is possible to ping nfshost from u-boot. What's wrong with configuration 2)? A Cat-5 cable connects direct the EVM with my Debian Linux Laptop.
Joséand now it is possible to ping nfshost from u-boot. What's wrong with configuration 2)? A Cat-5 cable connects direct the EVM with my Debian Linux Laptop.
I am not that familiar with setting up custom configurations to /etc/network/interfaces, so I am not sure what is wrong with configuration 2 (though I am sure some Google research would provide some ideas), in general I have used the default DHCP configuration in most Linux PCs I have used with success, the majority of which are Ubuntu.
Since you mention you have just a cable between the EVM and your Linux host PC directly it is a bit unusual that ping would work with the first configuration, since a direct connection like that implies there is no DHCP server to auto configure the network (unless you have one running on the PC or the EVM). I suppose the DHCP settings for your particular distribution must default to some functional IP address and settings that work if no DHCP server is located.
Going back a bit, since you get the 'server returned -5' error it sounds like the network layer is ok at the moment, so whatever IP configuration you are using seems at least minimally functional. There are a couple of possibilities as to why this may happen, I am guessing either your NFS server was not restarted with the new /etc/exports file that exports that particular folder, or that your host is running some firewall that is preventing the NFS connection from succeeding. If it is the firewall try a command like /etc/init.d/iptables stop or perhaps for Debian sudo iptables -F may be more appropriate (that works on Ubuntu).
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.