PDA

View Full Version : Problems with NFS-Server from Knoppix 3.7 CD



karl_sand
02-15-2005, 06:58 PM
Hi,
I want to boot from my Knoppix-CD and then start up a NFS-Server and mount a directory from my Knoppix-CD
over NFS on another system.
After booting from Knoppix-CD i created a simple /etc/exports-file:
/home/knoppix *(ro,sync)

Then i started portmapper and nfs-kernel-server, which both are preinstalled on the Knoppix-CD:

/etc/init.d/portmap start
/etc/init.d/nfs-kernel-server start

Finally i tried to mount that export from the other system:

mkdir /mnt/nfs
mount -t nfs -o nolock Knoppix_IP:/home/knoppix /mnt/nfs

But all i got is this error:

mount: RPC: Unable to receive; errno = Connection refused
mount: nfsmount failed: Bad file descriptor
mount: Mounting Knoppix_IP:/home/knoppix on /mnt/nfs failed: invalid argument


I have another Knoppix-System as HD-install. Following the above steps on this system works as it should.
I tried to export different directories than /home/knoppix but that brought no success.
The filesystem of the Live-CD resides on a ramdisk. Could there be an issue with accessing directories over NFS on a ramdisk? Had anybody success starting an NFS-Server from the CD?
Thanks in advance,
karl sand

karl_sand
02-16-2005, 11:44 AM
Finally i solved that issue by myself :D
Just for for anybody who runs into the same problems, here is what i did.

The problem however was an authentication issue. Both, the portmap daemon and rpc.mountd
are linked against the tcp_wrapper library. That means to get them working properly you have to
specify all allowed hosts in the /etc/hosts.allow file. By default all hosts of the local domain
should be granted access to all services. The client-system that i use is a host in the local network but
not administrated by DNS, thus its domainname is considered invalid by the tcp_wrapper.
I added the following lines to the default Knoppix /etc/hosts.allow
file:

# additional lines in /etc/hosts.allow
portmap: 192.168.2.*
mountd: 192.168.2.*
Note: You have to use the daemon names, even if the binary-names are different! 192.168.2.0/255.255.255.0 is my local network.
After doing so, everything works fine.

karl_sand
02-16-2005, 07:24 PM
... :x there is still problem.
It is not possible to use the /home/knoppix dir in my exports-file. (the same with /ramdisk/home/knoppix)
When i use the rootdir / it works, but it is still not possible to access the ramdisk over nfs.
when i mount the / on the client i can see the /ramdisk dir and can change to the dir but when
i do ls -l: it seems to contain nothing... i'm still confused...