PXE Network Installations

Red Hat Enterprise Linux allows for installation over a network using the NFS, FTP, or HTTP protocols. A network installation can be started from a network boot diskette, a boot CD-ROM, or by using the askmethod boot option with the Red Hat Enterprise Linux CD #1. Alternatively, if the system to be installed contains a network interface card (NIC) with Pre-Execution Environment (PXE) support, it can be configured to boot from files on another system on the network instead of a diskette or CD-ROM.
For a PXE network installation, the client's NIC with PXE support sends out a broadcast request for DHCP information. The DHCP server provides the client with an IP address, other network information such as name server, the IP address or hostname of the tftp server (which provides the files necessary to start the installation program), and the location of the files on the tftp server. This is possible because of PXELINUX, which is part of the syslinux package.
The following steps must be performed to prepare for a PXE installation:

  1. Configure the network (NFS, FTP, HTTP) server to export the installation tree.


  2. Configure the files on the tftp server necessary for PXE booting.


  3. Configure which hosts are allowed to boot from the PXE configuration.


  4. Start the tftp service.


  5. Configure DHCP.

  6. Boot the client, and start the installation.

Setting up the Network Server

First, configure an NFS, FTP, or HTTP server to export the entire installation tree for the version and variant of Red Hat Enterprise Linux to be installed. Refer to the section Preparing for a Network Installation in the Red Hat Enterprise Linux Installation Guide for detailed instructions.

PXE Boot Configuration

The next step is to copy the files necessary to start the installation to the tftp server so they can be found when the client requests them. The tftp server is usually the same server as the network server exporting the installation tree.
To copy these files, run the Network Booting Tool on the NFS, FTP, or HTTP server. A separate PXE server is not necessary.
For the command line version of these instructions, refer to Section 14.2.1 Command Line Configuration.
To use the graphical version of the Network Booting Tool, you must be running the X Window System, have root privileges, and have the redhat-config-netboot RPM package installed. To start the Network Booting Tool from the desktop, go to the Main Menu Button (on the Panel) => System Settings => Server Settings => Network Booting Service. Or, type the command redhat-config-netboot at a shell prompt (for example, in an XTerm or a GNOME terminal).
If starting the Network Booting Tool for the first time, select Network Install from the First Time Druid. Otherwise, select Configure => Network Installation from the pull-down menu, and then click Add. The dialog in Figure 14-1 is displayed.

Figure 14-1. Network Installation Setup
Provide the following information:

  • Operating system identifier — Provide a unique name using one word to identify the Red Hat Enterprise Linux version and variant. It is used as the directory name in the /tftpboot/linux-install/ directory.


  • Description — Provide a brief description of the Red Hat Enterprise Linux version and variant.


  • Select protocol for installation — Select NFS, FTP, or HTTP as the network installation type depending on which one was configured previously. If FTP is selected and anonymous FTP is not being used, uncheck Anonymous FTP and provide a valid username and password combination.


  • Server — Provide the IP address or domain name of the NFS, FTP, or HTTP server.

  • Location — Provide the directory shared by the network server. If FTP or HTTP was selected, the directory must be relative to the default directory for the FTP server or the document root for the HTTP server. For all network installations, the directory provided must contain the RedHat/ directory of the installation tree.
After clicking OK, the initrd.img and vmlinuz files necessary to boot the installation program are transfered from images/pxeboot/ in the provided installation tree to /tftpboot/linux-install// on the tftp server (the one you are running the Network Booting Tool on).

14.2.1. Command Line Configuration

If the network server is not running X, the pxeos command line utility, which is part of the redhat-config-netboot package, can be used to configure the tftp server 
pxeos -a -i "" -p  -D 0 -s client.example.com \
-L  
The following list explains the options:

  • -a — Specifies that an OS instance is being added to the PXE configuration.

  • -i "" — Replace "" with a description of the OS instance. This corresponds to the Description field in Figure 14-1.

  • -p


  • -D 0 — Indicates that it is not a diskless configuration since pxeos can be used to configure a diskless environment as well.

  • -s client.example.com — Provide the name of the NFS, FTP, or HTTP server after the -s option. This corresponds to the Server field in Figure 14-1.
  • -L — Provide the location of the installation tree on that server after the -L option. This corresponds to the Location field in Figure 14-1.
  • — Specify the OS identifier, which is used as the directory name in the /tftpboot/linux-install/ directory. This corresponds to the Operating system identifier field in Figure 14-1.
If FTP is selected as the installation protocol and anonymous login is not available, specify a username and password for login, with the following options before in the previous command:
-A 0 -u  -p 



Adding PXE Hosts

After configuring the network server, the interface as shown in Figure 14-2 is displayed.

Figure 14-2. Add Hosts
The next step is to configure which hosts are allowed to connect to the PXE boot server. For the command line version of this step, refer to Section 14.3.1 Command Line Configuration.
To add hosts, click the New button.

Figure 14-3. Add a Host
Enter the following information:

  • Hostname or IP Address/Subnet — Enter the IP address, fully qualified hostname, or a subnet of systems that should be allowed to connect to the PXE server for installations.


  • Operating System — Select the operating system identifier to install on this client. The list is populated from the network install instances created from the Network Installation Dialog.


  • Serial Console — Select this option to use a serial console.

  • Kickstart File — Specify the location of a kickstart file to use such as http://server.example.com/kickstart/ks.cfg. This file can be created with the Kickstart Configurator. Refer to Chapter 10 Kickstart Configurator for details.
Ignore the Snapshot name and Ethernet options. They are only used for diskless environments.

Command Line Configuration

If the network server is not running X, the pxeboot utility, a part of the redhat-config-netboot package, can be used to add hosts which are allowed to connect to the PXE server:
pxeboot -a -O  -r  
The following list describes the options:

  • -a — Specifies that a host is to be added.

  • -O — Replace with the operating system identifier as defined in Section 14.2 PXE Boot Configuration.

  • -r — Replace with the ram disk size

  • — Replace with the IP address or hostname of the host to add.

    Starting the tftp Server

    On the DHCP server, verify that the tftp-server package is installed with the command rpm -q tftp-server. If it is not installed, install it via Red Hat Network or the Red Hat Enterprise Linux CD-ROMs. For more information on installing RPM packages, refer to Part III Package Management.
    tftp is an xinetd-based service; start it with the following commands:

    /sbin/chkconfig --level 345 xinetd on
    /sbin/chkconfig --level 345 tftp on
    This command configures the tftp and xinetd services to immediately turned on and also configures them to start at boot time in runlevels 3, 4, and 5.




    Configuring the DHCP Server

    If a DHCP server does not already exist on the network, configure one. Refer to Chapter 25 Dynamic Host Configuration Protocol (DHCP) for details. Make sure the configuration file contains the following so PXE booting is enabled for systems that support it:

    allow booting;
    allow bootp;
    class "pxeclients" {
       match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
       next-server ;
       filename "linux-install/pxelinux.0";
    }
    The IP address that follows the next-server option should be the IP address of the tftp server.

    Performing the PXE Installation

    For instructions on how to configure the network interface card with PXE support to boot from the network, consult the documentation for the NIC. It varies slightly per card.

    That's all for pxe boot env.















No comments:

Post a Comment