Questo contenuto non è disponibile nella lingua selezionata.
Chapter 24. 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 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
24.1. Configuring Network Boot Services Copia collegamentoCollegamento copiato negli appunti!
DHCP
server must be configured, and all necessary services must be enabled and started.
Note
24.1.1. Configuring a TFTP Server for BIOS-based AMD64 and Intel 64 Clients Copia collegamentoCollegamento copiato negli appunti!
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
24.1.2. Configuring a TFTP Server for UEFI-based AMD64/Intel 64 and ARM Clients Copia collegamentoCollegamento copiato negli appunti!
Procedure 24.2. Configuring TFTP Boot for UEFI-based Systems
Note
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
24.1.3. Configuring Network Boot for IBM Power Systems Using GRUB2 Copia collegamentoCollegamento copiato negli appunti!
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