fix: mac-specific ipxe file was missing #!ipxe sheban causing bad exec format. Also added autofree to chainloading boot file so it won't cause kernel panics when fallback boots after a failed boot of a previous file
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
This commit is contained in:
parent
c5427b983c
commit
4fdc2e8a58
@ -31,7 +31,7 @@ sleep 2
|
||||
# 1. iPXE attempts to 'chain' the hostfile.
|
||||
# 2. If successful (returns 0), the "&& exit" part is executed, and this script terminates.
|
||||
# 3. If it fails (returns non-zero), the "||" part is triggered, and execution continues below.
|
||||
chain ${hostfile} && exit ||
|
||||
chain --autofree --replace ${hostfile} && exit ||
|
||||
|
||||
# --- Fallback Boot Attempt ---
|
||||
# This part of the script is only reached if the 'chain ${hostfile}' command above failed.
|
||||
@ -45,7 +45,7 @@ echo " Location: ${fallbackfile}"
|
||||
|
||||
sleep 8
|
||||
|
||||
chain ${fallbackfile} && exit ||
|
||||
chain --autofree --replace ${fallbackfile} && exit ||
|
||||
|
||||
# --- Final Failure ---
|
||||
# This part is only reached if BOTH chain commands have failed.
|
||||
|
@ -1,7 +1,52 @@
|
||||
set base-url http://{{ http_ip }}:8080
|
||||
set scos-base-url = ${base-url}/{{ scos_path }}
|
||||
set installation-device = {{ installation_device }}
|
||||
#!ipxe
|
||||
|
||||
kernel ${scos-base-url}/scos-live-kernel.x86_64 initrd=main coreos.live.rootfs_url=${scos-base-url}/scos-live-rootfs.x86_64.img coreos.inst.install_dev=${installation-device} coreos.inst.ignition_url=${base-url}/{{ ignition_http_path }}/bootstrap.ign
|
||||
initrd --name main ${scos-base-url}/scos-live-initramfs.x86_64.img
|
||||
boot
|
||||
# ==================================================================
|
||||
# MAC-Specific Boot Script for CoreOS/FCOS Installation
|
||||
# ==================================================================
|
||||
|
||||
# --- Configuration ---
|
||||
set http_ip {{ http_ip }}
|
||||
set scos_path {{ scos_path }}
|
||||
set inst_dev {{ installation_device }}
|
||||
set ign_path {{ ignition_http_path }}
|
||||
set ign_file bootstrap.ign
|
||||
|
||||
# --- Derived Variables ---
|
||||
set base-url http://${http_ip}:8080
|
||||
set scos-base-url ${base-url}/${scos_path}
|
||||
set ignition-url ${base-url}/${ign_path}/${ign_file}
|
||||
|
||||
# --- Pre-boot Logging & Verification ---
|
||||
echo
|
||||
echo "Starting MAC-specific installation..."
|
||||
echo "--------------------------------------------------"
|
||||
echo " Installation Device: ${inst_dev}"
|
||||
echo " CoreOS Kernel URL: ${scos-base-url}/scos-live-kernel.x86_64"
|
||||
echo " Ignition URL: ${ignition-url}"
|
||||
echo "--------------------------------------------------"
|
||||
echo "Waiting for 3 seconds before loading boot assets..."
|
||||
sleep 3
|
||||
|
||||
# --- Load Boot Assets with Failure Checks ---
|
||||
# The '|| goto failure' pattern provides a clean exit if any asset fails to load.
|
||||
echo "Loading kernel..."
|
||||
kernel ${scos-base-url}/scos-live-kernel.x86_64 initrd=main coreos.live.rootfs_url=${scos-base-url}/scos-live-rootfs.x86_64.img coreos.inst.install_dev=${inst_dev} coreos.inst.ignition_url=${ignition-url} || goto failure
|
||||
|
||||
echo "Loading initramfs..."
|
||||
initrd --name main ${scos-base-url}/scos-live-initramfs.x86_64.img || goto failure
|
||||
|
||||
# --- Boot ---
|
||||
echo "All assets loaded successfully. Starting boot process..."
|
||||
boot || goto failure
|
||||
|
||||
# This part is never reached on successful boot.
|
||||
|
||||
# --- Failure Handling ---
|
||||
:failure
|
||||
echo
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo " ERROR: A boot component failed to load."
|
||||
echo " Dropping to iPXE shell for manual debugging."
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
sleep 10
|
||||
shell
|
||||
|
Loading…
Reference in New Issue
Block a user