Make your own free website on

4.4. 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 many machines, a BOOTP server , or DHCP server.

BOOTP is an IP protocol that informs a computer of its IP address and where on the network to obtain a boot image. The DHCP (Dynamic Host Configuration Protocol) is a more flexible, backwards-compatible extension of BOOTP. Some systems can only be configured via DHCP.

For PowerPC, if you have a NewWorld Power Macintosh machine, it is a good idea to use DHCP instead of BOOTP. Some of the latest machines are unable to boot using BOOTP.

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.4.1. Setting up BOOTP server

There are two BOOTP servers available for GNU/Linux, the CMU bootpd and the other is actually a DHCP server, ISC dhcpd, which are contained in the bootp and dhcp packages in Ubuntu.

To use CMU bootpd, you must first uncomment (or add) the relevant line in /etc/inetd.conf. On Ubuntu or Debian GNU/Linux, you can run update-inetd --enable bootps, then /etc/init.d/inetd reload to do so. Elsewhere, the line in question should look like:

bootps  dgram  udp  wait  root  /usr/sbin/bootpd  bootpd -i -t 120

Now, you must create an /etc/bootptab file. This has the same sort of familiar and cryptic format as the good old BSD printcap, termcap, and disktab files. See the bootptab manual page for more information. For CMU bootpd, you will need to know the hardware (MAC) address of the client. Here is an example /etc/bootptab:


You will need to change at least the "ha" option, which specifies the hardware address of the client. The "bf" option specifies the file a client should retrieve via TFTP; see Section 4.4.4, “Move TFTP Images Into Place” for more details.

By contrast, setting up BOOTP with ISC dhcpd is really easy, because it treats BOOTP clients as a moderately special case of DHCP clients. Some architectures require a complex configuration for booting clients via BOOTP. If yours is one of those, read the section Section 4.4.2, “Setting up a DHCP server”. Otherwise, you will probably be able to get away with simply adding the allow bootp directive to the configuration block for the subnet containing the client, and restart dhcpd with /etc/init.d/dhcpd restart.

4.4.2. Setting up a DHCP server

One free software DHCP server is ISC dhcpd. In Ubuntu, this is available in the dhcp package. Here is a sample configuration file for it (usually /etc/dhcpd.conf):

option domain-name "";
option domain-name-servers;
option subnet-mask;
default-lease-time 600;
max-lease-time 7200;
server-name "servername";

subnet netmask {
  option routers;

host clientname {
  filename "/tftpboot/tftpboot.img";
  server-name "servername";
  next-server servername;
  hardware ethernet 01:23:45:67:89:AB; 

Note: the new (and preferred) dhcp3 package uses /etc/dhcp3/dhcpd.conf.

In this example, there is one server "servername" which performs all of the work of DHCP, server, TFTP server, and network gateway. You will almost certainly need to change the domain-name options, as well as the server name and client hardware address. The "filename" option should be the name of the file which will be retrieved via TFTP.

After you have edited the dhcpd configuration file, restart it with /etc/init.d/dhcpd restart.

4.4.3. 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

Ubuntu 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 an Ubuntu or Debian machine, run /etc/init.d/inetd reload; on other machines, find out the process ID for inetd, and run kill -HUP inetd-pid.

4.4.4. Move TFTP Images Into Place

Next, place the TFTP boot image you need, as found in Section 4.2.1, “Where to Find Installation Images”, 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.

On NewWorld Power Macintosh machines, you will need to set up the yaboot boot loader as the TFTP boot image. Yaboot will then retrieve the kernel and RAMdisk images via TFTP itself. For net booting, use the yaboot-netboot.conf. Just rename this to yaboot.conf in the TFTP directory.