Team, today I'm going to share something simple, but it helped a lot to avoid unnecessary work during the installation of Openshift 4.6 via PXE in bare metal.
According to the link on how to install the Openshift Environment via PXE, we need to edit the default file in the following path /var/lib/tftpboot/pxelinux.cfg/, in this file we need to determine the ignition file that will be loaded during the boot server, we must do this by editing ignition for the following servers: bootstrap, master and workers, once this modification is made, we start the respective servers.
In order to improve this process and make it easier, I created the boot menu below, where I already specify the 3 server profiles, through an interactive menu I can select which server it is and perform the installation.
Obs.: In this procedure, we will not cover the installation and configuration of PXE, only the menu.
So, let's start..
First, let's copy the file vesamenu.c32 to the tftp path:
cp /usr/share/syslinux/vesamenu.c32 /var/lib/tftpboot/
Download the bg-ocp.png image from the link below and save it to the /var/lib/tftpboot/ directory
$ wget https://raw.githubusercontent.com/leoaaraujo/openshift_pxe_boot_menu/main/files/bg-ocp.png -O /var/lib/tftpboot/bg-ocp.png
After that, we will edit or create the file with the entry menu of pxe boot, in my case it is /var/lib/tftpboot/pxelinux.cfg/default, add the lines below:
UI vesamenu.c32
MENU BACKGROUND bg-ocp.png (1)
MENU COLOR sel 4 #ffffff std (2)
MENU COLOR title 1 #ffffff (3)
TIMEOUT 120
PROMPT 0
MENU TITLE OPENSHIFT 4.x INSTALL BARE METAL PXE MENU (4)
LABEL INSTALL BOOTSTRAP (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/bootstrap.ign
LABEL INSTALL MASTER (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/master.ign
LABEL INSTALL WORKER (5)
KERNEL http://{{ HTTP SERVER }}/rhcos-live-kernel-x86_64
APPEND initrd=http://{{ HTTP SERVER }}/rhcos-live-initramfs.x86_64.img coreos.live.rootfs_url=http://{{ HTTP SERVER }}/rhcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://{{ HTTP SERVER }}/worker.ign
- Set the image downloaded previously, this image is optional, not mandatory and can be replaced
- Set the color in the selection menu
- Set the color in Title menu
- Define title for menu
- Define the name of item in menu
Obs.: Adjust the HTTP/HTTPS call, informing the IP or FQDN of your HTTP Server, where the img and ign files are stored
After the above steps have been successfully executed, start your server and identify if it already starts with the custom boot menu
Open the Web Console to interact
After press tab to edit, we can see the options Git Repository: https://github.com/leoaaraujo/openshift_pxe_boot_menu
References
For more customization options of the pxe menu, click here.
For more customization options for CoreOS during pxe boot, see here
About the author
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit