View Source

To use PXE Network Boot, you need a working DHCP server and TFTP server ([Prerequisites for using PXE network boot]).

To install the TFTP server on the Linux distribution that supports {{yum}}, such as Fedora and CentOS, run the following command:

{code}yum -y install tftp-server{code}

Other Linux distributions and Unix variants have their own methods of software installation. For example, on distributions that support aptitude, such as Debian and Ubuntu, a TFTP server can be installed with the command:

{code}apt-get install tftpd-hpa{code}

After the installation, you will need to configure the TFTP server. This server runs from the super-server {{xinetd}} and has a service configuration file in the {{/etc/xinetd.d}} directory. The file in the {{/etc/xinetd.d}} directory is usually installed with a TFTP server. But if the file in {{/etc/xinetd.d}} is missing, you can create the file or record using your favorite text editor. An example of a file (named {{/etc/xinetd.d/tftp}}) is provided below:

{{service tftp}}
{{socket_type   = dgram}}
{{protocol   = udp}}
{{wait   = yes}}
{{user   = root}}
{{server   = /usr/sbin/in.tftpd}}
{{server_args    = \-s /tftpboot}}

{color:red}{{{}disable   = no{}}}{color}

{{per_source   = 11}}
{{cps   = 100 2}}
{{flags   = IPv4}}


By default, the TFTP server is disabled and this line looks like {{disable = yes}}. To enable it, change the line to {{disable = no}} ({color:red}highlighted in red{color}). After saving the changes in the file, restart {{xinetd}} with the following command:

{code}/etc/init.d/xinetd restart{code}

To test the TFTP server, you can copy {{/bin/ls}} (exists in every Linux) to the {{/tftpboot}} directory. Using a computer with Linux, open shell and execute the following command:

{code}tftp <TFTP server IP address> -c get ls{code}

If the TFTP server works, the command will not return any output and the file {{ls}} should appear in the current directory.
{info:title=Note}The TFTP client (tftp command) is not included in CentOS and Fedora by default. This can result in "{{tftp: command not found}}" errors. If you see such an error, install the TFTP client with the command

{code}yum install tftp{code}

Or, on Ubuntu or Debian,

{code}apt-get install tftp-hpa{code}
{info}{excerpt:hidden=true}Instructions on how to configure TFTP server on Linux for PXE network boot bare-metal restore method.{excerpt}