NFS Configuration
NFS is the protocol a terminal uses to mount the LTSP filesystem from the server. The terminal will then perform a pivotroot to make the remote filesystem the new root, andcontinue with the sysinit process. This process reads the configuration for the terminal from the
lts.conf file and
Configuring the exports
Your LTSP server will need to be configured to export a directory or two over NFS. You will need to make sure the
/etc/exports file contains entries like the following:
edit /etc/exports file
# /etc/exports: NFS file systems being exported. See exports(5).
/var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0(rw,no_root_squash,async)
/opt/ltsp/i386 192.168.0.0/255.255.255.0(ro,no_root_squash,sync)
Notice that the above configuration exports two directories. The
/var/opt/ltsp/swapfiles export may only be required if you wish to add some swap space to the terminals with low memory and/or local apps. The
/opt/ltsp/i386 export is required for LTSP to work, and also must match the path that the
option root-path line uses in your
DHCP config.
Of course, if these lines don't match, the IP address is wrong in the same
DHCP line, or NFS is unavailable on the server, your terminal will stop booting with a kernel panic.
Verify NFS server is running
To verify the NFS server is running on your LTSP server, use the following command:
# showmount 192.168.0.2 -e
If the server adress is 192.168.02
You should see a couple lines like this returned:
Export list for cyclone:
/var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0
/opt/ltsp/i386 192.168.0.0/255.255.255.0
If the NFS server is not running, run the following command:
# /etc/init.d/nfs start
Then, double check to see if the server is running, using the above showmount command.
NFS uses portmapper, and can sometimes be tricky to get working. If you experience troubles, you may request help in the
#ltsp channel on
irc.freenode.net.
Once the NFS server is running, you are ready to move on to configuring
XDMCP.
--
SteveSwitzer - 07 Dec 2004
NFS Server not responding
There's a problem that many people have had with fast server cards and
slow client cards when a 2.6.x kernel is used on the server.
The message is something like:
nfs warning: server not responding
The problem is caused by the 2.6 kernels using a large default blocksize
for
NFS packets. The 2.6 kernels use 32k blocks, where the older
kernels used 8k blocks. What happens is the 32k byte blocks need to be
broken down into 1500 byte datagrams. Simple math will tell you that
you need a whole lot more 1500 byte datagrams to make up a full 32kbyte
block. Sending those datagrams to a 10mbit card takes too long for all
of the datagrams to get there, so the
NFS client times out before
getting all of the fragments.
Fortunately, there's an easy fix.
You need to pass some options to the client to tell it to use smaller
block sizes for
NFS.
Take a look at
KernelOptions for more info passing command line args to the kernel.
Solution when using Etherboot
You'll need to add the following lines to your dhcpd.conf file.
option option-128 code 128 = string;
option option-129 code 129 = text;
option option-128 e4:45:74:68:00:00;
option option-129 "MOPTS=nolock,ro,wsize=2048,rsize=2048";
If you are wondering what the
e4:45:74:68:00:00 is, read the
KernelOptions page to learn about something called an "Etherboot Signature".
Solution when using PXE
Robbie had success with append NFSOPTS="-o etx"
You'll need to add the options to the pxelinux config file. By default, the config file is
/tftpboot/lts/2.4.26-ltsp-3/pxelinux.cfg/default
prompt 0
label linux
kernel bzImage-2.4.26-ltsp-3
append init=/linuxrc rw root=/dev/ram0 initrd=initrd-2.4.26-ltsp-3.gz MOPTS=nolock,ro,wsize=2048,rsize=2048
Different syntax in ubuntu's LTSP version
The init script in the ubuntu version of LTSP has a little different syntax:
The config file is
/var/lib/tftpboot/ltsp/pxelinux.cfg/default and you have to append
NFSOPTS="-o nolock,ro,wsize=2048,rsize=2048"
or
NFSOPTS="-o nolock,ro,proto=tcp"
More info on kernel args
Take a look at the following wiki article for more info on passing
parameters to the kernel:
http://wiki.ltsp.org/twiki/bin/view/Ltsp/KernelOptions