Chapter 24. Preparing for a Network Installation
A network installation using an installation server allows you to install Red Hat Enterprise Linux on multiple systems using a network boot server. This way, all systems configured to do so will boot using an image provided by this server and start the installation program automatically.
Note
Red Hat Satellite has the ability to automate the setup of a PXE server. See the Red Hat Satellite documentation for more information.
A minimum of two systems is required for a network installation:
- A server - a system running a DHCP server, a TFTP server to provide boot files, and an HTTP, FTP or NFS server which hosts the installation image. Theoretically, each of the servers can run on a different physical system; procedures in this section assume a single system runs all of them for simplicity.
- A client - the system which you are installing Red Hat Enterprise Linux to. When the installation begins, the client will query the DHCP server, obtain boot files from the TFTP server, and download the installation image from the HTTP, FTP or NFS server.
Unlike most other means of installation, no physical boot media is required to be plugged in the client (that is, the system you are installing into) in order to begin the installation. This chapter describes the steps you must take to prepare for network installations.
The following steps must be performed to prepare for a network installation:
- Configure the network server (
NFS
,HTTPS
,HTTP
, orFTP
) to export the installation tree or the installation ISO image. For procedures describing the configuration, see Section 3.3.3, “Installation Source on a Network”. - Configure the files on the tftp server necessary for network boot, configure
DHCP
, and start thetftp
service on the PXE server. See Section 24.1, “Configuring Network Boot Services” for details.Important
The GRUB2 boot loader supports network boot fromHTTP
in addition to a tftp server. However, obtaining boot files (the kernel and initial ram disk for the installer) over this protocol is very slow and suffers a risk of timeout failures. Using a tftp server to provide the boot files is recommended.This warning only applies to the kernel and initial ram disk (vmlinuz
andinitrd
). Obtaining the installation source from anHTTP
server does not carry this risk. - Boot the client (the system you want to install Red Hat Enterprise Linux on) and start the installation.
Note
The procedures in this chapter describe setting up a network boot server on a Red Hat Enterprise Linux 7 system. For details about configuring network boot on earlier releases of Red Hat Enterprise Linux, see the appropriate Installation Guide for that release.
24.1. Configuring Network Boot Services Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
After setting up a network server containing the package repositories to be used in the installation, the next step is to configure the PXE server itself. This server will contain files necessary to boot the Red Hat Enterprise Linux and start the installation. Additionally, a
DHCP
server must be configured, and all necessary services must be enabled and started.
Note
The network boot configuration procedure differs based on whether the AMD64/Intel 64 system you want to install Red Hat Enterprise Linux on uses BIOS or UEFI. Consult your hardware's documentation to see which system is used on your hardware, and then follow the appropriate procedure in this chapter.
A separate procedure is provided for booting IBM Power Systems from a network location with the GRUB2 boot loader. See Section 24.1.3, “Configuring Network Boot for IBM Power Systems Using GRUB2” for details.
For more information on configuring a network boot server for use with headless systems (systems without a directly connected display, keyboard and mouse), see Chapter 26, Headless Systems.
24.1.1. Configuring a TFTP Server for BIOS-based AMD64 and Intel 64 Clients Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
The following procedure will prepare the PXE server for booting BIOS-based AMD64 and Intel 64 systems. For information on UEFI-based systems, see Section 24.1.2, “Configuring a TFTP Server for UEFI-based AMD64/Intel 64 and ARM Clients”.
Procedure 24.1. Configuring a TFTP Boot Server for BIOS-based Systems
- Install the tftp-server package. To do this, enter the following command as
root
:yum install tftp-server
# yum install tftp-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Allow incoming connections to the
tftp
service in the firewall:firewall-cmd --add-service=tftp
# firewall-cmd --add-service=tftp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The above command only enables access until the next server reboot. To allow access permanently, add the--permanent
option. For more information about firewall configuration, see the Red Hat Enterprise Linux 7 Security Guide. - Configure your
DHCP
server to use the boot images packaged with SYSLINUX. If you do not have one installed, see the Red Hat Enterprise Linux 7 Networking Guide for instructions.A sample configuration in the/etc/dhcp/dhcpd.conf
file might look like:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You now need the
pxelinux.0
file from the SYSLINUX package in the ISO image file of the full installation DVD. To access it, enter the following commands as root:mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
# mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directory
# cp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directory
Copy to Clipboard Copied! Toggle word wrap Toggle overflow umount /mount_point
# umount /mount_pointumount /mount_point
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the package:rpm2cpio syslinux-version-architecture.rpm | cpio -dimv
# rpm2cpio syslinux-version-architecture.rpm | cpio -dimvrpm2cpio syslinux-version-architecture.rpm | cpio -dimvrpm2cpio syslinux-version-architecture.rpm | cpio -dimv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a
pxelinux/
directory withintftpboot/
and copy thepxelinux.0
file into it:mkdir /var/lib/tftpboot/pxelinux
# mkdir /var/lib/tftpboot/pxelinux
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
# cp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinuxcp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinuxcp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the directory
pxelinux.cfg/
in thepxelinux/
directory:mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
# mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add a configuration file nameddefault
to thepxelinux.cfg/
directory.A sample configuration file at/var/lib/tftpboot/pxelinux/pxelinux.cfg/default
might look like:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Theinst.repo=
Anaconda option, shown in the example above, must always be used to specify the installation program's image as well as the installation source. Without this option, the installation program will be unable to boot. For more information about boot options for Anaconda, see Section 23.1, “Configuring the Installation System at the Boot Menu”. - Create a subdirectory to store the boot image files within the
/var/lib/tftpboot/
directory, and copy the boot image files to it. In this example, we use the directory/var/lib/tftpboot/pxelinux/images/RHEL-release_number/
:mkdir -p /var/lib/tftpboot/pxelinux/images/RHEL-7.1/ cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/
# mkdir -p /var/lib/tftpboot/pxelinux/images/RHEL-7.1/ # cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/images/RHEL-release_number/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Finally, start and enable the services:
- The
dhcpd
service:systemctl start dhcpd systemctl enable dhcpd
# systemctl start dhcpd # systemctl enable dhcpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
xinetd
service, that manages the tftpd service:systemctl start xinetd systemctl enable xinetd
# systemctl start xinetd # systemctl enable xinetd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
After finishing this procedure, the PXE boot server is ready to serve PXE clients. You can now start the system you want to install Red Hat Enterprise Linux on, select PXE Boot when prompted to specify a boot source, and start the network installation. For more information, see Section 7.1.2, “Booting from the Network Using PXE”.
24.1.2. Configuring a TFTP Server for UEFI-based AMD64/Intel 64 and ARM Clients Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
The following procedure will prepare the PXE server for booting UEFI-based AMD64/Intel 64 and ARM systems. For information on BIOS-based systems, see Section 24.1.1, “Configuring a TFTP Server for BIOS-based AMD64 and Intel 64 Clients”.
Procedure 24.2. Configuring TFTP Boot for UEFI-based Systems
Note
Red Hat Enterprise Linux 7 UEFI PXE boot supports a lowercase file format for a MAC-based grub menu file. For example, the MAC address file format for grub2 is
grub.cfg-01-aa-bb-cc-dd-ee-ff
- Install the tftp-server package. To do this, enter the following command as
root
:yum install tftp-server
# yum install tftp-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Allow incoming connections to the
tftp
service in the firewall:firewall-cmd --add-service=tftp
# firewall-cmd --add-service=tftp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The above command only enables access until the next server reboot. To allow access permanently, add the--permanent
option. For more information about firewall configuration, see the Red Hat Enterprise Linux 7 Security Guide. - Configure your
DHCP
server to use the EFI boot images packaged with shim. If you do not have one installed, see the Red Hat Enterprise Linux 7 Networking Guide for instructions.A sample configuration in the/etc/dhcp/dhcpd.conf
file might look like:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You now need the
shim.efi
file from the shim package and thegrubx64.efi
file from the grub2-efi package in the ISO image file. To access them, enter the following commands as root:mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
# mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directory
# cp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directory
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directory
# cp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directory
Copy to Clipboard Copied! Toggle word wrap Toggle overflow umount /mount_point
# umount /mount_pointumount /mount_point
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the packages:rpm2cpio shim-version-architecture.rpm | cpio -dimv
# rpm2cpio shim-version-architecture.rpm | cpio -dimvrpm2cpio shim-version-architecture.rpm | cpio -dimvrpm2cpio shim-version-architecture.rpm | cpio -dimv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rpm2cpio grub2-efi-version-architecture.rpm | cpio -dimv
# rpm2cpio grub2-efi-version-architecture.rpm | cpio -dimvrpm2cpio grub2-efi-version-architecture.rpm | cpio -dimvrpm2cpio grub2-efi-version-architecture.rpm | cpio -dimv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the EFI boot images from your boot directory:
cp publicly_available_directory/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot/
# cp publicly_available_directory/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot/cp publicly_available_directory/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot/cp publicly_available_directory/boot/efi/EFI/redhat/shim.efi /var/lib/tftpboot/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp publicly_available_directory/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot/
# cp publicly_available_directory/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot/cp publicly_available_directory/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot/cp publicly_available_directory/boot/efi/EFI/redhat/grubx64.efi /var/lib/tftpboot/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add a configuration file named
grub.cfg
to thetftpboot/
directory. A sample configuration file at/var/lib/tftpboot/grub.cfg
might look like:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Theinst.repo=
Anaconda option, shown in the example above, must always be used to specify the installation program's image as well as the installation source. Without this option, the installation program will be unable to boot. For more information about boot options for Anaconda, see Section 23.1, “Configuring the Installation System at the Boot Menu”. - Create a subdirectory to store the boot image files within the
/var/lib/tftpboot/
directory, and copy the boot image files to it. In this example, we use the directory/var/lib/tftpboot/images/RHEL-7.1/
:mkdir -p /var/lib/tftpboot/images/RHEL-7.1/# cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/RHEL-7.1/
# mkdir -p /var/lib/tftpboot/images/RHEL-7.1/# cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/RHEL-7.1/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/RHEL-7.1/cp /path_to_x86_64_images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/RHEL-7.1/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Finally, start and enable the services:
- The
dhcpd
service:systemctl start dhcpd systemctl enable dhcpd
# systemctl start dhcpd # systemctl enable dhcpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
xinetd
service, that manages the tftpd service:systemctl start xinetd systemctl enable xinetd
# systemctl start xinetd # systemctl enable xinetd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
After finishing this procedure, the PXE boot server is ready to serve PXE clients. You can now start the system you want to install Red Hat Enterprise Linux on, select PXE Boot when prompted to specify a boot source, and start the network installation. For more information, see Section 7.1.2, “Booting from the Network Using PXE”.
24.1.3. Configuring Network Boot for IBM Power Systems Using GRUB2 Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Procedure 24.3. Configuring a Network Boot Server for IBM Power Systems Using GRUB2
- Install the tftp-server package. To do this, enter the following command as
root
:yum install tftp-server
# yum install tftp-server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Allow incoming connections to the
tftp
service in the firewall:firewall-cmd --add-service=tftp
# firewall-cmd --add-service=tftp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The above command only enables access until the next server reboot. To allow access permanently, add the--permanent
option. For more information about firewall configuration, see the Red Hat Enterprise Linux 7 Security Guide. - Create a GRUB2 network boot directory inside the tftp root:
grub2-mknetdir --net-directory=/var/lib/tftpboot
# grub2-mknetdir --net-directory=/var/lib/tftpboot Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to /boot/grub2/powerpc-ieee1275/core.elf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note the command's output, which informs you about which file needs to be configured as thefilename
in yourDHCP
configuration. This will become important further in the procedure. - Create a GRUB2 configuration file:
/var/lib/tftpboot/boot/grub2/grub.cfg
. Thegrub.cfg
syntax is described in the Red Hat Enterprise Linux 7 System Administrator's Guide.Below is an example configuration file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Theinst.repo=
Anaconda option, shown in the example above, must always be used to specify the installation program's image as well as the installation source. Without this option, the installation program will be unable to boot. For more information about boot options for Anaconda, see Section 23.1, “Configuring the Installation System at the Boot Menu”. - Configure your
DHCP
server to use the boot images packaged with GRUB2. If you do not have one installed, see the Red Hat Enterprise Linux 7 Networking Guide for instructions.A sample configuration in the/etc/dhcp/dhcpd.conf
file might look like:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Adjust the sample parameters (subnet
,netmask
,routers
,fixed-address
andhardware ethernet
) to fit your network configuration. Also note thefilename
parameter; this is the file name which was output by thegrub2-mknetdir
command earlier in the procedure. - Finally, start and enable the services:
- The
dhcpd
service:systemctl start dhcpd systemctl enable dhcpd
# systemctl start dhcpd # systemctl enable dhcpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
xinetd
service that manages the tftpd service:systemctl start xinetd systemctl enable xinetd
# systemctl start xinetd # systemctl enable xinetd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
After finishing this procedure, the PXE boot server is ready to serve PXE clients. You can now follow the steps described in Chapter 12, Booting the Installation on IBM Power Systems to boot your Power Systems client from this server.
Additional information about setting up network boot for IBM Power Systems clients can be found in the Netbooting on POWER - An Introduction at the IBM DeveloperWorks website.