#!ipxe # ================================================================= # Harmony Discovery Agent - Default Boot Script (default.ipxe) # ================================================================= # # This script boots the CentOS Stream live environment for the # purpose of hardware inventory. It loads the kernel and initramfs # directly and passes a Kickstart URL for full automation. # # --- Configuration # Set the base URL for where the CentOS kernel/initrd are hosted. set os_base_url http://{{gateway_ip}}:8080/os/centos-stream-9 # Set the URL for the Kickstart file. set ks_url http://{{ gateway_ip }}:8080/{{ kickstart_filename }} # --- Boot Process echo "Harmony: Starting automated node discovery..." echo "Fetching kernel from ${os_base_url}/vmlinuz..." kernel ${os_base_url}/vmlinuz echo "Fetching initramfs from ${os_base_url}/initrd.img..." initrd ${os_base_url}/initrd.img echo "Configuring kernel boot arguments..." # Kernel Arguments Explained: # - initrd=initrd.img: Specifies the initial ramdisk to use. # - inst.stage2: Points to the OS source. For a live boot, the base URL is sufficient. # - inst.ks: CRITICAL: Points to our Kickstart file for automation. # - ip=dhcp: Ensures the live environment configures its network. # - console=...: Provides boot output on both serial and graphical consoles for debugging. imgargs vmlinuz initrd=initrd.img inst.sshd inst.stage2=${os_base_url} inst.ks=${ks_url} ip=dhcp console=ttyS0,115200 console=tty1 echo "Booting into CentOS Stream 9 live environment..." boot || goto failed :failed echo "Boot failed. Dropping to iPXE shell." shell