blob: 648c3ef1069e443b20449de236179a3d86e4c489 [file] [log] [blame]
Zack Williams5b5d9a72020-11-06 13:59:06 -07001#!ipxe
2{#
3SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
4SPDX-License-Identifier: Apache-2.0
5#}
6
7# variables
8set menu_timeout 10000
9set menu_default exit
10set http_server_url {{ pxeboot_web_server }}
11
12# menu
13:start
14menu ONF iPXE Boot Menu
15item --gap -- ------------------------- System Info ------------------------------------
16item --gap -- MAC: ${net0/mac}, Serial Number: ${serial}, Chipset: ${net0/chip}
17item --gap -- Manufacturer: ${manufacturer}, Product: ${product}
18item --gap -- UUID: ${uuid}
19item --gap -- ------------------------- Network Info ------------------------------------
20item --gap -- IP: ${net0/ip}, Netmask: ${net0/netmask}, Gateway: ${net0/gateway}
21item --gap -- DNS Servers: ${net0/dns}, Domain: ${net0/domain}
22item --gap -- DHCP Server: ${net0/dhcp-server}
23item --gap -- ------------------------- Operating systems ------------------------------
24item --key u ub1804 Ubuntu 18.04 Installer
25item --key u ub1804a Ubuntu 18.04 Installer (fully automatic)
Zack Williams3fcd2c52021-03-02 21:44:52 -070026item --key u ub1804adt Ubuntu 18.04 Installer (fully automatic, debug, text)
Zack Williams5b5d9a72020-11-06 13:59:06 -070027item --gap -- ------------------------- Diagnostics ------------------------------------
28item --key m memtest Memtest
29item --gap -- ------------------------- Other ------------------------------------------
30item --key c configure Configuration Menu
31item --key s shell iPXE Shell
32item --key r reboot Reboot
33item --key x exit Exit iPXE and continue system boot
34choose --timeout ${menu_timeout} --default ${menu_default} selected || goto cancel
35set menu-timeout 0
36goto ${selected}
37
38# other functions
39:cancel
40echo Menu canceled, dropping to iPXE shell
41goto shell
42
43:configure
44config
45set menu-timeout 0
46set submenu-timeout 0
47goto start
48
49:shell
50echo Type 'exit' to get the back to the menu
51shell
52set menu-timeout 0
53set submenu-timeout 0
54goto start
55
56:failed
57echo Booting failed, dropping to shell
58goto shell
59
60:reboot
61reboot
62
63:exit
64exit
65
66# diagnostics
67:memtest
68echo Booting Memtest
69kernel ${http_server_url}/memtest/memdisk
70initrd ${http_server_url}/memtest/memtest.iso
71imgargs memdisk iso raw
72boot || goto failed
73
74# installers
75
76# Ubuntu 18.04
77:ub1804
78echo Booting Ubuntu 18.04 Installer
79kernel ${http_server_url}/ubuntu1804/linux
80initrd ${http_server_url}/ubuntu1804/initrd.gz
Zack Williams5b5d9a72020-11-06 13:59:06 -070081boot || goto failed
82
83# Ubuntu 18.04 autoinstall
84# https://ipxe.org/appnote/debian_preseed
85:ub1804a
86echo Booting Ubuntu 18.04 Installer
Zack Williamsdb394142020-11-11 22:52:34 -070087kernel ${http_server_url}/ubuntu1804/linux initrd=initrd.gz initrd=preseed.cfg
Zack Williams5b5d9a72020-11-06 13:59:06 -070088initrd ${http_server_url}/ubuntu1804/initrd.gz
89initrd ${http_server_url}/ubuntu1804/${serial}_preseed.cfg preseed.cfg
Zack Williams3fcd2c52021-03-02 21:44:52 -070090boot || goto failed
91
92# Ubuntu 18.04 autoinstall, text-mode, debug
93:ub1804adt
94echo Booting Ubuntu 18.04 Installer, text mode, debug
95kernel ${http_server_url}/ubuntu1804/linux initrd=initrd.gz initrd=preseed.cfg DEBIAN_FRONTEND=text BOOT_DEBUG=2
96initrd ${http_server_url}/ubuntu1804/initrd.gz
97initrd ${http_server_url}/ubuntu1804/${serial}_preseed.cfg preseed.cfg
Zack Williams5b5d9a72020-11-06 13:59:06 -070098boot || goto failed