Created
July 7, 2020 17:01
-
-
Save rikka0w0/9fdc34c39ed1d274af949d974e8394f2 to your computer and use it in GitHub Desktop.
An iPEX menu for openwrt box with extension support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ipxe | |
# dhcp | |
set advanced-server 192.168.9.9 | |
set advanced-menu tftp://${advanced-server}/main.ipxe | |
# Some menu defaults | |
set menu-timeout 10000 | |
set submenu-timeout ${menu-timeout} | |
set menu-default ubuntu1804_live | |
:start | |
menu iPXE boot menu | |
item --key b other Others | |
item --gap -- ---------------------------- Installers ---------------------------------- | |
item --key u ubuntu1804_inst Install Ubuntu 18.04 (AMD64) | |
item --key d debian10_inst Install Debian 10 (AMD64) | |
item --gap -- ------------------------- Advanced options ------------------------------- | |
item --key s shell Drop to iPXE shell | |
item reboot Reboot | |
item | |
item --key x exit Exit iPXE and continue BIOS boot | |
choose --timeout ${menu-timeout} --default ${menu-default} selected || goto cancel | |
set menu-timeout 0 | |
goto ${selected} | |
:cancel | |
echo You cancelled the menu, dropping you to a shell | |
:shell | |
echo Type 'exit' to get the back to the menu | |
shell | |
set menu-timeout 0 | |
set submenu-timeout 0 | |
goto start | |
:reboot | |
reboot | |
:exit | |
exit | |
### | |
### Custom menu entries | |
### | |
:other | |
set prev-server ${next-server} | |
set next-server ${advanced-server} | |
kernel ${advanced-menu} | |
boot | |
set next-server ${prev-server} | |
goto start | |
:ubuntu1804_inst kernel http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux initrd http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz boot goto start | |
:debian10_inst | |
kernel http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux | |
initrd http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz | |
boot | |
goto start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment