Setting up NFS

m (Showing how to add the repo.)
(Making OS2008 section more friendly, fixing some of my mistakes & removed the MyDocs part because anything mounted in /media should show up in file manager.)
Line 7: Line 7:
Prerequisites are:  
Prerequisites are:  
-
#You must be able to access the device as root.  
+
*You must be able to access the device as root.  
The first requirement can be fulfilled in a [[Root_access|number of ways]].
The first requirement can be fulfilled in a [[Root_access|number of ways]].
Line 16: Line 16:
*kernel-diablo-modules-extra contains the necessary kernel modules  
*kernel-diablo-modules-extra contains the necessary kernel modules  
-
*nfs-common contains other tools. From debian: "Use this package on any machine that uses NFS, either as client or server."
+
*nfs-common contains other tools. It contains files that are both common to NFS servers & clients.
*portmap contains the protocol port number conversion server that is needed for NFS.  
*portmap contains the protocol port number conversion server that is needed for NFS.  
Line 27: Line 27:
# For the tablet to recognize a filesystem that is not compiled in the kernel, you need to load modules for tablet to recognize NFS servers. The modules must be loaded in this order. Run the next two commands exactly as they are written.
# For the tablet to recognize a filesystem that is not compiled in the kernel, you need to load modules for tablet to recognize NFS servers. The modules must be loaded in this order. Run the next two commands exactly as they are written.
## <code>cd /lib/modules/2.6.21-omap1/extra/</code>
## <code>cd /lib/modules/2.6.21-omap1/extra/</code>
-
### <code>insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko</code>
+
## <code>insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko</code>
# Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
# Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
## <code>mkdir -p /media/<any name></code>
## <code>mkdir -p /media/<any name></code>
-
### <code>mount -t nfs ip.of.the.server:/share/on/the/server /media/mountpoint</code>
+
## <code>mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created></code>
 +
 
 +
Of course, substitute anything in the <> as needed.
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.
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.
Line 37: Line 39:
This chapter shows an example of how to set up your N800/N810 as an NFS client.
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.
+
These instructions are valid for IT OS2008, which was released in November 2007. It is also known as chinook or 2.2007.51-3.
Prerequisites are:  
Prerequisites are:  
-
#You must be able to access the device as root.
+
*You must be able to access the device as root.  
-
#repository.maemo.org must be in your tablet's apt sources list.  
+
-
The first requirement can be fulfilled in a number of ways ([[Root access#The R&amp;D way (Nokia 770 only) (Linux or Mac OS X needed)|R&amp;D mode]], [[Root access#easyroot|easyroot]], becomeroot, or [[Root access#OpenSSH|OpenSSH server]]). My favorite is the SSH approach, since then I can utilize my PC's keyboard for entering all the commands.
+
The first requirement can be fulfilled in a [[Root_access|number of ways]].
-
 
+
-
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.
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.
Line 53: Line 52:
*rx-34-kernel-modules-extra contains the necessary kernel modules  
*rx-34-kernel-modules-extra contains the necessary kernel modules  
-
*nfs-common contains other tools  
+
*nfs-common contains other tools. It contains files that are both common to NFS servers & clients.
*portmap contains the protocol port number conversion server that is needed for NFS.  
*portmap contains the protocol port number conversion server that is needed for NFS.  
-
This is a log of how I performed the install:
+
# Get access to a shell (either a remote shell or an X Terminal session on the tablet itself)
-
<pre>
+
## Become root via your preferred method.
-
$ ssh <device_ip> -l root
+
# Add the required repository to the apt sources.
-
root@<device_ip>'s password:  
+
## <code>echo "deb http://repository.maemo.org/ chinook free" > /etc/apt/sources.list.d/sdk-repo.list</code>
 +
## <code>apt-get update</code>
 +
# Run <code>apt-get install rx-34-kernel-modules-extra portmap nfs-common</code>
 +
# For the tablet to recognize a filesystem that is not compiled in the kernel, you need to load modules for tablet to recognize NFS servers. The modules must be loaded in this order. Run the next two commands exactly as they are written.
 +
## <code>cd /lib/modules/2.6.21-omap1/extra/</code>
 +
## <code>insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko</code>
 +
# Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
 +
## <code>mkdir -p /media/<any name></code>
 +
## <code>mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created></code>
-
BusyBox v1.6.1 (2007-09-27 18:08:59 EEST) Built-in shell (ash)
+
Of course, substitute anything in the <> as needed.
-
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
+
-
</pre>
+
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.
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
 
-
 
[[Category:Users]]
[[Category:Users]]
[[Category:Midgard wiki]]
[[Category:Midgard wiki]]

Revision as of 06:25, 18 October 2008

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:

  • You must be able to access the device as root.

The first requirement can be fulfilled in a number of ways.

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. It contains files that are both common to NFS servers & clients.
  • portmap contains the protocol port number conversion server that is needed for NFS.
  1. Get access to a shell (either a remote shell or an X Terminal session on the tablet itself)
    1. Become root via your preferred method.
  2. Add the required repository to sources.list.
    1. echo "deb http://repository.maemo.org/ diablo/tools free" >> /etc/apt/sources.list (the >> is important!)
    2. apt-get update
  3. Run apt-get install kernel-diablo-modules-extra portmap nfs-common
  4. For the tablet to recognize a filesystem that is not compiled in the kernel, you need to load modules for tablet to recognize NFS servers. The modules must be loaded in this order. Run the next two commands exactly as they are written.
    1. cd /lib/modules/2.6.21-omap1/extra/
    2. insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
  5. Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
    1. mkdir -p /media/<any name>
    2. mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>

Of course, substitute anything in the <> as needed.

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. It is also known as chinook or 2.2007.51-3.

Prerequisites are:

  • You must be able to access the device as root.

The first requirement can be fulfilled in a number of ways.

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. It contains files that are both common to NFS servers & clients.
  • portmap contains the protocol port number conversion server that is needed for NFS.
  1. Get access to a shell (either a remote shell or an X Terminal session on the tablet itself)
    1. Become root via your preferred method.
  2. Add the required repository to the apt sources.
    1. echo "deb http://repository.maemo.org/ chinook free" > /etc/apt/sources.list.d/sdk-repo.list
    2. apt-get update
  3. Run apt-get install rx-34-kernel-modules-extra portmap nfs-common
  4. For the tablet to recognize a filesystem that is not compiled in the kernel, you need to load modules for tablet to recognize NFS servers. The modules must be loaded in this order. Run the next two commands exactly as they are written.
    1. cd /lib/modules/2.6.21-omap1/extra/
    2. insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
  5. Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
    1. mkdir -p /media/<any name>
    2. mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>

Of course, substitute anything in the <> as needed.

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.