Livebox (Inventel DV4210) Filesystem Mounting NFS Drives


Depending on the version of firmware and Linux kernel installed depends on how easy it is to mount NFS drives as some of the modules required do not exist in every firmware version.

For Linux kernel 2.4.17 you need to have the following modules in place,

/lib/modules/2.4.17/kernel/net/sunrpc/sunrpc.o
/lib/modules/2.4.17/kernel/fs/lockd/lockd.o
/lib/modules/2.4.17/kernel/fs/nfs/nfs.o

and to load the drivers,

insmod sunrpc.o
insmod lockd.o
insmod nfs.o

For Linux kernel 2.6.12.6 you need the following modules in place, although it appears at the moment that the installed busybox 'mount' command does NOT support NFS so the mount command fails. However, this statically built version of busybox, that I created with this .config file using OpenWrt, does support NFS and when this is copied to the /etc directory of the Livebox and a symlink to it created in the same directory called 'mount' it will then mount the NFS share.

/lib/modules/2.6.12.6/kernel/net/sunrpc/sunrpc.ko
/lib/modules/2.6.12.6/kernel/fs/lockd/lockd.ko
/lib/modules/2.6.12.6/kernel/fs/nfs/nfs.ko

and to load the drivers,

insmod sunrpc
insmod lockd
insmod nfs

You should now be able to mount any available NFS shares. The command for mounting is

mount -t nfs -o nolock ip:/nfs_share mount_point
where 'ip:/nfs_share' is the IP Address and share path/name of the exported NFS share and the 'mount_point' is the location for it to be mounted on and can be /mnt/nfs/nfsa, /mnt/nfs/nfsb, etc, depending on available mount points.
The '-o nolock' stops you from getting a very long delay from the mount command, although eventually the mount will succeed.

For 2.6.12.6 kernels you need to have the symlink 'mount' in the /etc directory and you call it with

./mount -t nfs -o nolock ip:nfs_share mount_point.
Typing 'df' should now show the amount of free disk space on all mounted partitions and should include those of the NFS connected share(s). Once you have finished using the shared device, you should be able to remove all the drivers you have loaded with 'rmmod modulename' for each module in reverse order.

If you wanted to, you could create a script file in /etc/init.d and have it called during the boot process to automatically install the drivers and mount the partitions.

For the 2.4.17 kernel modules, all the files that you need to copy to the Livebox were compiled using this source code, provided by Belkin for their F5D7633 ADSL Modem/Router which uses the same Broadcom device. I just changed the config file to build the USB/SCSI/NFS modules and then did a 'make PROFILE=96348GW' and copied the files I wanted from targets/96348GW/modules/lib.... except for nls.o which came from the sgibcm_2_4_17/linux/fs/nfs directory. I have just verified that this config file builds the required modules and that they load and function correctly. The config file needs to be copied as .config into the sgibcm_2_4_17/linux directory. You also need to change the Makefile in that directory to add -mlong-calls to line 105 in the CFLAGS. If you don't, doing insmod with nls.o results in an error. To compile the code, change to the root of the source and type 'make PROFILE=96348GW'. You also need the cross-compile toolset. The version I use came from uclibc-crosstools-mips-0.9.12-5p1.i386.rpm which was part of the bcm963xx_2.14L.02DT_consumer_release.tar.gz code released by Sinus 1054/ HHT (Sinus 1054)/ Siemens SE515. All these sources appear to be identical. I obtained mine from within the Siemens source code but the Sinus one is probably easier to download.

For the 2.6.12.6 kernel modules, all the files came from the V5.08.15-2-fr firmware image.


AndyP