|
This page is specific to Ubuntu versions 8.04, 8.10, 9.04, 9.10, 10.04, 10.10 |
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
The Trivial File Transfer Protocol (TFTP) is a protocol used by LTSP clients to download some necessary files (pxelinux.0, vmlinuz and initrd.img) very early in their boot process, and lts.conf a bit later. tftpd-hpa is used by default as the tftp daemon in Ubuntu. Here are some steps that may help in troubleshooting tftpd-related problems.
Is tftpd-hpa running?
tftpd listens on port 69. To check if tftpd-hpa is running, on Lucid, run:
$ sudo status tftpd-hpa tftpd-hpa start/running, process 1760
On Ubuntu versions prior to Lucid, run:
$ ss -anup | grep :69
UNCONN 0 0 *:69 *:* users(("in.tftpd",...))
tftpd-hpa isn't running
If it isn't running, check your configuration files:
On Lucid
On Lucid, tftpd-hpa is started as a standalone daemon from upstart. So,
$ grep tftp /etc/inetd.conf
should return nothing. There were some bug reports about /etc/default/tftpd-hpa not being correct though, usually on upgrades. Verify that it contains the following:
# /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure"
Then, start tftpd-hpa by running:
sudo start tftpd-hpa
On Karmic or previous versions
On previous Ubuntu versions tftpd-hpa was started from inetd:
$ grep tftp /etc/inetd.conf tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
If your output doesn't match the line above, modify inetd.conf appropriately. Also check that /etc/default/tftpd-hpa is as follows:
#Defaults for tftpd-hpa RUN_DAEMON="no" OPTIONS="-l -s /var/lib/tftpboot"
Finally, restart openbsd-inetd so that tftpd-hpa is reloaded:
sudo invoke-rc.d openbsd-inetd restart
Verify that the tftp files are there
To verify that the files needed for PXE booting the clients are actually there, run the following as a normal user, and check both the files and their permissions:
$ ls -l /var/lib/tftpboot/ltsp/i386 -rw-r--r-- 1 root root 651618 2010-08-19 09:10 abi-2.6.32-24-generic -rw-r--r-- 1 root root 115905 2010-08-19 09:10 config-2.6.32-24-generic lrwxrwxrwx 1 root root 28 2010-08-23 22:39 initrd.img -> initrd.img-2.6.32-24-generic -rw-r--r-- 1 root root 8982381 2010-08-23 22:39 initrd.img-2.6.32-24-generic -rw-r--r-- 1 root root 7686 2010-08-26 01:47 lts.conf lrwxrwxrwx 1 root root 25 2010-08-23 22:39 nbi.img -> nbi.img-2.6.32-24-generic -r--r--r-- 1 root root 13010842 2010-08-23 09:15 nbi.img-2.6.32-24-generic -rw-r--r-- 1 root root 14776 2010-08-23 09:15 pxelinux.0 drwxr-xr-x 2 root root 4096 2010-08-23 09:15 pxelinux.cfg -rw-r--r-- 1 root root 1689036 2010-08-19 09:10 System.map-2.6.32-24-generic -rw-r--r-- 1 root root 1196 2010-08-19 09:12 vmcoreinfo-2.6.32-24-generic lrwxrwxrwx 1 root root 25 2010-08-23 22:39 vmlinuz -> vmlinuz-2.6.32-24-generic -rw-r--r-- 1 root root 4034976 2010-08-19 09:10 vmlinuz-2.6.32-24-generic
If the directory is missing, it's possible that you didn't run ltsp-build-client yet. If you did run ltsp-build-client, then you may have experienced a bug where the files go to /srv/tftp instead. If so, move them to /var/lib/tftpboot.
Use an external tftp client
If your clients won't boot after the steps above, and you're suspecting that something is still wrong with your server (e.g. some firewall), then you can try installing the tftp client, either on the LTSP server itself, or better yet, on a separate workstation:
sudo apt-get install tftp-hpa
Then, try the following commands to make sure that tftpd-hpa is working as expected:
$ cd /tmp $ tftp 10.160.31.10 -v -m binary -c get /ltsp/i386/pxelinux.0 mode set to octet Connected to 10.160.31.10 (10.160.31.10), port 69 getting from 10.160.31.10:/ltsp/i386/pxelinux.0 to pxelinux.0 [octet] Received 14776 bytes in 0.0 seconds [2672575 bit/s]
...where 10.160.31.10 in the example stands for the LTSP server IP.
Check /etc/ltsp/dhcpd.conf
If you can download pxelinux.0 from a tftp client but your clients won't boot, it's possible that they're trying to download the wrong file, or that they're trying to contact the wrong server. The dhcp3-server configuration file, /etc/ltsp/dhcpd.conf, is used to tell the clients where to find pxelinux.0, using the filename directive, and which server to contact, using the next-server directive (not needed when the tftp daemon is running on the LTSP server). Verify that it looks like the following example:
#
# Default LTSP dhcpd.conf config file.
#
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.20 192.168.0.250;
option domain-name "example.com";
option domain-name-servers 192.168.0.1;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
# next-server 192.168.0.1;
# get-lease-hostnames true;
option subnet-mask 255.255.255.0;
option root-path "/opt/ltsp/i386";
if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
filename "/ltsp/i386/pxelinux.0";
} else {
filename "/ltsp/i386/nbi.img";
}
}If you modify that file, you'll have to restart dhcp3-server by running:
sudo invoke-rc.d dhcp3-server restart
Use gPXE to check the client side
If you followed all the previous paragraphs and your clients still won't boot, it's possible that somehow they receive wrong DHCP options, for example in the case when there's a rogue DHCP server on your network. gPXE (former Etherboot) is an open source network bootloader, which can be used to check that the client actually receives the correct DHCP options. Download a bootable CD, floppy, or USB image from http://rom-o-matic.net/, boot with it, press Ctrl+B to enter the gPXE command prompt, and run the following commands:
dhcp net0 config
Verify that next-server corresponds to the IP of your LTSP server, and that the filename option is /ltsp/i386/pxelinux.0.
See Also
UbuntuLTSP - Community Ubuntu LTSP Documentation.
http://rom-o-matic.net/ - gPXE CD/floppy/USB images for troubleshooting network booting.