Saturday, September 3, 2011

Setting Up a PXE Server

This section discusses how to set up a Pre-boot eXecution Environment(PXE) boot server for machines that cannot boot from CD, DVD, or USB media. PXE is a special extension of services provided by the Dynamic HostConfiguration Protocol (DHCP). It uses a Trivial File Transfer Protocol(TFTP) server to provide minimal boot files to a network client. To set up a PXE boot service on a separate Fedora server on the local network, follow this procedure:
1.   Install the tftp-server, dhcp, and syslinux packages:
2.    su -c 'yum install tftp-server
·                dhcp syslinux'
3.   Edit the /etc/dhcpd.conf file to configure the DHCP server. The following example is a minimal configuration for a network that uses the following configuration:
· addressing
·         Dynamic addresses provided between and
·         DHCP/PXE server at IP address
·         No other dynamic configuration provided
4.    allow booting;
5.    allow bootp;
6.    ddns-update-style interim;
7.    ignore client-updates;
9.    subnet netmask {
10.      option subnet-mask;
11.      option broadcast-address;
12.      range dynamic-bootp;
13.      next-server;
14.      filename "pxelinux.0";
15. }

16.               As the root user, copy the PXE boot image and Fedora boot files to the TFTP server directory.

17. su -
18. cd /tftpboot
cp /usr/lib/syslinux/pxelinux.0 .
19.               Copy the vmlinuz and initrd.img files from the pxeboot directory on distribution media or a Web mirror to the /tftpboot directory.
20.               Create a minimal /tftpboot/pxelinux.cfg file:
21. DEFAULT pxeboot
22. TIMEOUT 50
23. LABEL pxeboot
24.       KERNEL vmlinuz
25.       APPEND initrd=initrd.img
26.               Turn on the dhcpdxinetd and tftp services:
27. su -c '/sbin/service dhcpd start'
28. su -c '/sbin/service xinetd start'
su -c '/sbin/chkconfig tftp on'
Boot the client system and either use the required keys or configure its BIOS to boot from its network interface using PXE. At the boot prompt, hitEnter to boot the default Fedora installation image. If an error occurs, the system boots in its normal configuration, such as a local hard disk.