2019-11-18 01:06:28 -05:00
|
|
|
{% extends 'formatting.ipxe.j2' %}
|
|
|
|
{% block menu%}
|
2019-11-18 05:38:04 -05:00
|
|
|
{# NET ############################################################################################################## #}
|
|
|
|
{#
|
|
|
|
# Refresh the DHCP lease just in case.
|
2019-11-18 01:06:28 -05:00
|
|
|
dhcp
|
2019-11-18 05:38:04 -05:00
|
|
|
#}
|
|
|
|
{# ARCH DETECTION ################################################################################################### #}
|
2019-11-18 01:06:28 -05:00
|
|
|
cpuid --ext 29 && set bits 64 || set bits 32
|
|
|
|
cpuid --ext 29 && set arch x86_64 || set arch x86
|
2019-11-18 05:38:04 -05:00
|
|
|
iseq ${platform} efi && set is_efi y || set is_efi n
|
|
|
|
{# BASE ############################################################################################################# #}
|
2019-11-18 01:06:28 -05:00
|
|
|
:main
|
|
|
|
menu BootBox @ {{ request.url_root }}
|
|
|
|
{% for mt in ('install', 'utilities') %}
|
2019-11-18 05:38:04 -05:00
|
|
|
item --gap -- = {{ mt.upper() }} =
|
2019-11-18 01:06:28 -05:00
|
|
|
{% for os in db.getMenu(mt) %}
|
|
|
|
item --key {{ os['shortcut'] }} {{ os['name'] }} ({{ os['shortcut'] }}) {{ os['desc'] }}
|
|
|
|
{%- endfor %}
|
|
|
|
{% endfor %}
|
2019-11-18 05:38:04 -05:00
|
|
|
choose --timeout 60 --default rescue base || goto cancel
|
|
|
|
set menu-timeout 0
|
|
|
|
goto ${base}
|
|
|
|
{# CANCEL ########################################################################################################### #}
|
|
|
|
:cancel
|
|
|
|
echo iPXE canceled; continuing boot.
|
|
|
|
goto exit
|
|
|
|
{# REBOOT ########################################################################################################### #}
|
|
|
|
:reboot
|
|
|
|
reboot
|
|
|
|
{# EXIT ############################################################################################################# #}
|
|
|
|
:exit
|
|
|
|
exit 0
|
|
|
|
{# CONFIGURE ######################################################################################################## #}
|
|
|
|
:config
|
|
|
|
config
|
|
|
|
goto main
|
|
|
|
{# SHELL ############################################################################################################ #}
|
|
|
|
:ipxe_shell
|
|
|
|
echo To return to the menu, use the "exit" command.
|
2019-11-18 01:06:28 -05:00
|
|
|
shell
|
2019-11-18 05:38:04 -05:00
|
|
|
goto :main
|
|
|
|
{# INSTALL ########################################################################################################## #}
|
|
|
|
{%- for os in db.getMenu('install') %}
|
|
|
|
:{{ os['name'] }}
|
|
|
|
menu == {{ os['desc'] }} ==
|
|
|
|
{%- for sub_os in db.getMenu(os['name']) %}
|
|
|
|
item --key {{ sub_os['shortcut'] }} {{ sub_os['name'] }} ({{ sub_os['shortcut'] }}) {{ sub_os['desc'] }} (version: {{ sub_os['version'] }})
|
|
|
|
{%- endfor %}
|
|
|
|
item --key < main (<) Back to Main Menu
|
|
|
|
choose --timeout 60 --default main install_choice || goto cancel
|
|
|
|
set menu-timeout 0
|
|
|
|
goto ${install_choice}
|
|
|
|
{% endfor %}
|
|
|
|
{# UTILITIES ######################################################################################################## #}
|
|
|
|
{%- for u in db.getMenu('utilities') %}
|
|
|
|
:{{ u['name'] }}
|
|
|
|
{%- if u['command'] %}
|
|
|
|
{%- if u['command'].startswith('chain ') %}
|
|
|
|
{{ u['command'] }}
|
|
|
|
{%- else %}
|
|
|
|
goto {{ u['name'] }}
|
|
|
|
{%- endif %}
|
|
|
|
{%- else %}
|
|
|
|
menu === {{ u['desc'] }} ===
|
|
|
|
{%- for su in db.getMenu(u['name']) %}
|
|
|
|
{%- if su['name'] == 'uefi_shell' %}
|
|
|
|
iseq ${is_efi} n && item --gap -- WARNING: Not detected as UEFI. These may not work correctly.
|
|
|
|
{%- endif %}
|
|
|
|
item --key {{ su['shortcut'] }} {{ su['name'] }} ({{ su['shortcut'] }}) {{ su['desc'] }} (version: {{ su['version'] }})
|
|
|
|
{%- endfor %}
|
|
|
|
item --key < main (<) Back to Main Menu
|
|
|
|
choose --timeout 60 --default main {{ u['name'] }}_choice || goto cancel
|
|
|
|
set menu-timeout 0
|
|
|
|
goto {{'${'}}{{ u['name'] }}_choice{{ '}' }}
|
|
|
|
{%- endif %}
|
|
|
|
{% endfor %}
|
|
|
|
# END
|
2019-11-18 01:06:28 -05:00
|
|
|
{% endblock %}
|