Skip to content

Instantly share code, notes, and snippets.

@truatpasteurdotfr
Last active May 20, 2022 21:44
Show Gist options
  • Save truatpasteurdotfr/d5c3c250b3fcc41813c2b00e305b843f to your computer and use it in GitHub Desktop.
Save truatpasteurdotfr/d5c3c250b3fcc41813c2b00e305b843f to your computer and use it in GitHub Desktop.
#!ipxe
:MENU
menu
item --gap -- https://gist.github.com/truatpasteurdotfr/d5c3c250b3fcc41813c2b00e305b843f
item --gap -- iPXE boot menu ----------------
item --gap -- ------------------------------------------------
item c7-rescue CentOS-7 x86_64 rescue
item c8-stream-rescue Stream-8 x86_64 rescue
item --gap -- ------------------------------------------------
item memtest - memtest (from Stream 8)
item reboot - reboot -
item poweroff - poweroff -
item hostinfo - about this computer -
item return - reload the initial menu -
item --gap -- ------------------------------------------------
choose --default hostinfo --timeout 30000 target && goto ${target}
goto MENU
:c7-rescue
initrd http://ftp.pasteur.fr/mirrors/CentOS/7/os/x86_64/images/pxeboot/initrd.img
kernel http://ftp.pasteur.fr/mirrors/CentOS/7/os/x86_64/images/pxeboot/vmlinuz rescue method=http://ftp.pasteur.fr/mirrors/CentOS/7/os/x86_64 ip=dhcp noipv6
boot || goto MENU
:c8-stream-rescue
initrd http://ftp.pasteur.fr/mirrors/CentOS/8-stream/BaseOS/x86_64/os/images/pxeboot/initrd.img
kernel http://ftp.pasteur.fr/mirrors/CentOS/8-stream/BaseOS/x86_64/os/images/pxeboot/vmlinuz rescue method=http://ftp.pasteur.fr/mirrors/CentOS/8-stream/BaseOS/x86_64/os ip=dhcp noipv6
boot || goto MENU
:shell
shell || goto MENU
:return
chain https://gist.githubusercontent.com/truatpasteurdotfr/d5c3c250b3fcc41813c2b00e305b843f/raw/38bf0a92d2ddda625d58e71a9c08a54ff14b6eb5/default.ipxe ||
prompt || goto MENU
:hostinfo
echo This computer : ||
echo MAC address....${net0/mac} ||
echo IP address.....${ip} ||
echo Netmask........${netmask} ||
echo Serial.........${serial} ||
echo Asset number...${asset} ||
echo Manufacturer...${manufacturer} ||
echo Product........${product} ||
echo BIOS platform..${platform} ||
echo ||
echo press any key to return to Menu ||
prompt
goto MENU
:memtest
kernel http://ftp.pasteur.fr/mirrors/CentOS/8-stream/BaseOS/x86_64/os/isolinux/memtest ||
boot || goto MENU
:reboot
reboot || goto MENU
:poweroff
poweroff || goto MENU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment