[bb xm rev. C with ubuntu 12.04] - NFS rootfs mount not working

Hi all,

I know this is a common problem but I have not been able to find a solution so far.

I installed ubuntu 12.04 on my sd card, using RobertCNelson scripts. All works fine from SD card.

Now I need to have the rootfs on my host pc and I want BB xm kernel mounting it via nfs at boot time.

The kernel itself is downloaded by u-boot via tftp. Same goes for the initrd.img. This initrd.img is a custom one. I picked the original one found on sd card after running RobertCNelson installation script and I updated it in order to contain the smsc95xx module, needed for usb-ethernet card.

The nfs share is working fine. I can mount it from another ubuntu host with the command: sudo mount -t nfs -o ro 192.168.1.100:/home/daniele/bb/ubuntu-rfs-nfs /home/daniele/nfs-test

By the way, this is the relevant part of my /etc/exports file:

/home/daniele/bb/ubuntu-rfs-nfs 192.168.1.0/24(rw,fsid=0,no_root_squash,no_subtree_check)

This is my uEnv.txt file:

Hi Daniele,

The first thing that comes to mind is whether you have CONFIG_ROOT_NFS
built into your kernel.[1]

This may be of help:
    http://bec-systems.com/site/418/how-to-set-up-a-nfs-rootfs

And also this:
    http://ask.linaro.org/questions/907/ubuntu-1202-nfs-boot-error

Here's what I do to boot my beagle bone over NFS:

dcache off
setenv ipaddr 192.168.1.124
setenv serverip 192.168.1.103
tftpboot 0x80007fc0 192.168.1.103:uImage
setenv bootargs console=ttyO0,115200n8 root=/dev/nfs
nfsroot=192.168.1.103:/home/alan/work/beagle/rootfs/ rw ip=192.168.1.124
bootm 0x80007fc0

Maybe you can find some clues in the above.

Alan.

[1] In menuconfig:
    File systems ->
      Network File Systems ->
        * NFS Client Support
        * (I then have version 3 and 4 turned on)
        * Root File System on NFS

Make the above options built-in, _not_ modules.

Hi Alan,

thanks for the prompt reply.

I managed to fix this problem. I recompiled the kernel enabling as built-in the smsc95xx driver (CONFIG_USB_NET_SMSC95XX=y). Then I removed initrd from boot process editing the uEnv.txt.

By the way it’s true what your link suggests. Ubuntu with rootfs over nfs doesn’t like initrd, even if it contains proper drivers for mounting rootfs.

I leave my uEnv.txt as a reference, maybe it can helps someone else.