NFS Between Linux and FreeBSD

This document shows how to use NFS to copy data from a CD-ROM over the network. The NFS server (10.102.4.109) runs Mandrake Linux 10 and the client is FreeBSD 4.9 (10.102.4.107).

NFS Server (Linux)

Add this line to /etc/exports

/mnt/cdrom    10.102.4.107(ro,no_root_squash)
ro stands for read-only access, and no_root_squash implies that root user on the client machine has the same privileges as root user on the server. It is all right, since the medium is read-only anyway.

Add these lines to /etc/hosts.allow

portmap:  10.102.4.107
lockd:    10.102.4.107
rquotad:  10.102.4.107
mountd:   10.102.4.107
statd:    10.102.4.107

Restart portmapper and NFS services

service portmap restart
service nfs restart

Shut down the firewall

service shorewall stop
Since I am on an internal network, this is okay for me; you may prefer editing the firewall rules, however.

Insert the CD-ROM in the server machine and mount it

mount /mnt/cdrom

NFS Client (FreeBSD)

Add these lines to /etc/rc.conf

nfs_client_enable="YES"
nfs_client_flags="-n 4"

Start the client software

nfsiod -n 4

Mount the remote filesystem

mount 10.102.4.109:/mnt/cdrom /cdrom
This file created: 4/Dec/2004
Back home