4.3. Preparing Files for TFTP Net Booting

If your machine is connected to a local area network, you may be able to boot it over the network from another machine, using TFTP. If you intend to boot the installation system from another machine, the boot files will need to be placed in specific locations on that machine, and the machine configured to support booting of your specific machine.

You need to setup a TFTP server, and for CATS machines, a BOOTP server .

The Trivial File Transfer Protocol (TFTP) is used to serve the boot image to the client. Theoretically, any server, on any platform, which implements these protocols, may be used. In the examples in this section, we shall provide commands for SunOS 4.x, SunOS 5.x (a.k.a. Solaris), and GNU/Linux.

4.3.1. Enabling the TFTP Server

To get the TFTP server ready to go, you should first make sure that tftpd is enabled. This is usually enabled by having something like the following line in /etc/inetd.conf:


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

Debian packages will in general set this up correctly by default when they are installed.

Look in that file and remember the directory which is used as the argument of in.tftpd; you'll need that below. The -l argument enables some versions of in.tftpd to log all requests to the system logs; this is useful for diagnosing boot errors. If you've had to change /etc/inetd.conf, you'll have to notify the running inetd process that the file has changed. On a Debian machine, run /etc/init.d/inetd reload; on other machines, find out the process ID for inetd, and run kill -HUP inetd-pid.

If your TFTP server is a GNU/Linux box running Linux 2.4.X you'll need to set the following on your server:


echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc

to turn off Path MTU discovery, otherwise the Indy's PROM can't download the kernel. Furthermore, make sure TFTP packets are sent from a source port no greater than 32767, or the download will stall after the first packet. Again, it's Linux 2.4.X tripping this bug in the PROM, and you can avoid it by setting


echo "2048 32767" > /proc/sys/net/ipv4/ip_local_port_range

to adjust the range of source ports the Linux TFTP server uses.

4.3.2. Move TFTP Images Into Place

Next, place the TFTP boot image you need, as found in Paragraaf 4.2.3, “Where to Find Installation Files”, in the tftpd boot image directory. Generally, this directory will be /tftpboot. You'll have to make a link from that file to the file which tftpd will use for booting a particular client. Unfortunately, the file name is determined by the TFTP client, and there are no strong standards.

Often, the file that the TFTP client will look for is client-ip-in-hexclient-architecture. To compute client-ip-in-hex, take each byte of the client IP address and translate it into hexadecimal notation. If you have a machine handy with the bc program, you can use the program. First issue the obase=16 command to set the output to hex, then enter the individual components of the client IP one at a time. As for client-architecture, try out some values.

4.3.2.1. SGI Indys TFTP Booting

On SGI Indys you can rely on the bootpd to supply the name of the TFTP file. It is given either as the bf= in /etc/bootptab or as the filename= option in /etc/dhcpd.conf.

4.3.3. TFTP Installation for Low-Memory Systems

On some systems, the standard installation RAMdisk, combined with the memory requirements of the TFTP boot image, cannot fit in memory. In this case, you can still install using TFTP, you'll just have to go through the additional step of NFS mounting your root directory over the network as well. This type of setup is also appropriate for diskless or dataless clients.

First, follow all the steps above in Paragraaf 4.3, “Preparing Files for TFTP Net Booting”.

  1. Copy the Linux kernel image on your TFTP server using the a.out image for the architecture you are booting.

  2. Untar the root archive on your NFS server (can be the same system as your TFTP server):

    
    # cd /tftpboot
    # tar xvzf root.tar.gz
    
    

    Be sure to use the GNU tar (other tar programs, like the SunOS one, badly handle devices as plain files).

  3. Export your /tftpboot/debian-sparc-root directory with root access to your client. E.g., add the following line to /etc/exports (GNU/Linux syntax, should be similar for SunOS):

    
    /tftpboot/debian-sparc-root client(rw,no_root_squash)
    
    

    NOTE: "client" is the host name or IP address recognized by the server for the system you are booting.

  4. Create a symbolic link from your client IP address in dotted notation to debian-sparc-root in the /tftpboot directory. For example, if the client IP address is 192.168.1.3, do

    
    # ln -s debian-sparc-root 192.168.1.3
    
    

4.3.4. Installing with TFTP and NFS Root

Installing with TFTP and NFS Root is similar to Paragraaf 4.3.3, “TFTP Installation for Low-Memory Systems” because you don't want to load the RAMdisk anymore but boot from the newly created NFS-root file system. You then need to replace the symlink to the tftpboot image by a symlink to the kernel image (for example, linux-a.out).

RARP/TFTP requires all daemons to be running on the same server (the workstation is sending a TFTP request back to the server that replied to its previous RARP request).