You are not logged in.

#1 2014-06-24 09:06:04

msmrsnow
Member
Registered: 2014-06-24
Posts: 1

Boot Linux kernel on BeagleBone Black with NFS root

Greetings all!

I run into trouble trying to boot Linux kernel giving it NFS root shared on host running Arch Linux distribution. I followed guide exposed on Arch Linux wiki of how to setup NFS server. Exported shared directory via /etc/exports giving my catalogue absolute path, desired IP address and giving the next options: rw, no_root_squash,no_subtree_check. Also, I set `Domain' in my /etc/idmapd.conf file to `localdomain'. After that, I run:

        # systemctl start nfs-server.target

Everything went well. Watching status of nfs-server.target showed that no error were occurred.

Ok, then I compiled my kernel. I made sure to have all NFS stuff compiled into my kernel. I checked all options related to Filesystems->Networking file systems. I checked all of them, all possible support. Then successfully compiled my kernel and made an uImage.
I set up tftp server on my host machine and made a few test to watch its working. And it was. When in uBoot command promt, I easily fetched my uImage using tftp command (so, on that stage, packet exchanging between host and client was working). Along with uImage I fetch device tree binary at different address and, finally, tried to boot my kernel. Kernel parameters that was given to my kernel was:

        root=/dev/nfs rw ip=<my-client-ip> console=ttyO0 nfsroot=<my-host-ip>:<my-root-fs-path-exposed-on-host>

uImage was created properly, so, uBoot successfully recognized kernel inside it and passed execution to it. So, after uBoot output there came kernel output, and after it found network device, and assigned that ip address I gave to it and other parameters by default it hung for a while. After absence of output for roughly 15 seconds it responded it wasn't able to boot from nfs.

After numerous attempts I gave up and tried to boot another stock kernel image one can download from "Texas Instruments" ftp. It has its kernel parameters compiled into it's image and doesn't boot from nfs. It gets root from the second partition of my flash memory card that I preliminary flashed onto. The point was to try to simply mount filesystem over nfs but on already working system. I booted my kernel and tried to mount, but I got "Connection rejected". I tried to mount from non-existent host and, of cousre, I got "host doesn't exist'".

While trying to mount filesystem over nfs on my embedded system I ran tcpdump on my host machine to watch actual connections and I saw they were presented there so I can presume that no hidden rules or firewall exist on my host machine. I've never enabled iptables or other similar systems on my host machine.

So, after a bit of struggle, I tried to run nfs server but on different distribution. Particularly, on Ubuntu 14.04. I reproduced all I've done on my Arch Linux and tried to boot my kernel. And it succeeded!

I understand, a lot of TL;DR, but has anyone got any suggestion?

Offline

Board footer

Powered by FluxBB