Menu Close
5.2.12.2. Creating Red Hat Enterprise Linux CoreOS (RHCOS) machines by PXE or iPXE booting
Before you install a cluster on bare metal infrastructure that you provision, you must create RHCOS machines for it to use. You can use PXE or iPXE booting to create the machines.
Prerequisites
- Obtain the Ignition config files for your cluster.
- Familiarity configuring the necessary DHCP, TFTP, and HTTP services for providing PXE or iPXE infrastructure.
- Have access to an HTTP server and TFTP server that you can access from your computer.
Procedure
Upload the master, worker, and bootstrap Ignition config files that the installation program created to your HTTP server. Note the URLs of these files.
重要If you plan to add more compute machines to your cluster after you finish installation, do not delete these files.
Obtain the compressed metal RAW image,
kernel
andinitramfs
files from the Product Downloads page on the Red Hat customer portal or the RHCOS image mirror page.重要The RHCOS images might not change with every release of OpenShift Container Platform. You must download images with the highest version that is less than or equal to the OpenShift Container Platform version that you install. Use the image versions that match your OpenShift Container Platform version if they are available. Only use RAW images for this procedure. RHCOS qcow2 images are not supported for bare metal installs.
The file names contain the OpenShift Container Platform version number. They resemble the following examples:
-
Compressed metal RAW image:
rhcos-<version>-<architecture>-metal.<architecture>.raw.gz
-
kernel
:rhcos-<version>-<architecture>-installer-kernel-<architecture>
-
initramfs
:rhcos-<version>-<architecture>-installer-initramfs.<architecture>.img
-
Compressed metal RAW image:
- Upload the RAW image to your HTTP server.
Upload the additional files that are required for your booting method:
-
For traditional PXE, upload the
kernel
andinitramfs
files to your TFTP server. -
For iPXE, upload the
kernel
andinitramfs
files to your HTTP server.
重要If you plan to add more compute machines to your cluster after you finish installation, do not delete these files.
-
For traditional PXE, upload the
- Configure the network boot infrastructure so that the machines boot from their local disks after RHCOS is installed on them.
Configure PXE or iPXE installation for the RHCOS images.
Modify one of the following example menu entries for your environment and verify that the image and Ignition files are properly accessible:
For PXE:
DEFAULT pxeboot TIMEOUT 20 PROMPT 0 LABEL pxeboot KERNEL rhcos-<version>-<architecture>-installer-kernel-<architecture> 1 APPEND ip=dhcp rd.neednet=1 initrd=rhcos-<version>-<architecture>-installer-initramfs.<architecture>.img coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.image_url=http://<HTTP_server>/rhcos-<version>-<architecture>-metal.<architecture>.raw.gz coreos.inst.ignition_url=http://<HTTP_server>/bootstrap.ign 2 3
- 1
- Specify the location of the
kernel
file available on your TFTP server. - 2
- If you use multiple NICs, specify a single interface in the
ip
option. For example, to use DHCP on a NIC that is namedeno1
, setip=eno1:dhcp
. - 3
- Specify locations of the RHCOS files that you uploaded to your HTTP or TFTP server. The
initrd
parameter value is the location of theinitramfs
file on your TFTP server. Thecoreos.inst.image_url
parameter value is the location of the compressed metal RAW image on your HTTP server, and thecoreos.inst.ignition_url
parameter value is the location of the bootstrap Ignition config file on your HTTP server.
注記This configuration does not enable serial console access on machines with a graphical console. To configure a different console, add one or more
console=
arguments to theAPPEND
line. For example, addconsole=tty0 console=ttyS0
to set the first PC serial port as the primary console and the graphical console as a secondary console. For more information, see How does one set up a serial terminal and/or console in Red Hat Enterprise Linux?.For iPXE:
kernel http://<HTTP_server>/rhcos-<version>-<architecture>-installer-kernel-<architecture> ip=dhcp rd.neednet=1 initrd=rhcos-<version>-<architecture>-installer-initramfs.<architecture>.img coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.image_url=http://<HTTP_server>/rhcos-<version>-<architecture>-metal.<architecture>.raw.gz coreos.inst.ignition_url=http://<HTTP_server>/bootstrap.ign 1 2 initrd http://<HTTP_server>/rhcos-<version>-<architecture>-installer-initramfs.<architecture>.img 3 boot
- 1
- Specify locations of the RHCOS files that you uploaded to your HTTP server. The
kernel
parameter value is the location of thekernel
file, theinitrd
parameter value references the name of theinitramfs
file that is supplied on the followinginitrd
line, thecoreos.inst.image_url
parameter value is the location of the compressed metal RAW image, and thecoreos.inst.ignition_url
parameter value is the location of the bootstrap Ignition config file. - 2
- If you use multiple NICs, specify a single interface in the
ip
option. For example, to use DHCP on a NIC that is namedeno1
, setip=eno1:dhcp
. - 3
- Specify the location of the
initramfs
file that you uploaded to your HTTP server.
注記This configuration does not enable serial console access on machines with a graphical console. To configure a different console, add one or more
console=
arguments to thekernel
line. For example, addconsole=tty0 console=ttyS0
to set the first PC serial port as the primary console and the graphical console as a secondary console. For more information, see How does one set up a serial terminal and/or console in Red Hat Enterprise Linux?.
If you use UEFI, perform the following actions:
Provide the EFI binaries and
grub.cfg
file that are required for booting the system. You need theshim.efi
binary and thegrubx64.efi
binary.Extract the necessary EFI binaries by mounting the RHCOS ISO on your host and then mounting the
images/efiboot.img
file to your host. From theefiboot.img
mount point, you then copy theEFI/redhat/shimx64.efi
andEFI/redhat/grubx64.efi
files to your TFTP server.# mkdir -p /mnt/{iso,efiboot} # mount -o loop rhcos-installer.x86_64.iso /mnt/iso # mount -o loop,ro /mnt/iso/images/efiboot.img /mnt/efiboot # cp /mnt/efiboot/EFI/redhat/{shimx64.efi,grubx64.efi} . # umount /mnt/{efiboot,iso}
-
Copy the
EFI/redhat/grub.cfg
file that is included in the RHCOS ISO to your TFTP server. Edit the
grub.cfg
file to include the following arguments:menuentry 'Install Red Hat Enterprise Linux CoreOS' --class fedora --class gnu-linux --class gnu --class os { linux rhcos-<version>-<architecture>-installer-kernel-<architecture> nomodeset rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.image_url=http://<HTTP_server>/rhcos-<version>-<architecture>-metal.<architecture>.raw.gz coreos.inst.ignition_url=http://<HTTP_server>/bootstrap.ign 1 initrd rhcos-<version>-<architecture>-installer-initramfs.<architecture>.img 2 }
- 1
- The first argument to the
linux
line item is the location of thekernel
file that you uploaded to your TFTP server. For thecoreos.inst.image_url
parameter value, specify the location of the compressed metal RAW image that you uploaded to your HTTP server. For thecoreos.inst.ignition_url
paramter, specify the location of the bootstrap Ignition config file that you uploaded to your HTTP server. - 2
- Specify the location of the
initramfs
file that you uploaded to your TFTP server.
Continue to create the machines for your cluster.
重要You must create the bootstrap and control plane machines at this time. If the control plane machines are not made schedulable, which is the default, also create at least two compute machines before you install the cluster.