My change to make "busybox mount -t nfs" work for nfs v3, has been merged this morning into the cyanogenmod 9 base source, and should be in the next nightly.
The neccessary (nonmodular) kernel code is also in there, for Galaxy Nexus devices. Talk to your cyanogenmod kernel maintainer regarding other devices.
Noob here. I think I am following along o.k., but want to know if this is persistent or if I will need to do this every time I reboot. I will be trying this tomorrow on my HP Touchpad running the nightlies of CM9. Thanks!
Another answer is simply to use the CIFS Manager app. It seems to be doing the same thing in the background, but provides a bit simpler means to do it.Unfortunately, this post probably comes way too late for the original poster, but it may be useful for anyone else, like me, who stumbles across this thread looking for a way to mount nfs on Android devices.
The answer is to use busybox.
There is support for nfs version 3 in the kernel, but the standard mount command seems to have been hobbled. The busybox mount command seems to work exactly the same as the standard linux mount command (except that it actually works on Android )
After downloading busybox from the Android Market, this is the command I use:
Code:busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
I'm not sure how important all the options are, but I suspect that vers=3 is important at least. nolock, hard and intr are also useful when having problems mounting according to the mount man page.
/media/sdc1 192.168.1.0/24(rw,sync,no_subtree_check)
su
busybox mount -t nfs 192.168.1.149:/media/sdc1 /sdcard/mounts/shows/
but I get the response: No such deviceCode:su busybox mount -t nfs 192.168.1.149:/media/sdc1 /sdcard/mounts/shows/
-t nfs
-o nolock
su
type busybox
strings /path/of/that/busybox | grep nfs
unknown nfs status return value: %d
unknown nfs mount parameter: %s=%d
unknown nfs mount option: %s%s
nfs socket
nfs bindresvport
nfsprog
nfsvers
All the busybox stuff was there as you assumed with the same executables as you have. However, I did not have nfs in /proc/filesystems. I saw ntfs if that is similar or helpful. Do I need to drop some files on my system or does this require messing with the kernel? AS always, your help is greatly appreciated.
I did not have nfs in /proc/filesystems. I saw ntfs if that is similar or helpful. Do I need to drop some files on my system or does this require messing with the kernel?
ntfs is a microsoft file system (I think it stands for new technology file system and it came out with Windows NT). obviously, that's unrelated
nfs is a Sun/unix/linux protocol - it stands for network file system.
NTFS has nothing to do with it.
I just had a look at the tenderloin (touchpad) kernel support in CM9. There is no NFS built into the kernel, or you would see it in /proc/filesystems, and there is no loadable NFS client module either.
So, right now, you would have to set up a kernel build environment, locate the right kernel tree for your device, and set about compiling the module yourself. As I don't own the device, I cannot help you any further, sorry.
However, I dropped an E-Mail to the person who last updated the tenderloin kernel, asking whether he could include the NFS client. We'll see how this goes.
I've created an 'update' package to add the required nfs modules to the latest
touchpad nightlies.
http://dl.dropbox.com/u/53916521/cmtouchpad/update-touchpad_nfs_modules-for-cm9_20120404-signed.zip
Use CWM to install. Also, after boot, will need to run: "su" then "modprobe nfs"
before mounting.
mount -t nfs IP-Adresse:/var/mnt/hdd /sdcard/mnt/nfs -o rw,intr,soft,udp,nolock,rsize=8192,wsize=8192
Hi!
Found that amazing Post and tried your files.
Installing and modprobe is OK.
But get several error messages from Terminal when I try to mount my NFS Share.
How must a NFS Mount look like for the HP Touchpad?
Code:mount -t nfs IP-Adresse:/var/mnt/hdd /sdcard/mnt/nfs -o rw,intr,soft,udp,nolock,rsize=8192,wsize=8192
wont work.
Thanks for your amazing work also with the MIC on the Touchpad!
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
root@android:/ # ls -l /mnt/cifs/Kits/250M
-rw--w---- 503 system 262144000 2014-02-20 20:55 250M
root@android:/ # time dd if=/mnt/cifs/Kits/250M of=/dev/null
512000+0 records in
512000+0 records out
262144000 bytes transferred in 200.061 secs (1310320 bytes/sec)
3m20.62s real 0m0.97s user 0m11.37s system
root@android:/ #
root@android:/ # time dd if=/mnt/nfs/Kits/250M of=/dev/null
512000+0 records in
512000+0 records out
262144000 bytes transferred in 119.271 secs (2197885 bytes/sec)
1m59.30s real 0m1.29s user 0m8.70s system
root@android:/ #
root@android:/ # mount | grep Kits
192.168.1.5:/DataVolume/Kits /mnt/nfs/Kits nfs ro,relatime,vers=3,rsize=16384,wsize=16384,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.5,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.1.5 0 0
//192.168.1.5/Kits /mnt/cifs/Kits cifs rw,relatime,sec=ntlm,unc=\\192.168.1.5\Kits,username=adrianp,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.5,unix,posixpaths,serverino,acl,rsize=16384,wsize=131007,actimeo=1 0 0
Unfortunately, this post probably comes way too late for the original poster, but it may be useful for anyone else, like me, who stumbles across this thread looking for a way to mount nfs on Android devices.
The answer is to use busybox.
There is support for nfs version 3 in the kernel, but the standard mount command seems to have been hobbled. The busybox mount command seems to work exactly the same as the standard linux mount command (except that it actually works on Android )
After downloading busybox from the Android Market, this is the command I use:
Code:busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
I'm not sure how important all the options are, but I suspect that vers=3 is important at least. nolock, hard and intr are also useful when having problems mounting according to the mount man page.
[B]/system/xbin/[/B]mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder
Here's my recepie for mounting NFS shares on my Galaxy S3, running NeatRom 2.8 (Derived from SlimKat 2.8) and with Boeffla-Kernel:
Code:#remount the root filesystem rw so that we can create the mountpoint /sbin/busybox mount -o remount,rw / #create the mountpoint /sbin/busybox mkdir -p /mnt/nfs/Download #make the mountpoint world readable so that all user apps can access it /sbin/busybox chmod 777 /mnt/nfs /sbin/busybox chmod 777 /mnt/nfs/Download #remount / as ro /sbin/busybox remount,ro / #mount the actual NFS share (on 192.168.1.5:/DataVolume/Download su --mount-master -c "/sbin/busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.5:/DataVolume/Download /mnt/nfs/Download" #check that it was mounted mount | grep /mnt/nfs/Download
Using this method (and having world readable permissions on my shared files) I am able to access the files both with a root explorer (ES File Manager) and with non-root apps (MXPlayer, QuickPic). Without running the chmod on the created folders I am only able to access them with a root explorer.
Let me know if you need additional help, and a million thanks to @brotbuexe for pointing out the mount-master trick (I was actually looking into injecting commands into adb before finding out of this switch).
#remount the root filesystem rw so that we can create the mountpoint
/sbin/busybox mount -o remount,rw /
#create the mountpoint
/sbin/busybox mkdir -p /mnt/nfs/Download
#make the mountpoint world readable so that all user apps can access it
/sbin/busybox chmod 777 /mnt/nfs
/sbin/busybox chmod 777 /mnt/nfs/Download
#remount / as ro
/sbin/busybox remount,ro /
#mount the actual NFS share (on 192.168.1.5:/DataVolume/Download
su --mount-master -c "/sbin/busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.5:/DataVolume/Download /mnt/nfs/Download"
#check that it was mounted
mount | grep /mnt/nfs/Download