How to build and run the OpenBSD kernel with NFSv4 client

I assume you already know how to build kernels.  If not, this FAQ might
help: http://www.openbsd.org/faq/faq5.html

Step 1: Extract the tarball
cd /usr/src/sys (or wherever you keep your kernel sources)
tar xfvz openbsd-3.1-nfsv4-20020912.tar.gz

Step 2: Apply the patches
patch <Patches

Step 3: Config the kernel
Edit your kernel config file. Add the following lines:

option		NFSCLIENT	# Network File System client
option		NFSV4CLIENT
option		NFSV4
option		NFS4_DEBUG

Comment out all other NFS options. For now, NFSv4 can not co-exist with
NFSv3 in the same kernel. We will eventually fix this.

Run "config" in the normal way.

Step 4: Fix the Makefile
cd to your compile subdir.
sed 's/-Werror //' <Makefile >x
mv x Makefile

Step 5: Compile, install, and reboot.

Step 6: Build mount_nfs
Optionally move the mount_nfs subdir to a more convenient location, such as
/usr/src/sbin. Build and copy it to /sbin, after saving the original v3
version. It must be named "mount_nfs" so that "mount" can find it.

cd mount_nfs; make mount_nfs
mv /sbin/mount_nfs /sbin/mount_nfs-
cp mount_nfs /sbin

Step 7: Mount your v4 server
mount_nfs servername:/ /mnt

Problems?  Questions?  Send mail to nfsv4-wg@citi.umich.edu.
