#!ipxe # Script: utils/main.ipxe # ID: b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e # For more information, see: # https://ipxe.org/ # https://ipxe.org/scripting ################################# # Script-wide/global variables. # ################################# :set_script_vars isset ${do_debug} || set do_debug 0 isset ${do_serial} || set do_serial 0 set base_url https://boot.netfire.com/ set http_base_url http://boot.netfire.com/ :set_bg iseq ${bg_set} 1 && goto skip_set_bg || echo Setting up menus... # Try different backgrounds sequentially until we find one that works. console --keep --picture ${base_url}bg.png && set bg_set 1 && goto skip_set_bg || console --keep --picture ${base_url}bg_lores.png && set bg_set 1 && goto skip_set_bg || console --keep --picture ${base_url}bg.pnm && set bg_set 1 && goto skip_set_bg || console --keep --picture ${base_url}bg_lores.pnm && set bg_set 1 && goto skip_set_bg || # Finally, fall back to text-only mode. echo Failed to use graphical console; reverting to text-only. console --x 1024 --y 768 || # "Red" xformed to a brighter/robust red) colour --rgb 0xb52a3d 1 || # "Green" xformed to orange) colour --rgb 0xcf6245 2 || # "Yellow" xformed to more of a gold) colour --rgb 0xc7a34d 3 || # "Magenta" xformed to a light purple) colour --rgb 0x6139a9 5 || # "Cyan" xformed to dark blue) colour --rgb 0x000120 6 || ## cpair --foreground 7 --background 5 0 || cpair --foreground 7 --background 6 1 || cpair --foreground 3 --background 6 2 || cpair --foreground 7 --background 6 3 || cpair --foreground 1 --background 6 4 || cpair --foreground 6 --background 1 5 || cpair --foreground 7 --background 6 6 || cpair --foreground 7 --background 6 7 || set bg_set 1 || :skip_set_bg set script_path ${base_url}utils/main.ipxe || # If b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev (this script) is not set, assume this is the entry script. isset ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev} || set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev ${script_path} isset ${entry_script} && goto skip_set_entry || set entry_script ${script_path} || :skip_set_entry # Since we are at the beginning of a script, we need to set this to "true". set prev_is_script 1 || ##################################### # End script-wide/global variables. # ##################################### :skip_script_vars ############################################ # Set hardware architecture and # # bitness strings for use in templating. # # Note: # # (U)EFI vs. BIOS can be determined by # # the ${platform} iPXE builtin. # # More information: # # https://ipxe.org/cfg/platform # ############################################ # bits: 64, 32 # # arch0: x86_64, i386, arm64, arm32 # # arch0u: X86_64, I386, ARM64, ARM32 # # arch1: x86_64, x86, arm64, arm32 # # arch1u: X86_64, X86, ARM64, ARM32 # # arch2: amd64, i686, arm64, arm32 # # arch2u: AMD64, I686, ARM64, ARM32 # # ${buildarch}: x86_64, i386, arm64, arm32 # # ${platform}: efi, pcbios, linux # ############################################ :setarch isset ${bits} && goto skiparch || set arch0 ${buildarch} goto setarch-${arch0} || goto exiterr :setarch-i386 # If true, it's a 32-bit build but a 64-bit CPU, so... cpuid --ext 29 && goto setarch-x86_64 || # Otherwise definitely 32-bit. set bits 32 set arch0u I386 set arch1 x86 set arch1u X86 set arch2 i686 set arch2u I686 goto skiparch :setarch-x86_64 iseq ${arch0} i386 && set arch0 x86_64 || set bits 64 set arch0u X86_64 set arch1 x86_64 set arch1u ${arch0u} set arch2 amd64 set arch2u AMD64 goto skiparch :setarch-arm32 set bits 32 set arch0u ARM32 set arch1 arm32 set arch1u ${arch0u} set arch2 ${arch1} set arch2u ${arch0u} goto skiparch :setarch-arm64 set bits 64 set arch0u ARM64 set arch1 arm64 set arch1u ${arch0u} set arch2 ${arch1} set arch2u ${arch0u} goto skiparch ########################################## # End hardware architecture and bitness. # ########################################## :skiparch ######################### # Convenience variables # ######################### :setconvenience isset ${esc} && goto skipconvenience || set esc:hex 1b set cls ${esc:string}[2J ############################# # End convenience variables # ############################# :skipconvenience ############################################### # Boot options for all (supported) MenuItems. # ############################################### :getbootopts ##################### # End boot options. # ##################### :skipgetbootopts ########################## # Target Selection/flow. # ########################## :findtarget # If we previously loaded (and left/attempted to leave) a menu within this script, # ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} will be set to that menu's label. # It will be unset/null (${} -- `isset ${foo} == false` is the same as `iseq ${foo} == ${}` if it is unset.) # if this is the first time loading this script. isset ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} && goto ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} || ######################## # End Target Selection # ######################## :skipfindtarget ##################### # Menu definitions. # ##################### :menudefs ############## # BEGIN MENU # ############## :0b762abc-1d75-4d3b-9e48-f38ea0adaef0 # Menu: "Utilities" # Label: 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_menu 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 # Script main/default menu. set prev_is_script 1 menu Utilities item --key r f407944f-61f0-4480-8d09-4786ac9b3f18 (r) RAM Testing ... set f407944f-61f0-4480-8d09-4786ac9b3f18/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key s aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f (s) Serial Console > set aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key e 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 (e) EFI Binaries ... set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key u 0670ef30-ce77-4f69-9760-eb3e27196c06 (u) UEFI Shells ... set 0670ef30-ce77-4f69-9760-eb3e27196c06/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key i f7a859f5-06bf-4d44-9990-6fa8e02d70b2 (i) iPXE Shell set f7a859f5-06bf-4d44-9990-6fa8e02d70b2/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key c a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b (c) Clear/reload cache set a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key d e789a7d0-730b-4c0a-845d-4d4f114f25b5 (d) Debugging > set e789a7d0-730b-4c0a-845d-4d4f114f25b5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key b 621736bd-7b11-42b5-b0ba-59b35e427507 (b) Boot to Netboot.XYZ set 621736bd-7b11-42b5-b0ba-59b35e427507/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key R 2802bc78-045d-42d3-bef5-c708968c38bc (R) Reboot set 2802bc78-045d-42d3-bef5-c708968c38bc/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key a d53c15af-2cd1-4401-87de-92d497aee527 (a) ACPI Power Off set d53c15af-2cd1-4401-87de-92d497aee527/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --gap item --key 0x147e 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help (F8) Help > set 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key 0x157e 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg (F9) Configure boot options for item(s) above set 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose --default f407944f-61f0-4480-8d09-4786ac9b3f18 target || goto ${target} || goto ${0b762abc-1d75-4d3b-9e48-f38ea0adaef0/prev} || goto previous ############ # END MENU # ############ ###################### # BEGIN SUBMENU HELP # ###################### # Menu: "Utilities" (HELP) # Label: 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 :0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help set prev_menu 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help menu Utilities Help item f407944f-61f0-4480-8d09-4786ac9b3f18_help RAM Testing > set f407944f-61f0-4480-8d09-4786ac9b3f18/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help Serial Console > set aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_help EFI Binaries > set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item 0670ef30-ce77-4f69-9760-eb3e27196c06_help UEFI Shells > set 0670ef30-ce77-4f69-9760-eb3e27196c06/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item f7a859f5-06bf-4d44-9990-6fa8e02d70b2_help iPXE Shell > set f7a859f5-06bf-4d44-9990-6fa8e02d70b2/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b_help Clear/reload cache > set a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item e789a7d0-730b-4c0a-845d-4d4f114f25b5_help Debugging > set e789a7d0-730b-4c0a-845d-4d4f114f25b5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item 621736bd-7b11-42b5-b0ba-59b35e427507_help Boot to Netboot.XYZ > set 621736bd-7b11-42b5-b0ba-59b35e427507/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item 2802bc78-045d-42d3-bef5-c708968c38bc_help Reboot > set 2802bc78-045d-42d3-bef5-c708968c38bc/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item d53c15af-2cd1-4401-87de-92d497aee527_help ACPI Power Off > set d53c15af-2cd1-4401-87de-92d497aee527/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${0b762abc-1d75-4d3b-9e48-f38ea0adaef0_help/prev} || goto previous #################### # END SUBMENU HELP # #################### ######################## # BEGIN SUBMENU CONFIG # ######################## # Menu: "Utilities" (CONFIGURATION) # Label: 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 :0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg set prev_menu 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg menu Utilities Configuration item f407944f-61f0-4480-8d09-4786ac9b3f18_cfg RAM Testing > set f407944f-61f0-4480-8d09-4786ac9b3f18/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg item 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_cfg EFI Binaries > set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${0b762abc-1d75-4d3b-9e48-f38ea0adaef0_cfg/prev} || goto previous ###################### # END SUBMENU CONFIG # ###################### ################# # BEGIN ENTRIES # ################# # Entries for menu "Utilities" (0b762abc-1d75-4d3b-9e48-f38ea0adaef0) ############### # BEGIN ENTRY # ############### # Entry: "RAM Testing" # Label: f407944f-61f0-4480-8d09-4786ac9b3f18 # Type: ItemTypeScript # Various implementations of memtest. :f407944f-61f0-4480-8d09-4786ac9b3f18 set f407944f-61f0-4480-8d09-4786ac9b3f18/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 clear prev_menu set prev_is_script 1 set f0e836b0-0d74-47ec-93ab-cab0c8fbe109/prev ${script_path} chain ${base_url}utils/memtest/main.ipxe || goto ${f407944f-61f0-4480-8d09-4786ac9b3f18/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "RAM Testing" (HELP) # Label: f407944f-61f0-4480-8d09-4786ac9b3f18 # Type: ItemTypeScript # Various implementations of memtest. :f407944f-61f0-4480-8d09-4786ac9b3f18_help set prev_is_script 0 set f407944f-61f0-4480-8d09-4786ac9b3f18_help/prev f407944f-61f0-4480-8d09-4786ac9b3f18 echo RAM Testing: echo Various implementations of memtest. prompt (Press any key to exit) goto ${f407944f-61f0-4480-8d09-4786ac9b3f18/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "RAM Testing" (CONFIGURATION) # Label: f407944f-61f0-4480-8d09-4786ac9b3f18 # Type: ItemTypeScript # Various implementations of memtest. :f407944f-61f0-4480-8d09-4786ac9b3f18_cfg set prev_is_script 0 echo Set custom boot options for RAM Testing below. echo Leave blank to use the currently configured options. echo Use the string "%DEFAULT%" (without quotes) to reset to the default. echo echo CURRENT: echo ${f407944f-61f0-4480-8d09-4786ac9b3f18/bootopts} echo echo DEFAULT: echo ${f407944f-61f0-4480-8d09-4786ac9b3f18/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_f407944f-61f0-4480-8d09-4786ac9b3f18_cfg iseq ${user_bootopts} ${} && goto prev_menu_f407944f-61f0-4480-8d09-4786ac9b3f18_cfg || iseq ${user_bootopts} %DEFAULT% && set f407944f-61f0-4480-8d09-4786ac9b3f18/bootopts ${f407944f-61f0-4480-8d09-4786ac9b3f18/orig_bootopts} && goto prev_menu_f407944f-61f0-4480-8d09-4786ac9b3f18_cfg || set f407944f-61f0-4480-8d09-4786ac9b3f18/bootopts ${user_bootopts} && goto ${f407944f-61f0-4480-8d09-4786ac9b3f18/prev} || goto previous #################### # END ENTRY CONFIG # #################### ############### # BEGIN ENTRY # ############### # Entry: "Serial Console" # Label: aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f # Type: ItemTypeMenu # https://ipxe.org/ # Enable or disable serial console output. ############## # BEGIN MENU # ############## :aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f # Menu: "Serial Console" # Label: aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f set prev_menu aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f # Non-main/secondary menu. set prev_is_script 0 menu Serial Console item --gap Serial console output currently enabled (0=off, 1=on): ${do_serial} item --key t cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 (t) Toggle serial console output set cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f item --gap item --key 0x147e aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help (F8) Help > set aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose --default cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 target || goto ${target} || goto ${aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f/prev} || goto previous ############ # END MENU # ############ ###################### # BEGIN SUBMENU HELP # ###################### # Menu: "Serial Console" (HELP) # Label: aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f :aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help set prev_menu aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help menu Serial Console Help item 8648820d-9925-49c0-863b-1d38cae2595b_help Serial console output currently enabled (0=off, 1=on): ${do_serial} > set 8648820d-9925-49c0-863b-1d38cae2595b/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help item cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3_help Toggle serial console output > set cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help/prev} || goto previous #################### # END SUBMENU HELP # #################### ################# # BEGIN ENTRIES # ################# # Entries for menu "Serial Console" (aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f) ############### # BEGIN ENTRY # ############### # Entry: "Toggle serial console output" # Label: cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 # Type: ItemTypeCmd # https://ipxe.org/cmd/ # Enable serial console output (where possible) if currently disabled, disable serial console output if currently enabled. :cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 set cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f set prev_is_script 0 iseq ${do_serial} 0 && set do_serial 1 && goto previous || set do_serial 0 && goto previous || goto ${cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Toggle serial console output" (HELP) # Label: cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 # Type: ItemTypeCmd # https://ipxe.org/cmd/ # Enable serial console output (where possible) if currently disabled, disable serial console output if currently enabled. :cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3_help set prev_is_script 0 set cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3_help/prev cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3 echo Toggle serial console output: echo Enable serial console output (where possible) if currently disabled, disable serial console output if currently enabled. prompt (Press any key to exit) goto ${cf0c5d1c-94e1-4e5e-a37c-bc325e57fff3/prev} || goto previous ################## # END ENTRY HELP # ################## # End entries for menu "Serial Console" (aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f) ############### # END ENTRIES # ############### ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Serial Console" (HELP) # Label: aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f # Type: ItemTypeMenu # https://ipxe.org/ # Enable or disable serial console output. :aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help set prev_is_script 0 set aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f_help/prev aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f echo Serial Console: echo Enable or disable serial console output. prompt (Press any key to exit) goto ${aa4f0b2f-8885-4c0b-84d8-2a98f68dd46f/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "EFI Binaries" # Label: 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 # Type: ItemTypeScript # Standalone EFI binary utilities. :04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 clear prev_menu set prev_is_script 1 set 5ac8c510-a971-4913-94c1-51e873fd1b7f/prev ${script_path} chain ${base_url}utils/efi/main.ipxe || goto ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "EFI Binaries" (HELP) # Label: 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 # Type: ItemTypeScript # Standalone EFI binary utilities. :04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_help set prev_is_script 0 set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_help/prev 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 echo EFI Binaries: echo Standalone EFI binary utilities. prompt (Press any key to exit) goto ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "EFI Binaries" (CONFIGURATION) # Label: 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5 # Type: ItemTypeScript # Standalone EFI binary utilities. :04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_cfg set prev_is_script 0 echo Set custom boot options for EFI Binaries below. echo Leave blank to use the currently configured options. echo Use the string "%DEFAULT%" (without quotes) to reset to the default. echo echo CURRENT: echo ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/bootopts} echo echo DEFAULT: echo ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_cfg iseq ${user_bootopts} ${} && goto prev_menu_04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_cfg || iseq ${user_bootopts} %DEFAULT% && set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/bootopts ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/orig_bootopts} && goto prev_menu_04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5_cfg || set 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/bootopts ${user_bootopts} && goto ${04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/prev} || goto previous #################### # END ENTRY CONFIG # #################### ############### # BEGIN ENTRY # ############### # Entry: "UEFI Shells" # Label: 0670ef30-ce77-4f69-9760-eb3e27196c06 # Type: ItemTypeScript # UEFI shells of various versions. # Aside from manually selecting a boot device and changing boot order, # an EFI shell allows you to e.g. flash board firmware. :0670ef30-ce77-4f69-9760-eb3e27196c06 set 0670ef30-ce77-4f69-9760-eb3e27196c06/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 clear prev_menu set prev_is_script 1 set e0f9a224-e85a-48b1-bd6a-9710a597ba6a/prev ${script_path} chain ${base_url}utils/uefi/main.ipxe || goto ${0670ef30-ce77-4f69-9760-eb3e27196c06/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "UEFI Shells" (HELP) # Label: 0670ef30-ce77-4f69-9760-eb3e27196c06 # Type: ItemTypeScript # UEFI shells of various versions. # Aside from manually selecting a boot device and changing boot order, # an EFI shell allows you to e.g. flash board firmware. :0670ef30-ce77-4f69-9760-eb3e27196c06_help set prev_is_script 0 set 0670ef30-ce77-4f69-9760-eb3e27196c06_help/prev 0670ef30-ce77-4f69-9760-eb3e27196c06 echo UEFI Shells: echo UEFI shells of various versions. echo Aside from manually selecting a boot device and changing boot order, echo an EFI shell allows you to e.g. flash board firmware. prompt (Press any key to exit) goto ${0670ef30-ce77-4f69-9760-eb3e27196c06/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "iPXE Shell" # Label: f7a859f5-06bf-4d44-9990-6fa8e02d70b2 # Type: ItemTypeCmd # https://ipxe.org/cmd/shell # Direct access to the iPXE embedded shell. Use the exit command to return to the menu. :f7a859f5-06bf-4d44-9990-6fa8e02d70b2 set f7a859f5-06bf-4d44-9990-6fa8e02d70b2/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_is_script 0 goto ipxe_shell || goto ${f7a859f5-06bf-4d44-9990-6fa8e02d70b2/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "iPXE Shell" (HELP) # Label: f7a859f5-06bf-4d44-9990-6fa8e02d70b2 # Type: ItemTypeCmd # https://ipxe.org/cmd/shell # Direct access to the iPXE embedded shell. Use the exit command to return to the menu. :f7a859f5-06bf-4d44-9990-6fa8e02d70b2_help set prev_is_script 0 set f7a859f5-06bf-4d44-9990-6fa8e02d70b2_help/prev f7a859f5-06bf-4d44-9990-6fa8e02d70b2 echo iPXE Shell: echo Direct access to the iPXE embedded shell. Use the exit command to return to the menu. prompt (Press any key to exit) goto ${f7a859f5-06bf-4d44-9990-6fa8e02d70b2/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "Clear/reload cache" # Label: a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b # Type: ItemTypeCmd # https://ipxe.org/ # Clear/reload all cached menus, variables, downloaded files in RAM, etc. :a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b set a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_is_script 0 goto clear_all || goto ${a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Clear/reload cache" (HELP) # Label: a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b # Type: ItemTypeCmd # https://ipxe.org/ # Clear/reload all cached menus, variables, downloaded files in RAM, etc. :a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b_help set prev_is_script 0 set a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b_help/prev a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b echo Clear/reload cache: echo Clear/reload all cached menus, variables, downloaded files in RAM, etc. prompt (Press any key to exit) goto ${a0ebf8e6-d619-4b8e-af4f-5cedbbaada3b/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "Debugging" # Label: e789a7d0-730b-4c0a-845d-4d4f114f25b5 # Type: ItemTypeMenu # https://ipxe.org/ # Enable or disable debug mode for menus/scripts, display version information, etc. # You likely do not need nor want to enable this. ############## # BEGIN MENU # ############## :e789a7d0-730b-4c0a-845d-4d4f114f25b5 # Menu: "Debugging" # Label: e789a7d0-730b-4c0a-845d-4d4f114f25b5 set prev_menu e789a7d0-730b-4c0a-845d-4d4f114f25b5 set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt e789a7d0-730b-4c0a-845d-4d4f114f25b5 # Non-main/secondary menu. set prev_is_script 0 menu Debugging item --gap Debugging currently enabled (0=off, 1=on): ${do_debug} item --key t a58d550e-9402-41bb-837f-2db2f554878e (t) Toggle debugging set a58d550e-9402-41bb-837f-2db2f554878e/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5 item --key v b5f24475-78bc-4300-bb6a-ee42027d9d35 (v) Version Information > set b5f24475-78bc-4300-bb6a-ee42027d9d35/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5 item --gap item --key 0x147e e789a7d0-730b-4c0a-845d-4d4f114f25b5_help (F8) Help > set e789a7d0-730b-4c0a-845d-4d4f114f25b5_help/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5 item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose --default a58d550e-9402-41bb-837f-2db2f554878e target || goto ${target} || goto ${e789a7d0-730b-4c0a-845d-4d4f114f25b5/prev} || goto previous ############ # END MENU # ############ ###################### # BEGIN SUBMENU HELP # ###################### # Menu: "Debugging" (HELP) # Label: e789a7d0-730b-4c0a-845d-4d4f114f25b5 :e789a7d0-730b-4c0a-845d-4d4f114f25b5_help set prev_menu e789a7d0-730b-4c0a-845d-4d4f114f25b5_help set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt e789a7d0-730b-4c0a-845d-4d4f114f25b5_help menu Debugging Help item 1c94d48f-88ec-46b1-a439-15fdb48fe94d_help Debugging currently enabled (0=off, 1=on): ${do_debug} > set 1c94d48f-88ec-46b1-a439-15fdb48fe94d/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5_help item a58d550e-9402-41bb-837f-2db2f554878e_help Toggle debugging > set a58d550e-9402-41bb-837f-2db2f554878e/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5_help item b5f24475-78bc-4300-bb6a-ee42027d9d35_help Version Information > set b5f24475-78bc-4300-bb6a-ee42027d9d35/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5_help item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${e789a7d0-730b-4c0a-845d-4d4f114f25b5_help/prev} || goto previous #################### # END SUBMENU HELP # #################### ################# # BEGIN ENTRIES # ################# # Entries for menu "Debugging" (e789a7d0-730b-4c0a-845d-4d4f114f25b5) ############### # BEGIN ENTRY # ############### # Entry: "Toggle debugging" # Label: a58d550e-9402-41bb-837f-2db2f554878e # Type: ItemTypeCmd # https://ipxe.org/cmd/ # Enable debug mode if currently disabled, disable debug if currently enabled. :a58d550e-9402-41bb-837f-2db2f554878e set a58d550e-9402-41bb-837f-2db2f554878e/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5 set prev_is_script 0 iseq ${do_debug} 0 && set do_debug 1 && goto previous || set do_debug 0 && goto previous || goto ${a58d550e-9402-41bb-837f-2db2f554878e/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Toggle debugging" (HELP) # Label: a58d550e-9402-41bb-837f-2db2f554878e # Type: ItemTypeCmd # https://ipxe.org/cmd/ # Enable debug mode if currently disabled, disable debug if currently enabled. :a58d550e-9402-41bb-837f-2db2f554878e_help set prev_is_script 0 set a58d550e-9402-41bb-837f-2db2f554878e_help/prev a58d550e-9402-41bb-837f-2db2f554878e echo Toggle debugging: echo Enable debug mode if currently disabled, disable debug if currently enabled. prompt (Press any key to exit) goto ${a58d550e-9402-41bb-837f-2db2f554878e/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "Version Information" # Label: b5f24475-78bc-4300-bb6a-ee42027d9d35 # Type: ItemTypeMenu # https://netfire.com/ # This menu displays some version information about the currently running instance. ############## # BEGIN MENU # ############## :b5f24475-78bc-4300-bb6a-ee42027d9d35 # Menu: "NetFire NetBoot Version Information" # Label: b5f24475-78bc-4300-bb6a-ee42027d9d35 set prev_menu b5f24475-78bc-4300-bb6a-ee42027d9d35 set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt b5f24475-78bc-4300-bb6a-ee42027d9d35 # Non-main/secondary menu. set prev_is_script 0 menu NetFire NetBoot Version Information item --gap Agent Version: ${builtin/version} item --gap Agent Platform: ${builtin/platform} item --gap Agent Build Arch: ${builtin/buildarch} item --gap Agent Bitness: ${bits} item --gap Agent arch0: ${arch0} item --gap Agent arch0u: ${arch0u} item --gap Agent arch1: ${arch1} item --gap Agent arch1u: ${arch1u} item --gap Agent arch2: ${arch2} item --gap Agent arch2u: ${arch2u} item --gap Server Version: v1.0.4-c0cf136+3.dirty item --gap Server Base URL: ${base_url} item --gap item --key 0x147e b5f24475-78bc-4300-bb6a-ee42027d9d35_help (F8) Help > set b5f24475-78bc-4300-bb6a-ee42027d9d35_help/prev b5f24475-78bc-4300-bb6a-ee42027d9d35 item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${b5f24475-78bc-4300-bb6a-ee42027d9d35/prev} || goto previous ############ # END MENU # ############ ###################### # BEGIN SUBMENU HELP # ###################### # Menu: "NetFire NetBoot Version Information" (HELP) # Label: b5f24475-78bc-4300-bb6a-ee42027d9d35 :b5f24475-78bc-4300-bb6a-ee42027d9d35_help set prev_menu b5f24475-78bc-4300-bb6a-ee42027d9d35_help set b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt b5f24475-78bc-4300-bb6a-ee42027d9d35_help menu NetFire NetBoot Version Information Help item 0a5310ce-ecf5-4470-aab1-a45f156da25d_help Agent Version: ${builtin/version} > set 0a5310ce-ecf5-4470-aab1-a45f156da25d/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 7faa1059-4947-467c-a5b4-02ab1dc62cff_help Agent Platform: ${builtin/platform} > set 7faa1059-4947-467c-a5b4-02ab1dc62cff/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item f7439f85-c665-45cd-a706-a0e488c881f1_help Agent Build Arch: ${builtin/buildarch} > set f7439f85-c665-45cd-a706-a0e488c881f1/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 4e4e5478-c2a9-4e11-bf1d-5a80a13a0f6f_help Agent Bitness: ${bits} > set 4e4e5478-c2a9-4e11-bf1d-5a80a13a0f6f/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item ecd57e55-a276-4bd9-b0cb-006c56fa5539_help Agent arch0: ${arch0} > set ecd57e55-a276-4bd9-b0cb-006c56fa5539/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item b7ac18e7-b84d-4e89-91aa-027450649c9f_help Agent arch0u: ${arch0u} > set b7ac18e7-b84d-4e89-91aa-027450649c9f/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item da5a9b11-e826-4378-8596-b914352a0d6c_help Agent arch1: ${arch1} > set da5a9b11-e826-4378-8596-b914352a0d6c/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 139be8be-5db8-4099-9c1b-ef169551bb82_help Agent arch1u: ${arch1u} > set 139be8be-5db8-4099-9c1b-ef169551bb82/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item a32d5aaa-00fa-4a9b-ad8d-5399c9825433_help Agent arch2: ${arch2} > set a32d5aaa-00fa-4a9b-ad8d-5399c9825433/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 4e70c8b9-4806-4b44-a6e6-8102886e87cc_help Agent arch2u: ${arch2u} > set 4e70c8b9-4806-4b44-a6e6-8102886e87cc/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 76fc799b-33d5-4533-aa11-882c9154fa15_help Server Version: v1.0.4-c0cf136+3.dirty > set 76fc799b-33d5-4533-aa11-882c9154fa15/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item 33eb6b52-3049-4dbc-b3c5-3072ba76021f_help Server Base URL: ${base_url} > set 33eb6b52-3049-4dbc-b3c5-3072ba76021f/prev b5f24475-78bc-4300-bb6a-ee42027d9d35_help item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${b5f24475-78bc-4300-bb6a-ee42027d9d35_help/prev} || goto previous #################### # END SUBMENU HELP # #################### ################# # BEGIN ENTRIES # ################# # Entries for menu "NetFire NetBoot Version Information" (b5f24475-78bc-4300-bb6a-ee42027d9d35) # End entries for menu "NetFire NetBoot Version Information" (b5f24475-78bc-4300-bb6a-ee42027d9d35) ############### # END ENTRIES # ############### ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Version Information" (HELP) # Label: b5f24475-78bc-4300-bb6a-ee42027d9d35 # Type: ItemTypeMenu # https://netfire.com/ # This menu displays some version information about the currently running instance. :b5f24475-78bc-4300-bb6a-ee42027d9d35_help set prev_is_script 0 set b5f24475-78bc-4300-bb6a-ee42027d9d35_help/prev b5f24475-78bc-4300-bb6a-ee42027d9d35 echo Version Information: echo This menu displays some version information about the currently running instance. prompt (Press any key to exit) goto ${b5f24475-78bc-4300-bb6a-ee42027d9d35/prev} || goto previous ################## # END ENTRY HELP # ################## # End entries for menu "Debugging" (e789a7d0-730b-4c0a-845d-4d4f114f25b5) ############### # END ENTRIES # ############### ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Debugging" (HELP) # Label: e789a7d0-730b-4c0a-845d-4d4f114f25b5 # Type: ItemTypeMenu # https://ipxe.org/ # Enable or disable debug mode for menus/scripts, display version information, etc. # You likely do not need nor want to enable this. :e789a7d0-730b-4c0a-845d-4d4f114f25b5_help set prev_is_script 0 set e789a7d0-730b-4c0a-845d-4d4f114f25b5_help/prev e789a7d0-730b-4c0a-845d-4d4f114f25b5 echo Debugging: echo Enable or disable debug mode for menus/scripts, display version information, etc. echo You likely do not need nor want to enable this. prompt (Press any key to exit) goto ${e789a7d0-730b-4c0a-845d-4d4f114f25b5/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "Boot to Netboot.XYZ" # Label: 621736bd-7b11-42b5-b0ba-59b35e427507 # Type: ItemTypeCmd # https://netboot.xyz # Netboot.XYZ contains many more installation options. :621736bd-7b11-42b5-b0ba-59b35e427507 set 621736bd-7b11-42b5-b0ba-59b35e427507/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_is_script 0 chain --autofree http://boot.netboot.xyz/ || goto ${621736bd-7b11-42b5-b0ba-59b35e427507/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Boot to Netboot.XYZ" (HELP) # Label: 621736bd-7b11-42b5-b0ba-59b35e427507 # Type: ItemTypeCmd # https://netboot.xyz # Netboot.XYZ contains many more installation options. :621736bd-7b11-42b5-b0ba-59b35e427507_help set prev_is_script 0 set 621736bd-7b11-42b5-b0ba-59b35e427507_help/prev 621736bd-7b11-42b5-b0ba-59b35e427507 echo Boot to Netboot.XYZ: echo Netboot.XYZ contains many more installation options. prompt (Press any key to exit) goto ${621736bd-7b11-42b5-b0ba-59b35e427507/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "Reboot" # Label: 2802bc78-045d-42d3-bef5-c708968c38bc # Type: ItemTypeCmd # https://ipxe.org/cmd/reboot # Reboot the machine. :2802bc78-045d-42d3-bef5-c708968c38bc set 2802bc78-045d-42d3-bef5-c708968c38bc/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_is_script 0 reboot || goto ${2802bc78-045d-42d3-bef5-c708968c38bc/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Reboot" (HELP) # Label: 2802bc78-045d-42d3-bef5-c708968c38bc # Type: ItemTypeCmd # https://ipxe.org/cmd/reboot # Reboot the machine. :2802bc78-045d-42d3-bef5-c708968c38bc_help set prev_is_script 0 set 2802bc78-045d-42d3-bef5-c708968c38bc_help/prev 2802bc78-045d-42d3-bef5-c708968c38bc echo Reboot: echo Reboot the machine. prompt (Press any key to exit) goto ${2802bc78-045d-42d3-bef5-c708968c38bc/prev} || goto previous ################## # END ENTRY HELP # ################## ############### # BEGIN ENTRY # ############### # Entry: "ACPI Power Off" # Label: d53c15af-2cd1-4401-87de-92d497aee527 # Type: ItemTypeCmd # https://ipxe.org/cmd/poweroff # Power off the machine immediately. :d53c15af-2cd1-4401-87de-92d497aee527 set d53c15af-2cd1-4401-87de-92d497aee527/prev 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 set prev_is_script 0 poweroff || goto ${d53c15af-2cd1-4401-87de-92d497aee527/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "ACPI Power Off" (HELP) # Label: d53c15af-2cd1-4401-87de-92d497aee527 # Type: ItemTypeCmd # https://ipxe.org/cmd/poweroff # Power off the machine immediately. :d53c15af-2cd1-4401-87de-92d497aee527_help set prev_is_script 0 set d53c15af-2cd1-4401-87de-92d497aee527_help/prev d53c15af-2cd1-4401-87de-92d497aee527 echo ACPI Power Off: echo Power off the machine immediately. prompt (Press any key to exit) goto ${d53c15af-2cd1-4401-87de-92d497aee527/prev} || goto previous ################## # END ENTRY HELP # ################## # End entries for menu "Utilities" (0b762abc-1d75-4d3b-9e48-f38ea0adaef0) ############### # END ENTRIES # ############### ######################### # End menu definitions. # ######################### :skipmenudefs ###################################### # Menu navigation and exit handling. # ###################################### :previous iseq ${do_debug} 1 && goto prev_debug || goto prev_no_debug :prev_debug ## Debugging ## echo cls: ${cls} echo prev_is_script: ${prev_is_script} echo b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt: ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} echo main_menu: ${main_menu} echo prev_menu: ${prev_menu} echo prev_menu (dereferenced); ${prev_menu}/prev: ${${prev_menu}/prev} echo Script utils/main.ipxe (current script): # The "${} ${} " is to force two spaces. They'd be trimmed otherwise. echo ${} ${} b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev: ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev} echo ${} ${} b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt: ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} echo Menus (local to this script) (A blank /prev tends to indicate script's default/entry menu): echo ${} ${} 0b762abc-1d75-4d3b-9e48-f38ea0adaef0 ("Utilities") echo ${} ${} ${} ${} 0b762abc-1d75-4d3b-9e48-f38ea0adaef0/prev: ${0b762abc-1d75-4d3b-9e48-f38ea0adaef0/prev} echo ${} ${} ${} ${} 0b762abc-1d75-4d3b-9e48-f38ea0adaef0/tgt: ${0b762abc-1d75-4d3b-9e48-f38ea0adaef0/tgt} echo target: ${target} echo main_menu: ${main_menu} prompt (press any key to continue to arch) echo echo bits: 64, 32 echo arch0: x86_64, i386, arm64, arm32 echo arch0u: X86_64, I386, ARM64, ARM32 echo arch1: x86_64, x86, arm64, arm32 echo arch1u: X86_64, X86, ARM64, ARM32 echo arch2: amd64, i686, arm64, arm32 echo arch2u: AMD64, I686, ARM64, ARM32 echo buildarch: x86_64, i386, arm64, arm32 echo platform: efi, pcbios, linux echo echo bits, arch0, arch0u, arch1, arch1u, arch2, arch2u, buildarch, platform: echo ${bits}, ${arch0}, ${arch0u}, ${arch1}, ${arch1u}, ${arch2}, ${arch2u}, ${buildarch}, ${platform} echo # ECHO DEBUG OF PREV_NO_DEBUG HERE prompt (press any key to continue regular previous target) :prev_no_debug :prev_test0 # If prev_is_script is true and prev_b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e is set and is this script, # assume exit (as this is probably entry_script, and "previous" dest in this logic tree is to actually exit). # Otherwise continue. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_test0) || iseq ${prev_is_script} 1 && iseq ${prev_b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e} ${script_path} && exit || :prev_test1 # If b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt is set and prev_is_script is false, go to menu in this script - otherwise continue. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_test1) || iseq ${prev_is_script} 0 && isset ${${prev_menu}/prev} && goto ${${prev_menu}/prev} || :prev_test2 # If prev_is_script is set, continue to prev_test3. Otherwise, set to true (default for scripts) and # go to b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt (otherwise continue to prev_test3). # This is in case prev_test1 fails but should have succeeded. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_test2) || isset ${prev_is_script} && goto prev_test3 || set prev_is_script 1 && isset ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} && goto ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} || :prev_test3 # If prev_is_script is 1 (true), our previous menu is in another script so skip to chainloading that. # Otherwise, use this script's last set target. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_test3) || iseq ${prev_is_script} 1 && goto prev_last || isset ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} && goto ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt} || :prev_last # If prev_is_script is true, then we need to go to ${prev_b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e}. The target and exiterr gotos are fallbacks. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_last; chain to ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev}) && prompt (press any key to continue) || chain ${b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev} || goto ${target} || goto exiterr :exiterr echo ERROR ENCOUNTERED iseq ${do_debug} 1 && sleep 2 || exit 1 :exitsuccess exit 0 :exit goto exit_${platform} :exit_efi # We exit 1 instead of just exit (exit with error vs. exit without error) so some broken UEFI will boot the "next" device. exit 0 :exit_pcbios # Boot the "first hard disk". Unpredictable, but so's BIOS lol. sanboot --no-describe --drive 0x80 || # TODO: https://ipxe.org/appnote/work_around_bios_halting_on_ipxe_exit ? exit 1 #exit :main_menu goto ${main_menu} || chain ${entry_script} || goto previous :clear_all # Clear dynamic session-based variables. imgfree || clear do_debug clear bg_set clear prev_is_script clear b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/prev clear b20f6ffb-0bb7-478b-98bc-47ed7c9bad8e/tgt clear main_menu clear ${prev_menu}/prev clear prev_menu clear 0b762abc-1d75-4d3b-9e48-f38ea0adaef0/prev clear 0b762abc-1d75-4d3b-9e48-f38ea0adaef0/tgt clear target clear main_menu clear bits clear arch0 clear arch0u clear arch1 clear arch1u clear arch2 clear arch2u clear esc clear cls clear f407944f-61f0-4480-8d09-4786ac9b3f18/bootopts clear f407944f-61f0-4480-8d09-4786ac9b3f18/orig_bootopts clear 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/bootopts clear 04ad4ae3-d412-4ff7-94e4-8132a7c2c0a5/orig_bootopts chain --autofree --replace ${entry_script} || goto exiterr :ipxe_shell echo ${cls} echo This is the NetFire NetBoot shell. echo Use the 'help' command for a list of possible commands. echo Exit back to the menu by executing the command 'exit'. shell || goto exiterr goto previous ###################################### # End menu navigation/exit handling. # ######################################