Hello everyone,

I installed FreeWRT 1.0 on my Asus WL500g Premium (by building it from
source on a Debian GNU/Linux 3.1 machine) and it works fine (a word of
caution to others who might fall into that trap: unnecessary spaces at
the end of your wireless-wpa-key leads to constant association and
disassociation with the device and no working WLAN)

Well apart from that (and the fact that I like FreeWRT a lot :)) there
is one thing which I could not get to work: nfsd.

I added

,----
| portmap=YES             # portmap
| nfsd=YES                # nfsd
`----

to /etc/rc.conf to have portmap and nfsd started at boot.  This did
not work without the following because there were some files missing
in /var.  So I created S59var-lib-nfs with the following contents and
made it executable:

,----
| #!/bin/sh
| 
| . /etc/rc.conf
| 
| case $1 in
| autostart)
|         test x"${nfsd:-NO}" = x"NO" && exit 0
|         exec $0 start
|         ;;
| start)
|         mkdir -p /var/lib/nfs
|         touch /var/lib/nfs/rmtab
|         touch /var/lib/nfs/etab
|         touch /var/lib/nfs/xtab
|         touch /var/lib/nfs/state && chmod 0600 /var/lib/nfs/state
|         ;;
| stop)
|         ;;
| restart)
|         $0 stop
|         $0 start
|         ;;
| *)
|         echo "Usage: $0 {start | stop | restart}"
|         exit 1
|         ;;
| esac
| exit $?
`----

My /etc/exports looks like this:

,----
| /mnt    (ro,all_squash,insecure)
`----

(/mnt is empty as I do not plug in anything into the USB ports at the
moment, but copying the line and substituting /usr/bin did yield the
same results.)

,----
| $ LANG= sudo mount sol:/mnt /mnt
| mount: sol:/mnt failed, reason given by server: Permission denied
`----

Hmmm, I think /etc/exports begs to differ...  but what does the router
have to say?  Well, this:

,----
| # logread |grep -i '\(nfs\|mountd\)'
| Jan  1 01:00:12 (none) user.info kernel: Installing knfsd (copyright (C) 1996 
[EMAIL PROTECTED]).
| Jan  1 01:00:43 (none) daemon.warn mountd[269]: refused mount request from 
sonne for /mnt (/): no export entry
`----

It appears as if /etc/export is ignored...  If I understand nfsd et
al. correctly any exported filesystem would end up in
/var/lib/nfs/xtab:

,----
| # ls /var/lib/nfs/
| -rw-r--r--    1 root     root            0 Jan  1  2000 etab
| -rw-r--r--    1 root     root            0 Jan  1  2000 rmtab
| -rw-------    1 root     root            0 Jan  1  2000 state
| -rw-r--r--    1 root     root            0 Jan  1  2000 xtab
`----

Well, does not look like it.  If I now do an exportfs -r (to quote
exportfs(8) from my Debian box: "-r Reexport all directories. It
synchronizes /var/lib/nfs/xtab with /etc/exports. It removes entries
in /var/lib/nfs/xtab which are deleted from /etc/exports, and remove
any entries from the kernel export table which are no longer valid.")
and try to mount again I get:

,----
| $ LANG= sudo mount sol:/mnt /mnt
| mount: Stale NFS file handle
`----

Am I missing something basic here?  I am out of ideas what to try...
I would really appreciate any input!


Greetings,


P.S.: I tried to convert tabs to spaces in /etc/exports, adding a * to
the allowed hosts (to have it read "/mnt *(ro,all_squash,insecure)"),
inserting a exportfs -r before the start of nfsd into
/etc/init.d/S70nfsd (as the Debian nfs-kernel-server init script
does... this only lead to the stale NFS file handle error directly
from the start), setting my clock via rdate and/or ntpclient and
restarting nfsd and sacrificing one of my cats (well, no, actually I
would never do that... :)).

-- 
: Sebastian Fontius : www.fsfe.org : www.fsfe.org/en/fellows/smc
`--------+----------+--------------+-----------------------------------.
    []   | "They that can give up essential liberty to obtain a little |
  [][][] |  temporary safety deserve neither liberty nor safety."      |
    ||   :                       Attributed to Benjamin Franklin, 1759 :

Attachment: signature.asc
Description: Digital signature

_______________________________________________
freewrt-users mailing list
freewrt-users@freewrt.org
https://www.freewrt.org/lists/listinfo/freewrt-users

Reply via email to