• Aucun résultat trouvé

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 boot CD-ROM, a bootable flash memory drive, or by using the askm ethod 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 networked system rather than local media such as a 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.

3.1. 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 Installation Guide for detailed instructions.

3.2. 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 3.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 system -config-netboot RPM package installed. To start the Network Booting Tool from the desktop, go to Applications (the main menu on the panel) =>

System Settings => Server Settings => Network Booting Service. Or, type the command system -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 T im e Druid. Otherwise, select Configure => Network Installation from the pulldown menu, and then click Add. The dialog in Figure 3.1, “Network Installation Setup” is displayed.

Figure 3.1. Network Installation Setup

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.

Selects protocol for installation — Selects 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 Anonym ous FT P and provide a valid username and password combination.

Kickstart — Specify the location of the kickstart file. The file can be a URL or a file stored locally (diskette). The kickstart file can be created with the Kickstart Configurator. Refer to Chapter 2, Kickstart Configurator for details.

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.im g and vm linuz files necessary to boot the installation program are transfered from im ages/pxeboot/ in the provided installation tree to

/tftpboot/linux-install/<os-identifier>/ on the tftp server (the one you are running the Network Booting Tool on).

3.2.1. Command Line Configuration

If the network server is not running X, the pxeos command line utility, which is part of the system -config-netboot package, can be used to configure the tftp server files :

pxeos -a -i "<description>" -p <NFS|HTTP|FTP> -D 0 -s client.example.com \ -L

<net-location> -k <kernel> -K <kickstart><os-identifer>

The following list explains the options:

-i "<description>" — Replace "<description>" with a description of the OS instance. This corresponds to the Description field in Figure 3.1, “Network Installation Setup”.

-p <NFS|HTTP|FTP> — Specify which of the NFS, FTP, or HTTP protocols to use for installation.

Only one may be specified. This corresponds to the Select protocol for installation menu in Figure 3.1, “Network Installation Setup”.

-D <0|1> — Specify "0" which indicates that it is not a diskless configuration since pxeos can be used to configure a diskless environment as well.

-sclient.example.com — Provide the name of the NFS, FTP, or HTTP server after the -s option.

This corresponds to the Server field in Figure 3.1, “Network Installation Setup”.

-L<net-location> — Provide the location of the installation tree on that server after the -L option.

This corresponds to the Location field in Figure 3.1, “Network Installation Setup”.

-k<kernel> — Provide the specific kernel version of the server installation tree for booting.

-K<kickstart> — Provide the location of the kickstart file, if available.

<os-identifer> — 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 3.1, “Network Installation Setup”.

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 <os-identifer> in the previous command:

-A 0 -u <username> -p <password>

For more information on command line options available for the pxeos command, refer to the pxeos man page.

3.3. Adding PXE Hosts

After configuring the network server, the interface as shown in Figure 3.2, “Add Hosts” is displayed.

Figure 3.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 3.3.1, “Command Line Configuration”.

To add hosts, click the New button.

Figure 3.3. Add a Host

Enter the following information:

Hostnam e or IP Address/Subnet — 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 — 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 — This option allows use of a serial console.

Kickstart File — The location of a kickstart file to use, such as

http://server.exam ple.com /kickstart/ks.cfg. This file can be created with the Kickstart Configurator. Refer to Chapter 2, Kickstart Configurator for details.

Ignore the Snapshot nam e and Ethernet options. They are only used for diskless environments. For more information on configuring a diskless environment, refer to Chapter 4, Diskless Environments for details.

3.3.1. Command Line Configuration

If the network server is not running X, the pxeboot utility, a part of the system -config-netboot package, can be used to add hosts which are allowed to connect to the PXE server:

pxeboot -a -K <kickstart> -O <os-identifier> -r <value><host>

The following list explains the options:

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

-K<kickstart> — The location of the kickstart file, if available.

-O<os-identifier> — Specifies the operating system identifier as defined in Section 3.2, “PXE Boot Configuration”.

-r<value> — Specifies the ram disk size.

<host> — Specifies the IP address or hostname of the host to add.

For more information on command line options available for the pxeboot command, refer to the pxeboot man page.

3.4. Adding a Custom Boot Message

Optionally, modify /tftpboot/linux-install/m sgs/boot.m sg to use a custom boot message.

3.5. 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.

After the system boots the installation program, refer to the Installation Guide.