#!ipxe # Script: install/auto/linux/cloud/9.ipxe # ID: 364e4a61-9637-4799-88bd-5d546b0353a7 # 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}install/auto/linux/cloud/9.ipxe || # If 364e4a61-9637-4799-88bd-5d546b0353a7/prev (this script) is not set, assume this is the entry script. isset ${364e4a61-9637-4799-88bd-5d546b0353a7/prev} || set 364e4a61-9637-4799-88bd-5d546b0353a7/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 # Bootopts for Normal/Graphical Install ## "Live"/Active isset ${5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts} || set 5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac} ## Original set 5f6a640e-fd22-4e15-935f-5042f289d3e5/orig_bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac} # Bootopts for Normal/Graphical Install (Suppress Reboot) ## "Live"/Active isset ${39f36342-8a40-451e-96dc-7e3743cb329d/bootopts} || set 39f36342-8a40-451e-96dc-7e3743cb329d/bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac}&no_reboot=1 ## Original set 39f36342-8a40-451e-96dc-7e3743cb329d/orig_bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac}&no_reboot=1 # Bootopts for Serial/Text Mode Install ## "Live"/Active isset ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts} || set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.text inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac} ## Original set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/orig_bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.text inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac} # Bootopts for Serial/Text Mode Install (Suppress Reboot) ## "Live"/Active isset ${c590e448-8f58-40c2-9b08-5433251f5e80/bootopts} || set c590e448-8f58-40c2-9b08-5433251f5e80/bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.text inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac}&no_reboot=1 ## Original set c590e448-8f58-40c2-9b08-5433251f5e80/orig_bootopts initrd=initrd.img ip=dhcp BOOTIF=${netX/mac} quiet inst.noverifyssl inst.repo=${base_url}loop/cloud/9 inst.text inst.ks=${base_url}auto/ks?distro=cloud&major=9&minor=2&mac=${mac}&no_reboot=1 ##################### # End boot options. # ##################### :skipgetbootopts ########################## # Target Selection/flow. # ########################## :findtarget # If we previously loaded (and left/attempted to leave) a menu within this script, # ${364e4a61-9637-4799-88bd-5d546b0353a7/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 ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} && goto ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} || ######################## # End Target Selection # ######################## :skipfindtarget ##################### # Menu definitions. # ##################### :menudefs ############## # BEGIN MENU # ############## :f12b3bc6-523c-44ce-aa8d-79ed999b350a # Menu: "CloudLinux 9 Kickstart" # Label: f12b3bc6-523c-44ce-aa8d-79ed999b350a set prev_menu f12b3bc6-523c-44ce-aa8d-79ed999b350a set 364e4a61-9637-4799-88bd-5d546b0353a7/tgt f12b3bc6-523c-44ce-aa8d-79ed999b350a # Script main/default menu. set prev_is_script 1 menu CloudLinux 9 Kickstart item --key n 5f6a640e-fd22-4e15-935f-5042f289d3e5 (n) Normal/Graphical Install set 5f6a640e-fd22-4e15-935f-5042f289d3e5/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --key N 39f36342-8a40-451e-96dc-7e3743cb329d (N) Normal/Graphical Install (Suppress Reboot) set 39f36342-8a40-451e-96dc-7e3743cb329d/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --key s 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 (s) Serial/Text Mode Install set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --key S c590e448-8f58-40c2-9b08-5433251f5e80 (S) Serial/Text Mode Install (Suppress Reboot) set c590e448-8f58-40c2-9b08-5433251f5e80/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --gap item --key 0x147e f12b3bc6-523c-44ce-aa8d-79ed999b350a_help (F8) Help > set f12b3bc6-523c-44ce-aa8d-79ed999b350a_help/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --key 0x157e f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg (F9) Configure boot options for item(s) above set f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose --default 5f6a640e-fd22-4e15-935f-5042f289d3e5 target || goto ${target} || goto ${f12b3bc6-523c-44ce-aa8d-79ed999b350a/prev} || goto previous ############ # END MENU # ############ ###################### # BEGIN SUBMENU HELP # ###################### # Menu: "CloudLinux 9 Kickstart" (HELP) # Label: f12b3bc6-523c-44ce-aa8d-79ed999b350a :f12b3bc6-523c-44ce-aa8d-79ed999b350a_help set prev_menu f12b3bc6-523c-44ce-aa8d-79ed999b350a_help set 364e4a61-9637-4799-88bd-5d546b0353a7/tgt f12b3bc6-523c-44ce-aa8d-79ed999b350a_help menu CloudLinux 9 Kickstart Help item 5f6a640e-fd22-4e15-935f-5042f289d3e5_help Normal/Graphical Install > set 5f6a640e-fd22-4e15-935f-5042f289d3e5/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_help item 39f36342-8a40-451e-96dc-7e3743cb329d_help Normal/Graphical Install (Suppress Reboot) > set 39f36342-8a40-451e-96dc-7e3743cb329d/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_help item 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_help Serial/Text Mode Install > set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_help item c590e448-8f58-40c2-9b08-5433251f5e80_help Serial/Text Mode Install (Suppress Reboot) > set c590e448-8f58-40c2-9b08-5433251f5e80/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_help item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${f12b3bc6-523c-44ce-aa8d-79ed999b350a_help/prev} || goto previous #################### # END SUBMENU HELP # #################### ######################## # BEGIN SUBMENU CONFIG # ######################## # Menu: "CloudLinux 9 Kickstart" (CONFIGURATION) # Label: f12b3bc6-523c-44ce-aa8d-79ed999b350a :f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg set prev_menu f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg set 364e4a61-9637-4799-88bd-5d546b0353a7/tgt f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg menu CloudLinux 9 Kickstart Configuration item 5f6a640e-fd22-4e15-935f-5042f289d3e5_cfg Normal/Graphical Install > set 5f6a640e-fd22-4e15-935f-5042f289d3e5/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg item 39f36342-8a40-451e-96dc-7e3743cb329d_cfg Normal/Graphical Install (Suppress Reboot) > set 39f36342-8a40-451e-96dc-7e3743cb329d/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg item 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_cfg Serial/Text Mode Install > set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg item c590e448-8f58-40c2-9b08-5433251f5e80_cfg Serial/Text Mode Install (Suppress Reboot) > set c590e448-8f58-40c2-9b08-5433251f5e80/prev f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg item --gap item --key 0x1b previous (ESC) Previous menu item --key 0x167e main_menu (F10) Main Menu ... choose target || goto ${target} || goto ${f12b3bc6-523c-44ce-aa8d-79ed999b350a_cfg/prev} || goto previous ###################### # END SUBMENU CONFIG # ###################### ################# # BEGIN ENTRIES # ################# # Entries for menu "CloudLinux 9 Kickstart" (f12b3bc6-523c-44ce-aa8d-79ed999b350a) ############### # BEGIN ENTRY # ############### # Entry: "Normal/Graphical Install" # Label: 5f6a640e-fd22-4e15-935f-5042f289d3e5 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI. :5f6a640e-fd22-4e15-935f-5042f289d3e5 set prev_is_script 0 kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts} || goto previous initrd ${base_url}loop/cloud/9/isolinux/initrd.img || goto previous boot || goto ${5f6a640e-fd22-4e15-935f-5042f289d3e5/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Normal/Graphical Install" (HELP) # Label: 5f6a640e-fd22-4e15-935f-5042f289d3e5 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI. :5f6a640e-fd22-4e15-935f-5042f289d3e5_help set prev_is_script 0 set 5f6a640e-fd22-4e15-935f-5042f289d3e5_help/prev 5f6a640e-fd22-4e15-935f-5042f289d3e5 echo Normal/Graphical Install: echo Run the Anaconda installer GUI. prompt (Press any key to exit) goto ${5f6a640e-fd22-4e15-935f-5042f289d3e5/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "Normal/Graphical Install" (CONFIGURATION) # Label: 5f6a640e-fd22-4e15-935f-5042f289d3e5 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI. :5f6a640e-fd22-4e15-935f-5042f289d3e5_cfg set prev_is_script 0 echo Set custom boot options for Normal/Graphical Install 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 ${5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts} echo echo DEFAULT: echo ${5f6a640e-fd22-4e15-935f-5042f289d3e5/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_5f6a640e-fd22-4e15-935f-5042f289d3e5_cfg iseq ${user_bootopts} ${} && goto prev_menu_5f6a640e-fd22-4e15-935f-5042f289d3e5_cfg || iseq ${user_bootopts} %DEFAULT% && set 5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts ${5f6a640e-fd22-4e15-935f-5042f289d3e5/orig_bootopts} && goto prev_menu_5f6a640e-fd22-4e15-935f-5042f289d3e5_cfg || set 5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts ${user_bootopts} && goto ${5f6a640e-fd22-4e15-935f-5042f289d3e5/prev} || goto previous #################### # END ENTRY CONFIG # #################### ############### # BEGIN ENTRY # ############### # Entry: "Normal/Graphical Install (Suppress Reboot)" # Label: 39f36342-8a40-451e-96dc-7e3743cb329d # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI but do not reboot into the new install when complete. Useful for debugging. :39f36342-8a40-451e-96dc-7e3743cb329d set prev_is_script 0 kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${39f36342-8a40-451e-96dc-7e3743cb329d/bootopts} || goto previous initrd ${base_url}loop/cloud/9/isolinux/initrd.img || goto previous boot || goto ${39f36342-8a40-451e-96dc-7e3743cb329d/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Normal/Graphical Install (Suppress Reboot)" (HELP) # Label: 39f36342-8a40-451e-96dc-7e3743cb329d # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI but do not reboot into the new install when complete. Useful for debugging. :39f36342-8a40-451e-96dc-7e3743cb329d_help set prev_is_script 0 set 39f36342-8a40-451e-96dc-7e3743cb329d_help/prev 39f36342-8a40-451e-96dc-7e3743cb329d echo Normal/Graphical Install (Suppress Reboot): echo Run the Anaconda installer GUI but do not reboot into the new install when complete. Useful for debugging. prompt (Press any key to exit) goto ${39f36342-8a40-451e-96dc-7e3743cb329d/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "Normal/Graphical Install (Suppress Reboot)" (CONFIGURATION) # Label: 39f36342-8a40-451e-96dc-7e3743cb329d # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer GUI but do not reboot into the new install when complete. Useful for debugging. :39f36342-8a40-451e-96dc-7e3743cb329d_cfg set prev_is_script 0 echo Set custom boot options for Normal/Graphical Install (Suppress Reboot) 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 ${39f36342-8a40-451e-96dc-7e3743cb329d/bootopts} echo echo DEFAULT: echo ${39f36342-8a40-451e-96dc-7e3743cb329d/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_39f36342-8a40-451e-96dc-7e3743cb329d_cfg iseq ${user_bootopts} ${} && goto prev_menu_39f36342-8a40-451e-96dc-7e3743cb329d_cfg || iseq ${user_bootopts} %DEFAULT% && set 39f36342-8a40-451e-96dc-7e3743cb329d/bootopts ${39f36342-8a40-451e-96dc-7e3743cb329d/orig_bootopts} && goto prev_menu_39f36342-8a40-451e-96dc-7e3743cb329d_cfg || set 39f36342-8a40-451e-96dc-7e3743cb329d/bootopts ${user_bootopts} && goto ${39f36342-8a40-451e-96dc-7e3743cb329d/prev} || goto previous #################### # END ENTRY CONFIG # #################### ############### # BEGIN ENTRY # ############### # Entry: "Serial/Text Mode Install" # Label: 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode. :3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 set prev_is_script 0 iseq ${do_serial} 1 && kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts} console=tty1 console=ttyS0,9600n8 || kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts} || goto previous initrd ${base_url}loop/cloud/9/isolinux/initrd.img || goto previous boot || goto ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Serial/Text Mode Install" (HELP) # Label: 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode. :3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_help set prev_is_script 0 set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_help/prev 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 echo Serial/Text Mode Install: echo Run the Anaconda installer in text-only mode. prompt (Press any key to exit) goto ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "Serial/Text Mode Install" (CONFIGURATION) # Label: 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode. :3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_cfg set prev_is_script 0 echo Set custom boot options for Serial/Text Mode Install 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 ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts} echo echo DEFAULT: echo ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_cfg iseq ${user_bootopts} ${} && goto prev_menu_3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_cfg || iseq ${user_bootopts} %DEFAULT% && set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/orig_bootopts} && goto prev_menu_3ab689ad-cb0d-48b0-b83c-98111d7fc5e8_cfg || set 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts ${user_bootopts} && goto ${3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/prev} || goto previous #################### # END ENTRY CONFIG # #################### ############### # BEGIN ENTRY # ############### # Entry: "Serial/Text Mode Install (Suppress Reboot)" # Label: c590e448-8f58-40c2-9b08-5433251f5e80 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode but do not reboot into the new install when complete. Useful for debugging. :c590e448-8f58-40c2-9b08-5433251f5e80 set prev_is_script 0 iseq ${do_serial} 1 && kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${c590e448-8f58-40c2-9b08-5433251f5e80/bootopts} console=tty1 console=ttyS0,9600n8 || kernel ${base_url}loop/cloud/9/isolinux/vmlinuz ${c590e448-8f58-40c2-9b08-5433251f5e80/bootopts} || goto previous initrd ${base_url}loop/cloud/9/isolinux/initrd.img || goto previous boot || goto ${c590e448-8f58-40c2-9b08-5433251f5e80/prev} || goto previous ############# # END ENTRY # ############# #################### # BEGIN ENTRY HELP # #################### # Entry: "Serial/Text Mode Install (Suppress Reboot)" (HELP) # Label: c590e448-8f58-40c2-9b08-5433251f5e80 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode but do not reboot into the new install when complete. Useful for debugging. :c590e448-8f58-40c2-9b08-5433251f5e80_help set prev_is_script 0 set c590e448-8f58-40c2-9b08-5433251f5e80_help/prev c590e448-8f58-40c2-9b08-5433251f5e80 echo Serial/Text Mode Install (Suppress Reboot): echo Run the Anaconda installer in text-only mode but do not reboot into the new install when complete. Useful for debugging. prompt (Press any key to exit) goto ${c590e448-8f58-40c2-9b08-5433251f5e80/prev} || goto previous ################## # END ENTRY HELP # ################## ###################### # BEGIN ENTRY CONFIG # ###################### # Entry: "Serial/Text Mode Install (Suppress Reboot)" (CONFIGURATION) # Label: c590e448-8f58-40c2-9b08-5433251f5e80 # Type: ItemTypeKernel # https://repo.cloudlinux.com/cloudlinux/ # Run the Anaconda installer in text-only mode but do not reboot into the new install when complete. Useful for debugging. :c590e448-8f58-40c2-9b08-5433251f5e80_cfg set prev_is_script 0 echo Set custom boot options for Serial/Text Mode Install (Suppress Reboot) 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 ${c590e448-8f58-40c2-9b08-5433251f5e80/bootopts} echo echo DEFAULT: echo ${c590e448-8f58-40c2-9b08-5433251f5e80/orig_bootopts} echo echo -n Boot options: ${} && read user_bootopts || goto prev_menu_c590e448-8f58-40c2-9b08-5433251f5e80_cfg iseq ${user_bootopts} ${} && goto prev_menu_c590e448-8f58-40c2-9b08-5433251f5e80_cfg || iseq ${user_bootopts} %DEFAULT% && set c590e448-8f58-40c2-9b08-5433251f5e80/bootopts ${c590e448-8f58-40c2-9b08-5433251f5e80/orig_bootopts} && goto prev_menu_c590e448-8f58-40c2-9b08-5433251f5e80_cfg || set c590e448-8f58-40c2-9b08-5433251f5e80/bootopts ${user_bootopts} && goto ${c590e448-8f58-40c2-9b08-5433251f5e80/prev} || goto previous #################### # END ENTRY CONFIG # #################### # End entries for menu "CloudLinux 9 Kickstart" (f12b3bc6-523c-44ce-aa8d-79ed999b350a) ############### # 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 364e4a61-9637-4799-88bd-5d546b0353a7/tgt: ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} echo main_menu: ${main_menu} echo prev_menu: ${prev_menu} echo prev_menu (dereferenced); ${prev_menu}/prev: ${${prev_menu}/prev} echo Script install/auto/linux/cloud/9.ipxe (current script): # The "${} ${} " is to force two spaces. They'd be trimmed otherwise. echo ${} ${} 364e4a61-9637-4799-88bd-5d546b0353a7/prev: ${364e4a61-9637-4799-88bd-5d546b0353a7/prev} echo ${} ${} 364e4a61-9637-4799-88bd-5d546b0353a7/tgt: ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} echo Menus (local to this script) (A blank /prev tends to indicate script's default/entry menu): echo ${} ${} f12b3bc6-523c-44ce-aa8d-79ed999b350a ("CloudLinux 9 Kickstart") echo ${} ${} ${} ${} f12b3bc6-523c-44ce-aa8d-79ed999b350a/prev: ${f12b3bc6-523c-44ce-aa8d-79ed999b350a/prev} echo ${} ${} ${} ${} f12b3bc6-523c-44ce-aa8d-79ed999b350a/tgt: ${f12b3bc6-523c-44ce-aa8d-79ed999b350a/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_364e4a61-9637-4799-88bd-5d546b0353a7 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_364e4a61-9637-4799-88bd-5d546b0353a7} ${script_path} && exit || :prev_test1 # If 364e4a61-9637-4799-88bd-5d546b0353a7/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 364e4a61-9637-4799-88bd-5d546b0353a7/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 ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} && goto ${364e4a61-9637-4799-88bd-5d546b0353a7/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 ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} && goto ${364e4a61-9637-4799-88bd-5d546b0353a7/tgt} || :prev_last # If prev_is_script is true, then we need to go to ${prev_364e4a61-9637-4799-88bd-5d546b0353a7}. The target and exiterr gotos are fallbacks. iseq ${do_debug} 1 && prompt (PREVIOUS: prev_last; chain to ${364e4a61-9637-4799-88bd-5d546b0353a7/prev}) && prompt (press any key to continue) || chain ${364e4a61-9637-4799-88bd-5d546b0353a7/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 364e4a61-9637-4799-88bd-5d546b0353a7/prev clear 364e4a61-9637-4799-88bd-5d546b0353a7/tgt clear main_menu clear ${prev_menu}/prev clear prev_menu clear f12b3bc6-523c-44ce-aa8d-79ed999b350a/prev clear f12b3bc6-523c-44ce-aa8d-79ed999b350a/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 5f6a640e-fd22-4e15-935f-5042f289d3e5/bootopts clear 5f6a640e-fd22-4e15-935f-5042f289d3e5/orig_bootopts clear 39f36342-8a40-451e-96dc-7e3743cb329d/bootopts clear 39f36342-8a40-451e-96dc-7e3743cb329d/orig_bootopts clear 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/bootopts clear 3ab689ad-cb0d-48b0-b83c-98111d7fc5e8/orig_bootopts clear c590e448-8f58-40c2-9b08-5433251f5e80/bootopts clear c590e448-8f58-40c2-9b08-5433251f5e80/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. # ######################################