r9 - 04 Feb 2008 - 05:07:04 - MarkStosbergYou are here: TWiki >  Ltsp Web  > TFTP

TFTP

Warning about dhcpd-3.0.3 and above

The most recent release of ISC's dhcp server (version 3.0.3) has a change in behaviour in how it handles the IP address of the TFTP server. In previous versions, the IP address of the TFTP server was defaulted to be the same as the IP address of the DHCP server (Unless otherwise specified by the next-server option). The new behaviour is to set the IP address of the TFTP server to all zeros. This causes a problem for Etherboot and some PXE bootroms.

Fortunately, there's an easy fix. If you are using ISC dhcpd v3.0.3, and you've noticed that your clients no longer can grab the kernel via TFTP, then you need to take a look at This document

Troubleshooting

File Not Found

If you are getting a 'File Not Found' message when the workstation is trying to download a kernel, then it's likely a problem with either TFTP or DHCP.

dhcp and tftpd work together, to provide you with the location of a kernel, and the ability to dowload it.

First thing you need to do is figure out which TFTP server you have installed. In the world of Ubuntu and Debian, there are 3 to choose from.

  • tftpd
  • atftpd
  • tftpd-hpa

the tftpd package is the old BSD based tftp server. If you are using PXE, you shouldn't be using this server. It doesn't support some of the options that PXE needs.

the atftpd package is the 'Advanced tftp server'. I'm not sure what about it is 'advanced', but it works quite well. It's the one that I use.

the tftpd-hpa is the 'H. Peter Anvin' implementation of tftpd. He's the syslinux/pxelinux kernel hacker guy. He's written a very nice tftp server, and I think most people using Ubuntu are using his version of tftpd.

The reason you need to know which one you are using, is because the tftpd-hpa honors the

      -s /some-path

option, which means that it will automatically prepend the value of '/some-path' to the front of whatever dhcpd says is the 'filename'. This means, that if the 'filename' entry looks like this:

     filename          "/lts/2.4.26-ltsp-3/pxelinux.0";

And, the 'some-path' is set like this: -s /tftpboot Then, The full pathname of the file should be:

    /tftpboot/lts/2.4.26-ltsp-3/pxelinux.0

the 'atftpd' doesn't honor the '-s' flag, but it DOES allow you to specify a directory to allow downloads from. That is, you can still set the '/some-path', but it doesn't automatically prepend that value onto the filename parameter from dhcpd. Instead, it just makes sure that the file you are trying to download exists within that '/some-path'. So, if atftpd is configured for serving files from /tftpboot, your 'filename' entry in dhcpd.conf should look like this:

    filename        "/tftpboot/2.4.26-ltsp-3/pxelinux.0";

Which ever tftpd package you are using, on Debian and Ubuntu, they are all configured in the /etc/inetd.conf file. Just take a look in that file, and see what the LAST argument is for the 'tftp' line.

On my box, which uses atftpd, the line from /etc/inetd.conf looks like this:

   tftp    dgram   udp     wait    nobody /usr/sbin/tcpd /usr/sbin/in.tftpd  /tftpboot

There can be lots of other options on that line, for controlling things like multicast, and timeouts, but they aren't needed for LTSP booting.

In the end, my guess for why it's not working for you, is you've got the wrong path at the end of the tftp line in /etc/inetd.conf. If that's the case, you'll need to edit your /etc/inetd.conf file and change it to look in /tftpboot. Then, restart inetd.

Compaq Deskpro EN SFF

For the Compaq Deskpro EN SFF with the 686T5 ROM, the TFTP timeout is solved by upgrading the firmware, which is available here The ROM number is mentioned in the BIOS.

TFTP Configuration

TFTP is the protocol a terminal uses to download the kernel and initrd during the boot process. The DHCP configuration will tell ther terminal which file to download. Thus, it is likely a good idea to configure DHCP first.

Your LTSP server may be using (x)inetd or an init script to start the TFTP server. One of the below files should exist, but likely not both.

xinetd style, edit /etc/xinetd.d/tftpd file

service tftp
{
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -v -v -v -v -s /tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
NB: the multiple -v increases the verbosity of tftp reporting in /var/log/messages

inetd style, edit /etc/inetd.d/tftpd file or /etc/inetd.conf file

# Example from /etc/inetd.conf on ubuntu linux
# <servicename>  <sock-type>  <proto>  <flags>  <user>  <server-path>     <args>
tftp             dgram        udp      wait     root    /usr/bin/in.tftpd /usr/bin/in.tftpd -r blksize -s /tftpboot
The option "-r blksize" was added to please Intel's 0.99 series of PXE stack (see also http://syslinux.zytor.com/hardware.php if you have weird problems with TFTP and PXE). The option "-s" is followed by the 'change root' directory where the downloadable files are located. On ubuntu, that is in /var/lib/tftpboot. -- TomWelter - 23 Aug 2005

The aftpd packages does not handle the --no-blksize option, so I recommend the tftpd-hpa package if the hardware has this issue (Compaq Deskpro EN SFF) -- GyulaSzabo - 03 Dec 2005


init script style, edit /etc/conf.d/in.tftpd file

# Example from Gentoo box
INTFTPD_PATH="/tftpboot"
INTFTPD_OPTS="-s -l ${INTFTPD_PATH}"

Notice that the above configuration points tftpd to /tftpboot for the files to serve. If your DHCP config contains a line like this: filename = "/lts/vmlinuz-2.4.26-ltsp-1";, then the tftpd server will try to send the file: /tftpboot/lts/vmlinuz-2.4.26-ltsp-1 to the client. You may wish to be sure your DHCP config doesn't prepend /tftpboot to the filename option. If it does, the tftp server will try to send /tftpboot/tftpboot/lts/vmlinuz-2.4.26-ltsp-1 to the clients, which likely doesn't exist.

Of course, you should also make sure that the path and file referenced by the DHCP config exists in the specified location. If it does not, your terminal will stop booting with a kernel panic.

Verify TFTP server is running

To verify the TFTP server is running on your LTSP server, use the following command:

   # netstat -apn | grep ":69 "

You should see a line like this returned:

   udp      0    0 0.0.0.0:69           0.0.0.0:*                    6122/in.tftpd

If the TFTP server is not running, run the following command:

   # /etc/init.d/in.tftpd start

Then, double check to see if the server is running, using the above netstat command.

Once the TFTP server is running, you are ready to move on to configuring your NFS exports.

-- SteveSwitzer - 07 Dec 2004

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r9 < r8 < r7 < r6 < r5 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback