Revision as of 11:18, 16 June 2006

Contents

Installing an NFS Server

First Version | Be careful what you are doing and don't blame me. But feel free to correct or extend.

If you share network drives in a Unix like network, you should prefer NFS over Samba, as it keeps file attributes in place. To install a NFS Server on a LinkStation, I succeeded with the following steps. It was done on a MIPSel LinkStation, but should work on a PPC version similar. I did everything on a Debian machine as I do not allow Windows an Internet connection.

Prerequisites

A LinkStation with root-access

NFS Software binaries

Root access is handled elsewhere.

For the NFS binaries I downloaded the following packages from my closest Debian mirror:

portmap_5-13_mipsel.deb

nfs-common_1.0.6-3.1_mipsel.deb

nfs-user-server_2.2beta47-20_mipsel.deb

PPC users should look for the PPC versions of the files.

Prepare the Software

We want to create an archive we can unpack in the LinkStation root directory, which puts all files in their correct places. So we create an empty working directory "nfs", which holds our target file-structure. We can create the sub-directories below that or copy them from the Debian files.

If you have Midnight Commander installed, just step into the Debian files and copy from the contents directory what you need into that directory with the complete path. I left out the man pages, etc. You can also convert the Debian files with alien to another format.

I had to adjust some files:

"/etc/rc0.d" does not exist on the LinkStation, you have to move that to "/etc/rc.d/rc0.d". You can adjust the links inside, if you like it clean.

create an "/etc/exports" file for your exported shares

Check for all files and directories for their ownership and access rights.

To Do - need the "/var/*" files, they are a potential risk for LinkStation file-system, as /var is a link there, that can be broken

Pack Your Files

In your "nfs" directory type:

tar cvzf ../nfs_mypackage_mipsel.tgz .

and transfer the package to your LinkStation

Installation

Open a telnet connection to your LinkStation and be root. Then enter the following. But stop, read first this:

The ""k"" or ""--keep-old-files"" option to "tar" is important, as the "/var" in the archive is a real directory, but the "/var" on the LinkStation is a link to "mnt/ram/var" which is gone, when you just untar the package.

The ""w"" or ""--interactive"" option asks you for confirmation before each file. This is a good idea for the first try.