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:
-
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.
-
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. Themenu.c32
andpxelinux.0
files are located in thesyslinux
installation directory on the PXE server (usually, this is the/usr/share/syslinux
or/usr/lib/syslinux
directory). -
-
Create the
/tftpboot/pxelinux.cfg
directory, and inside this directory, make thedefault
file. -
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 forsyslinux
and its man pages. -
Restart the
xinetd
service:# /etc/init.d/xinetd restart
- 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/
.