Setting up NFS

(IT OS2006)
(wikify slightly)
 
(27 intermediate revisions not shown)
Line 1: Line 1:
-
=IT OS2008=
+
== In Diablo==
-
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 [[Nokia N800|N800]]/[[Nokia N810|N810]] as an NFS client.
-
These instructions are valid for IT OS2008, which was released in November 2007.
+
=== Pre-requisites ===
 +
You must be able to [[root access|access the device as root]].
-
The prerequisites are:
+
=== Installing ===
-
 
+
-
#you must be able to access the device as root.
+
-
#repository.maemo.org is in your apt sources list.
+
-
 
+
-
The first requirement can be fulfilled in a number of ways (RD mode, 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.
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.
+
The following packages will be needed; kernel-diablo-modules-extra, nfs-common and portmap.
-
*rx-34-kernel-modules-extra contains the necessary kernel modules  
+
*kernel-diablo-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:
+
<ol>
 +
<li>\
 +
Get access to a shell (either a remote shell or an X Terminal session on the tablet itself)
 +
</li>
 +
<li>
 +
Become root via your preferred method.
 +
</li>
 +
<li>
 +
Add the required repository to <code>/etc/apt/sources.list</code>
 +
<pre>
 +
echo "deb http://repository.maemo.org/ diablo/tools free" >> /etc/apt/sources.list
 +
apt-get update
 +
</pre>
 +
(the "<code>>></code>" is important!)
 +
</li>
 +
<li>
 +
Run:
<pre>
<pre>
-
$ ssh <device_ip> -l root
+
apt-get install kernel-diablo-modules-extra portmap nfs-common
-
root@<device_ip>'s password:  
+
</pre>
 +
</li>
 +
<li>
 +
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:
 +
<pre>
 +
cd /lib/modules/2.6.21-omap1/extra/
 +
insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
 +
</pre>
 +
</li>
 +
<li>
 +
Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
 +
<pre>
 +
mkdir -p /media/<any name>'
 +
mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>
 +
</pre>
 +
</li>
 +
</ol>
-
BusyBox v1.6.1 (2007-09-27 18:08:59 EEST) Built-in shell (ash)
+
Of course, substitute anything in the <> as needed. And don't include the < and the > when running commands with them in it.
-
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.
-
=IT OS2007=
+
== In OS2008 ==
-
This chapter shows an example of how to set up your N800 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 the IT OS 2007 (version 4.2007.26-8), which was released in June 2007 for the N800 device.
+
These instructions are valid for [[:Category:OS2008|IT OS2008]], which was released in November 2007. It is also known as ''chinook'' or 2.2007.51-3.
-
The prerequisites are:
+
=== Pre-requisites ===
 +
You must be able to [[root access|access the device as root]].
-
#you must be able to access the device as root.
+
=== Installing ===
-
#repository.maemo.org is in your apt sources list.
+
-
The first requirement can be fulfilled in a number of ways (RD mode, becomeroot or openssh server). My favorite is the ssh approach, since then I can utilize my PC's keyboard for entering all the commands.
+
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 second is achieved by adding repository.maemo.org / bora / free non-free to the Application manager catalogue or by editing /etc/apt/sources.list accordingly.
+
The following packages will be needed; rx-34-kernel-modules-extra, nfs-common and portmap.
-
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 mount NFS partitions from another computer.
+
*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.
-
The following packages will be needed; portmap, rx-34-kernel-nfs-modules, nfs-common. However, nfs-common is currently broken and it needs to be installed by hand instead of apt-get or the application manager.
+
*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.
+
-
*rx-34-kernel-nfs-modules contains the necessary kernel modules
+
-
*nfs-common contains other tools
+
-
This is a recording of how I installed the packages and kernel modules:
+
 +
<ol>
 +
<li>
 +
Get access to a shell (either a remote shell or an X Terminal session on the tablet itself)
 +
</li>
 +
<li>
 +
Become root via your preferred method.
 +
</li>
 +
<li>
 +
Add the required repository to the apt sources (<code>/etc/apt/sources.list</code>).
<pre>
<pre>
-
$ ssh <device_ip> -l root
+
echo "deb http://repository.maemo.org/ chinook free" > /etc/apt/sources.list.d/sdk-repo.list
-
root@<device_ip>'s password:  
+
apt-get update
 +
</pre>
 +
</li>
 +
<li>
 +
Run:
 +
<pre>
 +
apt-get install rx-34-kernel-modules-extra portmap nfs-common
 +
</pre>
 +
</li>
 +
<li>
 +
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.
 +
<pre>
 +
cd /lib/modules/2.6.21-omap1/extra/
 +
insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
 +
</pre>
 +
</li>
 +
<li>
 +
Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
 +
<pre>
 +
mkdir -p /media/<any name>
 +
mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>
 +
</pre>
 +
</li>
 +
</ol>
-
BusyBox v1.4.1 (2007-03-12 19:00:25 EET) Built-in shell (ash)
+
Of course, substitute anything in the <> as needed. And don't include the < and the > when running commands with them in it.
-
Enter 'help' for a list of built-in commands.
+
-
Nokia-N800-26:~# apt-get install rx-34-kernel-nfs-modules
 
-
Nokia-N800-26:~# apt-get install portmap
 
-
 
-
# I'm installing wget just to get the nfs-common binary package to bypass
 
-
# the dependency problems with it
 
-
Nokia-N800-26:~# apt-get install wget
 
-
 
-
Nokia-N800-26:~# wget http://repository.maemo.org/pool/bora/free/binary/nfs-common_1.0.6-3.1sdk1_armel.deb
 
-
Nokia-N800-26:~# ls -l
 
-
-rw-r--r--    1 root    root        60744 Jul  4 12:30 nfs-common_1.0.6-3.1sdk1_armel.deb
 
-
 
-
# Unpack the deb file to a temporary directory
 
-
Nokia-N800-26:~# dpkg -x nfs-common_1.0.6-3.1sdk1_armel.deb nfstmp
 
-
 
-
Nokia-N800-26:~# cd nfstmp
 
-
Nokia-N800-26:~/nfstmp# ls -l
 
-
drwxr-xr-x    4 root    root            0 Aug 31 13:39 etc
 
-
drwxr-xr-x    2 root    root            0 Aug 31 13:39 sbin
 
-
drwxr-xr-x    4 root    root            0 Aug 31 13:39 usr
 
-
drwxr-xr-x    3 root    root            0 Aug 31 13:39 var
 
-
 
-
# Remove documentation to save some space on the device
 
-
Nokia-N800-26:~/nfstmp# rm -rf usr/share/man/ usr/share/doc/
 
-
 
-
# Copy the rest of the directories to root
 
-
Nokia-N800-26:~/nfstmp# cp -r etc sbin usr var /
 
-
Nokia-N800-26:~/nfstmp# cd /lib/modules/current/
 
-
Nokia-N800-26:/lib/modules/current# ls -l
 
-
-rw-r--r--    1 root    root        5922 Dec  5  2006 exportfs.ko
 
-
-rw-r--r--    1 root    root        72921 Dec  5  2006 lockd.ko
 
-
-rw-r--r--    1 root    root      263290 Dec  5  2006 nfs.ko
 
-
-rw-r--r--    1 root    root      109606 Dec  5  2006 nfsd.ko
 
-
-rw-r--r--    1 root    root      153963 Dec  5  2006 sunrpc.ko
 
-
 
-
# Now it's time to load the kernel modules. The order is important:
 
-
Nokia-N800-26:/lib/modules/current# insmod sunrpc.ko
 
-
Nokia-N800-26:/lib/modules/current# insmod lockd.ko
 
-
Nokia-N800-26:/lib/modules/current# insmod nfs.ko
 
-
 
-
# The device is ready, now just mount your NFS partition:
 
-
Nokia-N800-26:~# mkdir /mnt/mountpoint
 
-
Nokia-N800-26:~# 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.
-
=IT OS2006=
+
[[Category:Connectivity]]
-
For the 770 / maemo 2.x see HowToNFS 06.
+
[[Category:N8x0]]
-
 
+
[[Category:OS2008]]
-
This should be valid for older IT OS 2006 firmware.
+
[[Category:Power users]]
-
 
+
[[Category:Diablo]]
-
NFS should work without a new kernel
+
-
 
+
-
Go into redpill mode. Install the following packages
+
-
 
+
-
portmap rx-34-kernel-nfs-modules nfs-common
+
-
 
+
-
nfs-common on the N800 bora release will require adduser which will require perl-base. These two packages can be installed from a gregale repository. http://repository.maemo.org/pool/gregale/free/
+
-
 
+
-
 
+
-
--------------------------------------------------------------------------------
+
-
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
+
-
 
+
-
skler LudgerHumbert: changed to .nfs and from //x.y... to x.y...
+
-
 
+
-
 
+
-
 
+
-
[[Category:HowTos]]
+

Latest revision as of 11:34, 10 February 2011

Contents

[edit] In Diablo

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

[edit] Pre-requisites

You must be able to access the device as root.

[edit] Installing

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)
  2. Become root via your preferred method.
  3. Add the required repository to /etc/apt/sources.list
    echo "deb http://repository.maemo.org/ diablo/tools free" >> /etc/apt/sources.list
    apt-get update
    

    (the ">>" is important!)

  4. Run:
    apt-get install kernel-diablo-modules-extra portmap nfs-common
    
  5. 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:
    cd /lib/modules/2.6.21-omap1/extra/
    insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
    
  6. Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
    mkdir -p /media/<any name>'
    mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>
    

Of course, substitute anything in the <> as needed. And don't include the < and the > when running commands with them in it.

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.

[edit] 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.

[edit] Pre-requisites

You must be able to access the device as root.

[edit] Installing

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)
  2. Become root via your preferred method.
  3. Add the required repository to the apt sources (/etc/apt/sources.list).
    echo "deb http://repository.maemo.org/ chinook free" > /etc/apt/sources.list.d/sdk-repo.list
    apt-get update
    
  4. Run:
    apt-get install rx-34-kernel-modules-extra portmap nfs-common
    
  5. 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.
    cd /lib/modules/2.6.21-omap1/extra/
    insmod sunrpc.ko ; insmod lockd.ko ; insmod nfs.ko
    
  6. Now the NFS share needs to be mounted. We need to make a directory for the share to be mounted in.
    mkdir -p /media/<any name>
    mount -t nfs <ip.of.the.server>:</share/on/the/server> /media/<name of directory created>
    

Of course, substitute anything in the <> as needed. And don't include the < and the > when running commands with them in it.

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.