fb73bdf105
The sanboot trick to boot from local disk does not work on all hardware. If it fails exit 0 from the iPxe script so that boot continues on the next device which may be the local disk. Story: #2009258 Task: #43470 Change-Id: I1b6303a987a102dfbfd233334395321c25a55212
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
#!ipxe
|
|
|
|
# NOTE(lucasagomes): Loop over all network devices and boot from
|
|
# the first one capable of booting. For more information see:
|
|
# https://bugs.launchpad.net/ironic/+bug/1504482
|
|
set netid:int32 -1
|
|
:loop
|
|
inc netid || chain pxelinux.cfg/${mac:hexhyp} || goto old_rom
|
|
isset ${net${netid}/mac} || goto loop_done
|
|
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
|
chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
|
|
|
|
# If we've got here the chained config returned success
|
|
# suggesting "sanboot" in boot_whole_disk failed (some UEFI cases)
|
|
# exit 0 so the bios continues to the next device
|
|
echo Exiting pxe config to allow boot to continue on next device
|
|
exit 0
|
|
|
|
:loop_done
|
|
chain inspector.ipxe | goto boot_failed
|
|
|
|
:boot_failed
|
|
echo PXE boot failed! No configuration found for any of the present NICs.
|
|
echo Press any key to reboot...
|
|
prompt --timeout 180
|
|
reboot
|
|
|
|
:old_rom
|
|
chain inspector.ipxe | goto boot_failed_old_rom
|
|
|
|
:boot_failed_old_rom
|
|
echo PXE boot failed! No configuration found for NIC ${mac:hexhyp}.
|
|
echo Please update your iPXE ROM and retry.
|
|
echo Press any key to reboot...
|
|
prompt --timeout 180
|
|
reboot
|
|
|