Exit ipxe script if enable_netboot_fallback failed
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
This commit is contained in:
parent
45c9c3029f
commit
fb73bdf105
@ -10,6 +10,12 @@ isset ${net${netid}/mac} || goto loop_done
|
|||||||
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
||||||
chain {{ ipxe_for_mac_uri }}${net${netid}/mac:hexhyp} || goto loop
|
chain {{ ipxe_for_mac_uri }}${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
|
:loop_done
|
||||||
{% if ipxe_fallback_script -%}
|
{% if ipxe_fallback_script -%}
|
||||||
chain {{ ipxe_fallback_script }} | goto boot_failed
|
chain {{ ipxe_fallback_script }} | goto boot_failed
|
||||||
|
@ -72,4 +72,4 @@ goto boot_iscsi
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -10,6 +10,12 @@ isset ${net${netid}/mac} || goto loop_done
|
|||||||
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
||||||
chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
|
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
|
:loop_done
|
||||||
chain inspector.ipxe | goto boot_failed
|
chain inspector.ipxe | goto boot_failed
|
||||||
|
|
||||||
|
@ -10,6 +10,12 @@ isset ${net${netid}/mac} || goto loop_done
|
|||||||
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
||||||
chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
|
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
|
:loop_done
|
||||||
echo PXE boot failed! No configuration found for any of the present NICs.
|
echo PXE boot failed! No configuration found for any of the present NICs.
|
||||||
echo Press any key to reboot...
|
echo Press any key to reboot...
|
||||||
|
@ -44,4 +44,4 @@ initrd http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
|
|||||||
boot
|
boot
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -44,4 +44,4 @@ initrd http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
|
|||||||
boot
|
boot
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -42,4 +42,4 @@ imgfree
|
|||||||
sanboot http://1.2.3.4:1234/uuid/iso
|
sanboot http://1.2.3.4:1234/uuid/iso
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -44,4 +44,4 @@ initrd http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
|
|||||||
boot
|
boot
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -62,4 +62,4 @@ sleep 10
|
|||||||
goto boot_iscsi
|
goto boot_iscsi
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -59,4 +59,4 @@ sleep 10
|
|||||||
goto boot_iscsi
|
goto boot_iscsi
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -59,4 +59,4 @@ sleep 10
|
|||||||
goto boot_iscsi
|
goto boot_iscsi
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
@ -44,4 +44,4 @@ initrd --timeout 120 http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
|
|||||||
boot
|
boot
|
||||||
|
|
||||||
:boot_whole_disk
|
:boot_whole_disk
|
||||||
sanboot --no-describe
|
sanboot --no-describe || exit 0
|
||||||
|
6
releasenotes/notes/version-foo-2eb39b768112547f.yaml
Normal file
6
releasenotes/notes/version-foo-2eb39b768112547f.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes ``enable_netboot_fallback`` to cause iPXE config to exit 0
|
||||||
|
when "sanboot --no-describe" fails. Allowing the firmware to
|
||||||
|
move onto the next device in the boot order.
|
Loading…
Reference in New Issue
Block a user