Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi all,
I have created a nfs-server package. Included is the nfsd.o kernel module, a portmap5 binary and binaries from nfs-utils 1.0.10. The server seems quite fast compared to the samba and ftp-server in the DSM-G600.
The server may be started with the following script inserted in the fun_plug file.
Change NFSROOT to the location where you unpacked the package. Also check the exports and hosts.* files created by the script to match your setup.
#!/bin/sh # fun_plug example for nfs-server # # Vars. Change these according to your setup NFSROOT=/mnt/HD_a2/packages/nfs # Set up needed directories and files if [ ! -d $NFSROOT/var/lib/nfs ] then mkdir -p $NFSROOT/var/lib/nfs fi if [ ! -d $NFSROOT/etc ] then mkdir -p $NFSROOT/etc fi if [ ! -f $NFSROOT/etc/exports ] then cat > $NFSROOT/etc/exports <<"EOF" /mnt/HD_a2 192.168.1.0/24(rw) EOF fi if [ ! -f $NFSROOT/etc/hosts.allow ] then cat > $NFSROOT/etc/hosts.allow <<"EOF" lockd: 192.168.1.* rquotad: 192.168.1.* mountd: 192.168.1.* statd: 192.168.1.* EOF cat > $NFSROOT/etc/hosts.deny <<"EOF" lockd:ALL mountd:ALL rquotad:ALL statd:ALL EOF if [ ! -d /usr/sbin ] then mkdir -p /usr/sbin fi # Make symlinks ln -s $NFSROOT/etc/exports /etc/ ln -s $NFSROOT/var/lib /var/ ln -s $NFSROOT/etc/hosts.* /etc/ ln -s $NFSROOT/sbin/* /usr/sbin/ # start the server /usr/sbin/insmod $NFSROOT/modules/nfsd.o /usr/sbin/portmap sleep 1 /usr/sbin/rpc.mountd sleep 1 /usr/sbin/rpc.nfsd sleep 1 /usr/sbin/rpc.statd # re-export... $NFSROOT/exportfs -ra
Last edited by bingt (2007-01-01 14:51:47)
Offline
I realize that this is the DSM-G600 forum, but i'm going to give it a shot anyway...
I have the DNS-323 and I would really like to run your NFS server on it. I placed your files in the correct location and I added your script to my fun_plug. The script, however, seems to be failing on this line: "/usr/sbin/insmod $NFSROOT/modules/nfsd.o". when I execute that line, I get this error: "insmod: error inserting '/mnt/HD_a2/packages/nfs/modules/nfsd.o': -1 Invalid module format"
Do you have any idea why I would be getting this or how to adapt this for the DNS-323? Any help would be much appreciated.
Cheers!
Offline
Bought my DNS-323 yesterday. I'm also very interested in installing an NFS server. I called D-Link on that, but they wont provide any assistance, and also have no plans to include an NFS server into future firmware releases.
brdhse1: The problem with this approach is that the DNS likely runs a different linux kernel than the DMS. You need to get a nfsd kernel module specifically made for the DNS-kernel. For this, you need to setup the development environment, and compile your own NFS-Kernel module. Alternatively, one might find a nice user-space NFS server, which might simplify things...
Offline
well, the DSM-G600 is ppc-based (I think), and the DNS-323 is arm based... so you will even need a different nfs & portmap binary...
but if you're about to recompile it... here's a nfsd.ko for the dns323 http://dev.skcserver.de/dns323/nfsd.ko.
The module loads perfectly into the running kernel, but, when using the nfs-kernel-server package from debian etch, the dlink freezes when accessing files via nfs :-( That's why I'm sticking to the nfs-user-server, which works! It doesn't even need the kernel module...
Offline
Lipovitan:
Where can i get the nfs-user-server? Do you have any instructions on how to use this?
Cheers!
Offline
I have the nfs service running on my DSM-G600 thanks to bingt's instructions and binaries. Kudos.
However, I discovered a couple of typos in the fun_plug excerpt above. (1) a missing 'fi' and (2) a missing 'sbin' in the exportfs path and (3) the incorrect path to the insmod executable. The below is my currently running piece of fun_plug script. It appears to be working well.
# nfs server # Vars. Change these according to your setup NFSROOT=/mnt/HD_a2/nas_packages/nfs # Set up needed directories and files if [ ! -d $NFSROOT/var/lib/nfs ] then mkdir -p $NFSROOT/var/lib/nfs fi if [ ! -d $NFSROOT/etc ] then mkdir -p $NFSROOT/etc fi if [ ! -f $NFSROOT/etc/exports ] then cat > $NFSROOT/etc/exports <<"EOF" /mnt/HD_a2 192.168.0.0/24(rw) EOF fi if [ ! -f $NFSROOT/etc/hosts.allow ] then cat > $NFSROOT/etc/hosts.allow <<"EOF" lockd: 192.168.0.* rquotad: 192.168.0.* mountd: 192.168.0.* statd: 192.168.0.* EOF cat > $NFSROOT/etc/hosts.deny <<"EOF" lockd:ALL mountd:ALL rquotad:ALL statd:ALL EOF fi if [ ! -d /usr/sbin ] then mkdir -p /usr/sbin fi # Make symlinks ln -s $NFSROOT/etc/exports /etc/ ln -s $NFSROOT/var/lib /var/ ln -s $NFSROOT/etc/hosts.* /etc/ ln -s $NFSROOT/sbin/* /usr/sbin/ # start the server /sbin/insmod $NFSROOT/modules/nfsd.o /usr/sbin/portmap sleep 1 /usr/sbin/rpc.mountd sleep 1 /usr/sbin/rpc.nfsd sleep 1 /usr/sbin/rpc.statd # re-export... $NFSROOT/sbin/exportfs -ra
Paul Cooley
http://linuxlore.blogspot.com
Offline
Glad to hear it is useful. Good job fixing the script, it was just out of my head late at night.
I have also compiled a 1.3.0 busybox binary with syslog support (makes most things, including the nfs server more traceable) and a needed unix.o (Unix domain sockets) kernel module.
Just put the attached busybox binary in $FUNROOT/bin and the unix.o in your favorite modules directory.
# Change these according to your setup... FUNROOT="/mnt/HD_a2" MODULES="$FUNROOT/lib/modules" # Syslog if [ ! -e $FUNROOT/var/log/messages ] then mkdir -p $FUNROOT/var/log touch $FUNROOT/var/log/messages chmod 700 $FUNROOT/var/log/messages fi ln -s $FUNROOT/var/log/messages /var/log/ if [ ! -e $FUNROOT/usr/sbin/syslogd ] then ln -s $FUNROOT/bin/busybox $FUNROOT/usr/sbin/syslogd ln -s $FUNROOT/bin/busybox $FUNROOT/usr/sbin/klogd fi /sbin/insmod $MODULES/unix.o $FUNROOT/usr/sbin/syslogd -O $FUNROOT/var/log/messages $FUNROOT/usr/sbin/klogd
Last edited by bingt (2007-02-10 11:59:09)
Offline
Regarind the new busybox with syslog: I can get the syslog to work, but my telnetd (and my tty for ssh) stops working. What am I doing wrong? I added yout lines to my fun_plug, but kept the basic commands involving busybox (like cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9 and cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9).
Offline
tsmalmbe wrote:
Regarind the new busybox with syslog: I can get the syslog to work, but my telnetd (and my tty for ssh) stops working. What am I doing wrong? I added yout lines to my fun_plug, but kept the basic commands involving busybox (like cd /dev && /mnt/HD_a2/busybox makedevs ptyp c 2 0 0 9 and cd /dev && /mnt/HD_a2/busybox makedevs ttyp c 3 0 0 9).
You need to have two busybox binary because in the second (busybox with syslog) is not integrated telnetd and dropbear.
Offline
I tried this as follows: I used my "old" busybox as I always have, and then I added your busybox as busybox-syslog. But syslog doesn't work. If i use busybox as the shell etc., syslogging works OK.
Offline
tsmalmbe wrote:
I tried this as follows: I used my "old" busybox as I always have, and then I added your busybox as busybox-syslog. But syslog doesn't work. If i use busybox as the shell etc., syslogging works OK.
Someone should recompile a new busybox all-in-one...
Offline
Offline
Right, don't know what I did, just ran the commands manually from the command line, and now the syslog seems to work. Can I use this syslog from external sources also?
Offline
Can someone re-upload nfs-utils-1.0.10-portmap5-nfsd.tar.gz and busybox-1.3.0-unix.tar.bz2 please?
Tnx!
Offline
I have nfs-utils-1.0.10-portmap5-nfsd.tar.gz but not busybox-1.3.0-unix.tar.bz2
Can someone re-upload busybox-1.3.0-unix.tar.bz2 ?
Thanks !
Offline
nikosan wrote:
Can someone re-upload busybox-1.3.0-unix.tar.bz2 ?
this is the binary
EDIT
ops.. it's too big.. I uploaded it in my directory: http://dns323.kood.org/downloads/people … 9/busybox2
Last edited by SystemR89 (2007-12-30 15:26:35)
Offline
Hello
I tried to share my disk with nfs (for a dreambox) i can't mount the share from my dm, my mac (with finder or terminal)
i copy the script from this page & adapt it with my network, the telnet works
can you help me ?
Offline
Does anyone have unix.o module somewhere? Link to busybox-1.3.0-unix.tar.bz2 seems to be broken.
Offline
unix.o: http://dns323.kood.org/downloads/people … R89/unix.o
busybox-1.3: http://dns323.kood.org/downloads/people … 9/busybox2
this is a working script: http://dns323.kood.org/downloads/people/SystemR89/nfs
good luck!
Offline
Hi!
I'm trying to make working nfsd on TS-I300. After some patching I've managed to compile it with uclibc gcc-3. However when running exportfs -ra I receive a segmentation fault.
Here what I get from dmesg:
<1>Unable to handle kernel paging request at virtual address fffffffc printing eip: c01158ac *pde = 00009063 *pte = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[<c01158ac>] Not tainted EFLAGS: 00000013 eax: c2c9f844 ebx: 00000000 ecx: 00000001 edx: 00000003 esi: c2c9f844 edi: 00000003 ebp: c1acdf5c esp: c1acdf48 ds: 0018 es: 0018 ss: 0018 Process exportfs (pid: 27832, stackpage=c1acd000) Stack: 00000001 00000296 c048b4b0 00000000 00000000 00000029 c2c96172 c2c96395 c0148a05 c048b4b0 00000000 c048b4c8 00000000 00000000 00000000 00000000 00000000 00000000 c098d270 ffffffea 00001000 c0133533 c098d270 08055d78 Call Trace: [<c2c96172>] [<c2c96395>] [<c0148a05>] [<c0133533>] [<c01087cf>] Code: 8b 53 fc 8b 02 85 c7 75 13 8b 1b 39 f3 75 f1 ff 75 f0 9d 8d
I hope that the problem is not in the kernel.
One suspicious thing: my exportfs is 10 times larger then the file from the DSM-G600 package. Any suggestions?
Offline