forked from metal3-io/ironic-image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdualboot.ipxe
More file actions
22 lines (19 loc) · 741 Bytes
/
dualboot.ipxe
File metadata and controls
22 lines (19 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!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
isset ${net${netid}/mac} || chain pxelinux.cfg/${mac:hexhyp} || goto inspector
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
# If no networks configured to boot then introspect first valid one
:inspector
chain inspector.ipxe || goto loop_done
:loop_done
echo PXE boot failed! No configuration found for any of the present NICs
echo and could not find inspector.ipxe to use as fallback.
echo Press any key to reboot...
prompt --timeout 180
reboot