Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 1 | #!ipxe |
| 2 | {# |
| 3 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 4 | SPDX-License-Identifier: Apache-2.0 |
| 5 | #} |
| 6 | |
| 7 | # variables |
| 8 | set menu_timeout 10000 |
| 9 | set menu_default exit |
| 10 | set http_server_url {{ pxeboot_web_server }} |
| 11 | |
| 12 | # menu |
| 13 | :start |
| 14 | menu ONF iPXE Boot Menu |
Zack Williams | a5a10bc | 2021-04-06 11:58:44 -0700 | [diff] [blame^] | 15 | item --gap -- ------------------------- System and Network Info ------------------------ |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 16 | item --gap -- MAC: ${net0/mac}, Serial Number: ${serial}, Chipset: ${net0/chip} |
| 17 | item --gap -- Manufacturer: ${manufacturer}, Product: ${product} |
| 18 | item --gap -- UUID: ${uuid} |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 19 | item --gap -- IP: ${net0/ip}, Netmask: ${net0/netmask}, Gateway: ${net0/gateway} |
| 20 | item --gap -- DNS Servers: ${net0/dns}, Domain: ${net0/domain} |
| 21 | item --gap -- DHCP Server: ${net0/dhcp-server} |
| 22 | item --gap -- ------------------------- Operating systems ------------------------------ |
Zack Williams | a5a10bc | 2021-04-06 11:58:44 -0700 | [diff] [blame^] | 23 | item --key d deb10 Debian 10 Installer |
| 24 | item --key f deb10f Debian 10 Installer (nonfree firmware) |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 25 | item --key u ub1804 Ubuntu 18.04 Installer |
Zack Williams | a5a10bc | 2021-04-06 11:58:44 -0700 | [diff] [blame^] | 26 | item --key a ub1804a Ubuntu 18.04 Installer (fully automatic) |
| 27 | item --key t ub1804adt Ubuntu 18.04 Installer (fully automatic, debug, text) |
| 28 | item --gap -- ------------------------- Utilities -------------------------------------- |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 29 | item --key m memtest Memtest |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 30 | item --key c configure Configuration Menu |
| 31 | item --key s shell iPXE Shell |
| 32 | item --key r reboot Reboot |
| 33 | item --key x exit Exit iPXE and continue system boot |
| 34 | choose --timeout ${menu_timeout} --default ${menu_default} selected || goto cancel |
| 35 | set menu-timeout 0 |
| 36 | goto ${selected} |
| 37 | |
| 38 | # other functions |
| 39 | :cancel |
| 40 | echo Menu canceled, dropping to iPXE shell |
| 41 | goto shell |
| 42 | |
| 43 | :configure |
| 44 | config |
| 45 | set menu-timeout 0 |
| 46 | set submenu-timeout 0 |
| 47 | goto start |
| 48 | |
| 49 | :shell |
| 50 | echo Type 'exit' to get the back to the menu |
| 51 | shell |
| 52 | set menu-timeout 0 |
| 53 | set submenu-timeout 0 |
| 54 | goto start |
| 55 | |
| 56 | :failed |
| 57 | echo Booting failed, dropping to shell |
| 58 | goto shell |
| 59 | |
| 60 | :reboot |
| 61 | reboot |
| 62 | |
| 63 | :exit |
| 64 | exit |
| 65 | |
| 66 | # diagnostics |
| 67 | :memtest |
| 68 | echo Booting Memtest |
| 69 | kernel ${http_server_url}/memtest/memdisk |
| 70 | initrd ${http_server_url}/memtest/memtest.iso |
| 71 | imgargs memdisk iso raw |
| 72 | boot || goto failed |
| 73 | |
| 74 | # installers |
| 75 | |
Zack Williams | a5a10bc | 2021-04-06 11:58:44 -0700 | [diff] [blame^] | 76 | # Debian 10 |
| 77 | :deb10 |
| 78 | echo Booting Debian 10 Installer |
| 79 | kernel ${http_server_url}/debian10/linux |
| 80 | initrd ${http_server_url}/debian10/initrd.gz |
| 81 | boot || goto failed |
| 82 | |
| 83 | # Debian 10 with nonfree firmware |
| 84 | :deb10f |
| 85 | echo Booting Debian 10 Installer with nonfree firmware |
| 86 | kernel ${http_server_url}/debian10/linux initrd=initrd.gz initrd=firmware.cpio.gz |
| 87 | initrd ${http_server_url}/debian10/initrd.gz |
| 88 | initrd ${http_server_url}/debian10/firmware.cpio.gz |
| 89 | boot || goto failed |
| 90 | |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 91 | # Ubuntu 18.04 |
| 92 | :ub1804 |
| 93 | echo Booting Ubuntu 18.04 Installer |
| 94 | kernel ${http_server_url}/ubuntu1804/linux |
| 95 | initrd ${http_server_url}/ubuntu1804/initrd.gz |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 96 | boot || goto failed |
| 97 | |
| 98 | # Ubuntu 18.04 autoinstall |
| 99 | # https://ipxe.org/appnote/debian_preseed |
| 100 | :ub1804a |
| 101 | echo Booting Ubuntu 18.04 Installer |
Zack Williams | db39414 | 2020-11-11 22:52:34 -0700 | [diff] [blame] | 102 | kernel ${http_server_url}/ubuntu1804/linux initrd=initrd.gz initrd=preseed.cfg |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 103 | initrd ${http_server_url}/ubuntu1804/initrd.gz |
| 104 | initrd ${http_server_url}/ubuntu1804/${serial}_preseed.cfg preseed.cfg |
Zack Williams | 3fcd2c5 | 2021-03-02 21:44:52 -0700 | [diff] [blame] | 105 | boot || goto failed |
| 106 | |
| 107 | # Ubuntu 18.04 autoinstall, text-mode, debug |
| 108 | :ub1804adt |
| 109 | echo Booting Ubuntu 18.04 Installer, text mode, debug |
| 110 | kernel ${http_server_url}/ubuntu1804/linux initrd=initrd.gz initrd=preseed.cfg DEBIAN_FRONTEND=text BOOT_DEBUG=2 |
| 111 | initrd ${http_server_url}/ubuntu1804/initrd.gz |
| 112 | initrd ${http_server_url}/ubuntu1804/${serial}_preseed.cfg preseed.cfg |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 113 | boot || goto failed |