Setting up NFS

Image:Ambox_content.png
This is an article from the old midgard wiki that hasn't yet been fully updated for this wiki, please update it.
Please see the talk page for discussion.


In Diablo

This chapter shows an example of how to set up your N800/N810 as an NFS client.

Prerequisites are:

  1. You must be able to access the device as root.
  2. repository.maemo.org must be in your tablet's apt sources list.

The first requirement can be fulfilled in a number of ways (R&D mode, easyroot, becomeroot, or OpenSSH server). My favorite is the SSH approach, since then I can utilize my PC's keyboard for entering all the commands.

The second is achieved by adding repository.maemo.org / diablo/tools / free non-free to the Application manager catalogue or by editing /etc/apt/sources.list accordingly.

During this process we're going to need to install a few extra packages and load some kernel modules. Once we're done, your device will be ready to do NFS mounts.

The following packages will be needed; kernel-diablo-modules-extra, nfs-common and portmap.

  • kernel-diablo-modules-extra contains the necessary kernel modules
  • nfs-common contains other tools
  • portmap contains the protocol port number conversion server that is needed for NFS.

This is a log of how I performed the install:

 $ ssh <device_ip> -l root
 root@<device_ip>'s password: 

 BusyBox v1.6.1 (2007-09-27 18:08:59 EEST) Built-in shell (ash)
 Enter 'help' for a list of built-in commands.

 Nokia-N810:~# apt-get install kernel-diablo-modules-extra portmap nfs-common

 # apt-get should automatically load the kernel modules. If not, you can do it manually. The order is important:
 Nokia-N810:~# cd /lib/modules/2.6.21-omap1/extra
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod sunrpc.ko
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod lockd.ko
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod nfs.ko

 # The device is ready, now just mount your NFS partition:
 Nokia-N810:~# mkdir /mnt/mountpoint
 Nokia-N810:~# mount -t nfs <nfs_server_ip>:/some/directory /mnt/mountpoint

That should do it! For the mount to work, your NFS host needs to be configured correctly and that's out of the scope of this wiki page. Just be wary of the user id mappings etc. if you want to use the mountpoint as a non-root user.

In OS2008

This chapter shows an example of how to set up your N800/N810 as an NFS client.

These instructions are valid for IT OS2008, which was released in November 2007.

Prerequisites are:

  1. You must be able to access the device as root.
  2. repository.maemo.org must be in your tablet's apt sources list.

The first requirement can be fulfilled in a number of ways (R&D mode, easyroot, becomeroot, or OpenSSH server). My favorite is the SSH approach, since then I can utilize my PC's keyboard for entering all the commands.

The second is achieved by adding repository.maemo.org / chinook / free non-free to the Application manager catalogue or by editing /etc/apt/sources.list accordingly.

During this process we're going to need to install a few extra packages and load some kernel modules. Once we're done, your device will be ready to do NFS mounts.

The following packages will be needed; rx-34-kernel-modules-extra, nfs-common and portmap.

  • rx-34-kernel-modules-extra contains the necessary kernel modules
  • nfs-common contains other tools
  • portmap contains the protocol port number conversion server that is needed for NFS.

This is a log of how I performed the install:

 $ ssh <device_ip> -l root
 root@<device_ip>'s password: 

 BusyBox v1.6.1 (2007-09-27 18:08:59 EEST) Built-in shell (ash)
 Enter 'help' for a list of built-in commands.

 Nokia-N810:~# apt-get install rx-34-kernel-modules-extra
 Nokia-N810:~# apt-get install portmap
 Nokia-N810:~# apt-get install nfs-common    

 # Now it's time to load the kernel modules. The order is important:
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod sunrpc.ko
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod lockd.ko
 Nokia-N810:/lib/modules/2.6.21-omap1/extra# insmod nfs.ko

 # The device is ready, now just mount your NFS partition:
 Nokia-N810:~# mkdir /mnt/mountpoint
 Nokia-N810:~# mount -t nfs <nfs_server_ip>:/some/directory /mnt/mountpoint

That should do it! For the mount to work, your NFS host needs to be configured correctly and that's out of the scope of this wiki page. Just be wary of the user id mappings etc. if you want to use the mountpoint as a non-root user.

Download this kernel image that have NFS support build in kernel http://maemo.org/maemowiki/ApplicationCatalog2006#head-dee0bccd8ad8d16e82f29bfa051ecc468fb009e5

open xterm and type this command as root for install portmap:

apt-get install nfs-common

then NFS is ready to use.

For see it in File Manager create a dir in MyDocs:

mkdir /home/user/MyDocs/.nfs
# portmap
# mount -t nfs x.y.v.z:/foo /home/user/MyDocs/.nfs