[ipxe-devel] Problem with iPXE menu
James Peltier
james_peltier at sfu.ca
Fri Sep 25 17:43:40 UTC 2020
Hi All,
I'm having a bit of trouble with iPXE menus. I'm trying to allow a user to select the interface that they would like to boot from and this works fine. However, if someone incorrectly selected the wrong interface, I want them to be able to go back into the menu and reselect the proper one.
When i choose the option to select the boot interface the first time it works and sets the boot-interface variable to the selected network, returns to the menu showing the "Select Boot Interface (DONE)". If I then select this option again it seems to attempt to boot and ends up with an INT18 error.
What am I doing wrong?
CODE
=========
:menu
clear boot-interface
menu Main Menu
item --gap Build Date: ${build_date} (UTC)
item
item --gap We will be booting from ${mirror} today.
item
item --key N boot-dhcp (N)ormal Boot
item --key C customization-menu (C)ustom Boot
choose --timeout 0 --default boot-dhcp boot-select && goto boot-type || goto menu
:select-boot-interface
menu Select an interface to boot from
:loop-int
isset ${net${interface-idx}/mac} || goto end-loop-int
item --key ${interface-idx} net${interface-idx} net${interface-idx}
inc interface-idx && goto loop-int
:end-loop-int
choose --timeout 0 --default 0 boot-interface && goto customization-menu
:attempt-boot
echo
echo Attempting to boot ${boot-interface}
#isset ${net${interface-idx}/mac} && goto ${fqdn} || goto boot-dhcp
isset ${boot-interface}/mac} && goto ${fqdn} || goto boot-dhcp
:customization-menu
menu Customize Installation
item
item --key 1 attempt-boot (1) Try All Interfaces
isset ${boot-interface} && item select-boot-interface Select Boot Interface (Done) || item select-boot-interface Select Boot Interface
item custom-boot Start Custom Boot
item menu Main Menu
choose --timeout 0 --default attempt-boot customization-menu-selection || goto customization-menu
goto ${customization-menu-selection}
More information about the ipxe-devel
mailing list