Problem: boot rootfs via nfs

Hello,

i’d like to setup a development system for my target which boot from tftp/nfs.
Additional i want to use static ip’s for target/host to avoid the usage of dhcp.
( nfs is working from userspace/ tftp is working from BL & userspace )

The Problem is that the rootfs is not mounting via nfs during booting. I get errors like this:


[ 17.094919] VFS: Cannot open root device “169.254.10.1:rootfs/” or unknown-block(0,0): error -6

[ 17.105857] Please append a correct “root=” boot option; here are the
available partitions:

[ 17.190222] Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
… crash & backtrace


setup

A using the binaries from toradex => Apalis_iMX6_LinuxImageV2.6

→ uImage → uImage–3.14.52-r0-apalis-imx6-20160629134804.bin
→ uImage-imx6q-apalis-ixora.dtb → uImage–3.14.52-r0-imx6q-apalis-ixora-20160629134804.dtb

B tftp/nfs dirs are located @ /srv/tftp resp. /srv/nfs/ and the daemons are started.

C move uImage and dtb (as imx6q-apalis-ixora.dtb) in /srv/tftp

D extract & move rootfs in /srv/nfs/rootfs

E using bootloader from previous installation ( via emmc update scripts ):

=> U-Boot 2015.04+fslc+ge1a48b2 (Mar 31 2016 - 01:27:13)

workflow @ BL:

  1. set serverip/ipaddr/netmask

  2. load kernel&dbt via tftp:
    tftp 0x10800000 uImage; tftp 0x12000000 imx6q-apalis-ixora.dtb

  3. adjust bootargs ( tried some settings) :

Kernel command line:
enable_wait_mode=off vmalloc=400M
ip=169.254.10.2:169.254.10.1:169.254.10.1:255.255.0.0:eth0:static
root=169.254.10.1:rootfs/ rw nfsrootdebug fec_mac=00:14:2d:4a:2b:1d
consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 video=mxcfb0:dev=ldb

  1. booting: bootm ${kernel_addr_r} - ${fdt_addr_r}

Q: what are the right settings for bootargs in my setup?

Q: i can’t find doc’s/ explanation about bootargs params like “netdevwait”.

Some hints will be helpful.

best regards
Lars

Kernel command line has incorrect ip setup it should be:

ip=169.254.10.2:169.254.10.1:169.254.10.1:255.255.0.0::eth0:static

instead of root please use nfsroot and add full host path to the nfs share, in your case

nfsroot=/srv/nfs/rootfs

in case you have problems with NFSv4 you can also try

nfsroot=/srv/nfs/rootfs,vers=3

there is no need to include server’s IP address in nfsroot since you’ve already included it in ip config.

Hello and sorry for the late response,

thanks !!! it now boot via nfs/tftp ( update the ip & nfs-vars )

Q: i can’t find doc’s/ explanation about bootargs params like “netdevwait”.

Anyway it is now working. Do you have any hints for me ( for this U-Boot version ).

Best regards
Lars

Hi Lars

netdevwait is a remnant of our first Colibri T20 kernel.
All current kernels we use no longer evaluate the parameter.

Regards
Max