Bootstrapping full iPXE native menu with customizable default option with timeou...
source link: https://gist.github.com/robinsmidsrod/2234639
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install) · GitHub
Instantly share code, notes, and snippets.
Add the following chunk to your existing ISC dhcpd.conf
file.
if exists user-class and ( option user-class = "iPXE" ) {
filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
filename "undionly.kpxe";
}
(or see https://gist.github.com/4008017 for a more elaborate setup that chainloads a more featureful version of iPXE from a stripped-down version burned in ROM)
Put undionly.kpxe
(or ipxe.pxe
) at the root of your TFTP server.
Change boot-url (and sanboot-url and other values) in boot.ipxe.cfg
to match your setup.
Put the following files in your web root:
- boot.ipxe
- boot.ipxe.cfg
- menu.ipxe
Add a folder named boot
in your web root and put any of these files there:
- hostname-testvm.ipxe
- mac-0050dadd426f.ipxe
- uuid-f84a339b-9e36-456e-8ccf-4c51ea6cb42d.ipxe
- pci-8086100e.ipxe
If you want more features you might want these files in your web root too:
- wimboot
- memdisk
- memtest.0
- memtest86plus-4.20.elf.img
- memtest-report.cgi (if you want a place to send your memtest reports)
UPDATE: See https://gist.github.com/robinsmidsrod/1c7bbd4a058f0e6892df for a better menu item for SystemRescueCD than the one included below.
FYI, technically when it comes to CoreOS you can cheat like we do in some of our lab iPXE menus. It's pretty simple to swap out the matchbox URLs for a simple dumb http endpoint to serve ignition or cloud-configs. Some folks (if they're no storing secrets in them) just use Github Gists. By using the alpha
, beta
, and stable
URLS combined with the path /current
you know you're always booting from the latest released version.
:coreos-stable
echo Booting CoreOS Stable
set base-url http://stable.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz coreos.autologin console=ttyS1,115200n8 cloud-config-url=http://matchbox/cloud coreos.autologin console=tty0
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot || goto failed
goto start
:coreos-beta
echo Booting CoreOS Beta
set base-url http://beta.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz coreos.autologin console=ttyS1,115200n8 cloud-config-url=http://matchbox/cloud coreos.autologin console=tty0
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot || goto failed
goto start
:coreos-alpha
echo Booting CoreOS Alpha
set base-url http://alpha.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz coreos.autologin console=ttyS1,115200n8 cloud-config-url=http://matchbox/cloud coreos.autologin console=tty0
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot || goto failed
goto start
Hello, I think I need some help on how to install FreeDOS...
I know that if I use memdisk or sanboot, the FreeDOS iso cannot be connected after booting up. So how can I continue with the setup...
Awesomely complete example. Thanks !
Thank you for this! Old to pxelinux menu, but new to iPXE because of EFI requirements.
zhangyingda commented on Apr 7, 2021 •
Another way to use ipxe boot ubuntu live iso.
:ubuntu-live
# See http://manpages.ubuntu.com/manpages/precise/man7/casper.7.html for casper cmdline details
echo Booting Ubuntu Live for education
kernel http://192.168.14.193/linux/ubuntu/casper/vmlinuz
initrd http://192.168.14.193/linux/ubuntu/casper/initrd
imgargs vmlinuz root=/dev/ram0 ip=dhcp url=http://192.168.14.193/linux/hirsute-desktop-amd64.iso
shell
boot || goto failed
goto start
zhangyingda commented on Apr 7, 2021 •
What is the shortest way to chainload this menu from another ipxe/gpxe (for example from qemu's internal pxe)?
chain http://boot.salstar.sk
No need to specify filename, ipxe/gpxe user-agent is autodetected and proper content will be sent.
http://boot.salstar.sk/
What is the shortest way to chainload this menu from another ipxe/gpxe (for example from qemu's internal pxe)?
chain http://boot.salstar.sk
Yes, using chain
to load another iPXE script file is the correct approach.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK