0

I'm currently trying to boot an Atmel Sama5d2 Xplained evaluation board from NFS server. I'm running a Debian 9 with 4.9.0 kernel version and the nfs server is nfs-kernel-server.

Here is the NFS server configuration

/srv/tftp/xplained/rootfs *(rw,nohide,no_subtree_check,async,no_root_squash)

My NFS server succesfully exports my folders because I'm able to mount them through network on another linux.

I'm also able to retrieve both kernel image and dtb file from my tftp server.

However when the kernel starts, it's unable to boot from the exported rootfs and returns the following error

VFS: Unable to mount root fs via NFS, trying floppy. 
List of all partitions: 
0100            8192 ram0  (driver?) 
0101            8192 ram1  (driver?) 
0102            8192 ram2  (driver?) 
0103            8192 ram3  (driver?) 
b300         3833856 mmcblk0  driver: mmcblk   
  b301          112172 mmcblk0p1 00000000-01   
  b302         3721550 mmcblk0p2 00000000-02 
b318             128 mmcblk0rpmb  (driver?) 
b310 1024 mmcblk0boot1  (driver?) 
b308            1024 mmcblk0boot0  (driver?) 
No filesystem could mount root, tried:  nfs

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

Here are my kernel arguments

ip=dhcp console=ttyS0,115200 earlyprintk root=/dev/nfs rootfstype=nfs rw nfsroot=<server_ip>:/srv/tftp/xplained/rootfs

And dmesg about nfs-moutd service

oct. 09 18:10:13 PC325 rpc.mountd[566]: authenticated mount request from 192.168.128.158:788 for /srv/tftp/xplained/rootfs (/srv/tftp/xplained/rootfs)
oct. 09 18:10:18 PC325 rpc.mountd[566]: authenticated mount request from 192.168.128.158:704 for /srv/tftp/xplained/rootfs (/srv/tftp/xplained/rootfs)
oct. 09 18:10:28 PC325 rpc.mountd[566]: authenticated mount request from 192.168.128.158:796 for /srv/tftp/xplained/rootfs (/srv/tftp/xplained/rootfs)
oct. 09 18:10:48 PC325 rpc.mountd[566]: authenticated mount request from 192.168.128.158:762 for /srv/tftp/xplained/rootfs (/srv/tftp/xplained/rootfs)

I tried many things I found on the internet like checking firewall rules, locked ports etc... and it still don't works. The strangest thing is that I tried from a Ubuntu machine with the same packets and it worked.
I also tried from a fresh Debian install and it also worked.

I would like to understand why it's not working on my development computer. A possibly how to fix it

  • And you have the relevant kernel options enabled? – Tom Rini Oct 9 '17 at 23:45
  • I'm able to boot from another computer with NFS server running on, so yes, the relevant kernel option is enabled. – Arkaik Oct 10 '17 at 7:48
  • If you're able to have this target NFS root from another NFS server, then please post both the full failing kernel log as well as syslog/journal for the same time period on the NFS server, thanks! – Tom Rini Oct 11 '17 at 12:36
1

I experienced the same issue while running Manjaro Linux (arch-based). On ubuntu 14.04 it would work but not on manjaro. After performing a wireshark capture, the problem was revealed. The nfs server responded with "Accept State: remote can't support version # (2)." I enabled version 2 in /etc/nfs.conf on my nfs server as follows:

[nfsd]
# debug=0
# threads=8
# host=
# port=0
# grace-time=90
# lease-time=90
# udp=y
# tcp=y
vers2=y
vers3=y
vers4=y
vers4.0=y
vers4.1=y
vers4.2=y
# rdma=n
#

That worked for me.

  • Doesn't work for me but you gave me a sufficient clue to go further into debugging. Still trying to force version use on server side. – Arkaik Apr 19 '18 at 10:00
0

Thanks to @alanSchmitz and after some investigations, I finaly found where the problem came from.

Apparently I have to force the use of NFS v3 inside uboot by specifying it on kernel boot arguments as follow root=/dev/nfs rootfstype=nfs rw nfsroot=<server_ip>:/srv/tftp/xplained/rootfs,vers=3

I have tried to fix this on server side but I could not find how to force the use of NFS v3.

I'll update my answer if I found how to force the use of NFS v3 on server side for mounting shares.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.