Chapter 23. Preparing for a Network Installation
Note
- 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.
- 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 thetftpservice on the PXE server. See Section 23.1, “Configuring Network Boot Services” for details.Important
The GRUB2 boot loader supports network boot fromHTTPin 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 (vmlinuzandinitrd). Obtaining the installation source from anHTTPserver does not carry this risk. - Boot the client (the system you want to install Red Hat Enterprise Linux on) and start the installation.
Note
23.1. Configuring Network Boot Services
DHCP server must be configured, and all necessary services must be enabled and started.
Note
23.1.1. Configuring a TFTP Server for BIOS-based AMD64 and Intel 64 Clients
Procedure 23.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 - Allow incoming connections to the
tftpservice in the firewall:#firewall-cmd --add-service=tftpNote
The above command only enables access until the next server reboot. To allow access permanently, add the--permanentoption. For more information about firewall configuration, see the Red Hat Enterprise Linux 7 Security Guide. - Configure your
DHCPserver 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.conffile might look like:option space pxelinux; option pxelinux.magic code 208 = string; option pxelinux.configfile code 209 = text; option pxelinux.pathprefix code 210 = text; option pxelinux.reboottime code 211 = unsigned integer 32; option architecture-type code 93 = unsigned integer 16; subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.254; range 10.0.0.2 10.0.0.253; class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 10.0.0.1; if option architecture-type = 00:07 { filename "uefi/shim.efi"; } else { filename "pxelinux/pxelinux.0"; } } } - You now need the
pxelinux.0file 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#cp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directory#umount /mount_pointExtract the package:#rpm2cpio syslinux-version-architecture.rpm | cpio -dimv - Create a
pxelinux/directory withintftpboot/and copy thepxelinux.0file into it:#mkdir /var/lib/tftpboot/pxelinux#cp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux - Create the directory
pxelinux.cfg/in thepxelinux/directory:#mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfgAdd a configuration file nameddefaultto thepxelinux.cfg/directory.A sample configuration file at/var/lib/tftpboot/pxelinux/pxelinux.cfg/defaultmight look like:default vesamenu.c32 prompt 1 timeout 600 display boot.msg label linux menu label ^Install system menu default kernel images/RHEL-7.1/vmlinuz append initrd=images/RHEL-7.1/initrd.img ip=dhcp inst.repo=http://10.32.5.1/mnt/archive/RHEL-7/7.x/Server/x86_64/os/ label vesa menu label Install system with ^basic video driver kernel images/RHEL-7.1/vmlinuz append initrd=images/RHEL-7.1/initrd.img ip=dhcp inst.xdriver=vesa nomodeset inst.repo=http://10.32.5.1/mnt/archive/RHEL-7/7.x/Server/x86_64/os/ label rescue menu label ^Rescue installed system kernel images/RHEL-7.1/vmlinuz append initrd=images/RHEL-7.1/initrd.img rescue label local menu label Boot from ^local drive localboot 0xffff
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 22.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/ - Finally, start and enable the services:
- The
dhcpdservice:# systemctl start dhcpd # systemctl enable dhcpd
- The
xinetdservice, that manages the tftpd service:# systemctl start xinetd # systemctl enable xinetd
23.1.2. Configuring a TFTP Server for UEFI-based AMD64/Intel 64 and ARM Clients
Procedure 23.2. Configuring TFTP Boot for UEFI-based Systems
- Install the tftp-server package. To do this, enter the following command as
root:#yum install tftp-server - Allow incoming connections to the
tftpservice in the firewall:#firewall-cmd --add-service=tftpNote
The above command only enables access until the next server reboot. To allow access permanently, add the--permanentoption. For more information about firewall configuration, see the Red Hat Enterprise Linux 7 Security Guide. - Configure your
DHCPserver 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.conffile might look like:option space pxelinux; option pxelinux.magic code 208 = string; option pxelinux.configfile code 209 = text; option pxelinux.pathprefix code 210 = text; option pxelinux.reboottime code 211 = unsigned integer 32; option architecture-type code 93 = unsigned integer 16; subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.254; range 10.0.0.2 10.0.0.253; class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 10.0.0.1; if option architecture-type = 00:07 { filename "shim.efi"; } else { filename "pxelinux/pxelinux.0"; } } } - You now need the
shim.efifile from the shim package and thegrubx64.efifile 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#cp -pr /mount_point/Packages/shim-version-architecture.rpm /publicly_available_directory#cp -pr /mount_point/Packages/grub2-efi-version-architecture.rpm /publicly_available_directory#umount /mount_pointExtract the packages:#rpm2cpio shim-version-architecture.rpm | cpio -dimv#rpm2cpio grub2-efi-version-architecture.rpm | cpio -dimv - 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/grubx64.efi /var/lib/tftpboot/ - Add a configuration file named
grub.cfgto thetftpboot/directory. A sample configuration file at/var/lib/tftpboot/grub.cfgmight look like:set timeout=60 menuentry 'RHEL 7' { linuxefi images/RHEL-7.1/vmlinuz ip=dhcp inst.repo=http://10.32.5.1/mnt/archive/RHEL-7/7.1/Server/x86_64/os/ initrdefi images/RHEL-7.1/initrd.img }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 22.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/ - Finally, start and enable the services:
- The
dhcpdservice:# systemctl start dhcpd # systemctl enable dhcpd
- The
xinetdservice, that manages the tftpd service:# systemctl start xinetd # systemctl enable xinetd
23.1.3. Configuring Network Boot for IBM Power Systems Using GRUB2
Procedure 23.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 - Allow incoming connections to the
tftpservice in the firewall:#firewall-cmd --add-service=tftpNote
The above command only enables access until the next server reboot. To allow access permanently, add the--permanentoption. 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/tftpbootNetboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to /boot/grub2/powerpc-ieee1275/core.elfNote the command's output, which informs you about which file needs to be configured as thefilenamein yourDHCPconfiguration. This will become important further in the procedure. - Create a GRUB2 configuration file:
/var/lib/tftpboot/boot/grub2/grub.cfg. Thegrub.cfgsyntax is described in the Red Hat Enterprise Linux 7 System Administrator's Guide.Below is an example configuration file:set default=0 set timeout=5 echo -e "\nWelcome to the Red Hat Enterprise Linux 7 installer!\n\n" menuentry 'Red Hat Enterprise Linux 7' { linux grub2-ppc64/vmlinuz ro ip=dhcp inst.repo=http://10.32.5.1/mnt/archive/RHEL-7/7.6-Beta/Server/ppc64/os/ initrd grub2-ppc64/initrd.img }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 22.1, “Configuring the Installation System at the Boot Menu”. - Configure your
DHCPserver 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.conffile might look like:subnet 192.168.0.1 netmask 255.255.255.0 { allow bootp; option routers 192.168.0.5; group { #BOOTP POWER clients filename "boot/grub2/powerpc-ieee1275/core.elf"; host client1 { hardware ethernet 01:23:45:67:89:ab; fixed-address 192.168.0.112; } } }Adjust the sample parameters (subnet,netmask,routers,fixed-addressandhardware ethernet) to fit your network configuration. Also note thefilenameparameter; this is the file name which was output by thegrub2-mknetdircommand earlier in the procedure. - Finally, start and enable the services:
- The
dhcpdservice:# systemctl start dhcpd # systemctl enable dhcpd
- The
xinetdservice that manages the tftpd service:# systemctl start xinetd # systemctl enable xinetd

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.