2.3. Configuring the TFTP Server

In the next step, you need to configure the TFTP server that you installed in the previous step. This section describes the process of configuring the TFTP server for BIOS-based systems. For information on how to configure the TFTP server for installing OpenVZ on EFI-based systems, see Configuring for EFI in the Red Hat Enterprise Linux Installation Guide at https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-netboot-pxe-config-efi.html.

To configure the TFTP server:

  1. On the PXE server, open the /etc/xinetd.d/tftp file, and edit it as follows:

    service tftp
    {
    disable         = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -v -s /tftpboot
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
    }

    Once you are done, save the file.

  2. Copy the following files to the /tftpboot directory (if this directory does not exist, create it under the root (/) directory):

    • vmlinuz
    • initrd.img
    • menu.c32
    • pxelinux.0

    These files are necessary to start the installation of OpenVZ. You can find the first two files in the /isolinux directory of the OpenVZ distribution. The menu.c32 and pxelinux.0 files are located in the syslinux installation directory on the PXE server (usually, this is the /usr/share/syslinux or /usr/lib/syslinux directory).

  3. Create the /tftpboot/pxelinux.cfg directory, and inside this directory, make the default file.
  4. Open the default file for editing, and add the following strings to it:

    default menu.c32
    prompt 0
    timeout 100
    ontimeout VZ
    menu title OpenVZ Boot Menu
    label VZ
            menu label Install OpenVZ
            kernel vmlinuz
            append initrd=initrd.img ksdevice=eth0

    For detailed information on the parameters you can specify in the /tftpboot/pxelinux.cfg/default file and their configuration, see the documentation for syslinux and its man pages.

  5. Restart the xinetd service:

    # /etc/init.d/xinetd restart
  6. If necessary, configure your firewall on the PXE server to allow access to the TFTP server.

Note

Note: When running the TFTP server, you might get the "Permission denied" error. In this case, you may try to fix the problem by running the following command on the server: # restorecon -Rv /tftboot/.