Filesystem load via nfs problem with i.MX6 build

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Filesystem load via nfs problem with i.MX6 build

1,066 Views
daver21
Contributor I

Solved! - Just a typo in an ip address that somehow I couldn't see. 25.119 became 1.119.

 

 

 

I recently inherited an almost finished project from another developer, so I'm still learning about some of the techniques involved in bootloading.

The bootload process using uboot involves using ftp to transfer the zImage and Flattened Device Tree file, then the root filesystem is mounted via nfs from within kernel boot. 

This process is supposed to have already been made to work by my predecessor.

The host Ubuntu pc uses a tftp server and an nfs server which I have checked is working both by mounting a directory locally using the loopback ip, and using a separate windows machine.

zImage loads successfully, however, the nfs mount fails. The initial error message provided is "VFS: Unable to mount root via NFS, trying floppy."

I traced the error back to the kernel do_mount_root function and added some debug output to determine that the sys_mount function is provided name="192.168.25.119:/home/thisuser/nfs_target", "/root", flags=32768,"fs="nfs", and error returned is -101.

While the kernel makes repeated attempts to mount via nfs, I can successfully ping the board running the kernel. 

I'd appreciate some advice and let me know if you need any other information to figure out the problem. I've tried a few things like changing the nfs version and permissions on the nfs_target directory.

Here is the netargs value in uboot which is called from "run netboot" to setup bootargs:

netargs=setenv bootargs console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.119:/home/thisuser/nfs_target,v3,tcp rw

Here is the section of the kernel boot output showing network setup before the failure:

[ 3.680406] Micrel KSZ8081 or KSZ8091 2188000.ethernet-1:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL)
[ 3.698755] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 6.809125] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 6.820672] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 6.845485] Sending DHCP requests ., OK
[ 6.889880] IP-Config: Got DHCP answer from 192.168.25.119, my address is 192.168.25.121
[ 6.898384] IP-Config: Complete:
[ 6.901805] device=eth0, hwaddr=d6:51:ab:ba:b4:53, ipaddr=192.168.25.121, mask=255.255.255.0, gw=255.255.255.255
[ 6.912774] host=192.168.25.121, domain=example.org, nis-domain=(none)
[ 6.920082] bootserver=192.168.25.119, rootserver=192.168.1.119, rootpath= nameserver0=192.168.25.119
[ 6.934344] VSD_3V3: disabling
[ 6.938084] can-3v3: disabling
[ 6.941219] gpio_dvfs: disabling
[ 6.944510] ALSA device list:
[ 6.947682] No soundcards found.

 

 

0 Kudos
0 Replies