Running NFS server on BeagleBoard

Hi,

I know there are instructions for mounting a NFS volume (NFS server is
on a host) on the BeagleBoard but does anyone know the other way
around. I want to run a NFS server on the BeagleBoard and try to
mount to it from the host. Are directions just similar to how you
would set up a NFS server do on a host? Do I need to download the NFS
server source and cross-compile it for the BeagleBoard or does the
Angstrom filesystem already have the necessary files/binaries? TIA.

Regards,
Andy

There is an angstrom package for nfs server.
Never really got to writing the instructions on how to install it,
after installing the package
opkg install ....
you should be able to configure it the same way as on a regular linux
system.
there is plenty info on that on the web.

Frans

sshfs I think is more tested

if you have ubuntu pc
sudo apt-get install sshfs

and from pc:
sudo sshfs root@192.168.1.219: /media/beagleboard

you we'll see in /media/beagleboard the disk of beagleboard

Nice. Didn't know about sshfs
Guess nfs is more configurable wrt security. In sshfs I expect that
you can access everything for which you have rights.
With nfs you can set up which part of the disk you want to expose
(also interesting if you allow anonymous access).
But of course with a dedicated user and proper rights you can make it
work with sshfs too.

FM

There is an angstrom package for nfs server.
Never really got to writing the instructions on how to install it,
after installing the package
opkg install ....
you should be able to configure it the same way as on a regular linux
system.
there is plenty info on that on the web.

Hi Frans,

I tried installing the nfs-server package but I get the following
error:

root@beagleboard:~# opkg install nfs-server
An error ocurred, return value: 1074020864.

Where is it trying to grab the package, from the web?

Same problem when I tried opkg install samba (this is my alternative
option).

Regards,
Andy

Hi Frans,

Do you happen to know the package name for the nfs server? I looked
at my OpenEmbedded packages directory and didn't see any reference to
a nfs server. All I saw was nfs-utils, which I believe only contains
the client tools. I did a "opkg list" on the BeagleBoard and did see
any "nfs server" package available. If you don't mind, can I have
your directions on installing the nfs server? Thanks.

Regards,
Andy

I just checked the feed located at
http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/machine/beagleboard
and didn't see any ipk for the nfs server. Does anyone know where I
can find it so I can install it on my BeagleBoard? TIA.

Regards,
Andy

Well, I got the samba server to work; I had to use bitbake to build
the samba-3.2.7-r4.1 package; the default feed or the console-image I
built didn't come with the samba server. The problem with samba is
that package is HUGH! It's over 30MB. Also, I rather use an nfs
server because it's more standard with Linux than samba. Does anyone
know how to build the nfs server using bitbake (I can't find any
reference to the nfs server in packages directory)? With samba, it
was as simple as "bitbake samba". Please, please, anyone?

Thanks,
Andy

Hi Andy,

Sorry for mixing up package names. Actually nfs-server used to exist,
but is not there any more.

You *do* want nfs-utils. It contains the server. This is from the
install I just did:

root@beagleboard:~# opkg install nfs-utils
Installing nfs-utils (1.1.2-2.1) to root...
Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/nfs-utils_1.1.2-2.1_armv7ak
nfs-utils: unsatisfied recommendation for kernel-module-nfsd
Installing libwrap0 (7.6-r2.1) to root...
Downloading http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv7a/base/libwrap0_7.6-r2.1_armv7a.ik
Configuring libwrap0
Configuring nfs-utils
Adding system startup for /etc/init.d/nfsserver.
creating NFS state directory: done
starting 8 nfsd kernel threads: done
starting mountd: done
starting statd: done

then make a file /etc/exports with whatever you want to export. E.g.:
/home 192.168.1.0/255.255.255.0(rw)
Then you should be able to start nfs by:
/etc/init.d/nfsserver
but for me that did not start nfsd. Still digging into that.

Of course the system also has exportfs

wrt samba: I would expect this package to be on the feed.

FM.

Andy,

I've looked into the issue. Problem is that nfsd is not in the kernel.
I've added it. You need to use a kernel build with this. Guess one
will be available in a day or so. (it will be in 2.6.28 version r19)

You also need to install
opkg install kernel-module-exportfs kernel-module-nfs-acl kernel-
module-nfsd
and probably insmod the modules and do a depmod -a.

I've tried things locally, so not sure if the last step is needed when
installing from the feed.

With that and the instructions I gave below I can mount an nfs fs from
beagle on my opensuse system

Enjoy, Frans.

PS: if you want to mount nfs shares on your beagle you need to install
nfs-utils-client.

Frans,

Thanks for all the info. I will try later tonight. Thanks again.

Regards,
Andy

UPDATE: I finally got the NFS server to run on the BB. Frans, I
followed your directions and it works like a charm. Thanks.

Regards,
Andy

I’m on BBB and i’ve tried to installa this modules, but only exportfs is present. How to proceed?

If i try to start nfsserver i obtain this message:

creating NFS state directory: done
starting 8 nfsd kernel threads: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, ‘mount -t nfsd nfsd /proc/fs/nfsd’ and then restart rpc.nfsd to correct the problem
done
starting mountd: Cannot register service: RPC: Unable to receive; errno = Connection refused
done
starting statd: done
exportfs: /etc/exports [1]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “192.168.0.0/255.255.255.0:/home/root/nfs”.
Assuming default behaviour (‘no_subtree_check’).
NOTE: this default has changed since nfs-utils version 1.0.x

Thanks

opkg install kernel-module-exportfs kernel-module-nfs-acl kernel-
module-nfsd