netboot.xyz/src/utils.ipxe

64 lines
1.9 KiB
Text

#!ipxe
menu Utilities
item --gap Utilities:
item clonezilla ${space} Clonezilla
item hdt ${space} Hardware Detection Tool
item memtest ${space} MemTest86+
item partition_wizard ${space} Partition Wizard 9.1
item testpr ${space} Test netboot.xyz branch
choose --default ${menu} menu || goto utils_exit
echo ${cls}
goto ${menu} ||
chain ${menu}.ipxe || goto utils_exit
goto linux_exit
:hdt
kernel ${memdisk} iso raw
initrd http://www.hdt-project.org/raw-attachment/wiki/hdt-0.5.0/hdt-0.5.2.iso
boot
goto utils_exit
:clonezilla
set version 2.4.2-61
iseq ${arch} x86_64 && set cz_arch amd64 || set cz_arch i686-pae
set project clonezilla
set iso ${project}_live_stable/${version}/${project}-live-${version}-${cz_arch}.iso
set czurl http://sourceforge.net/projects/clonezilla/files/${iso}/download
kernel ${memdisk} iso raw ${params}
:retry
iseq ${try} xxxxx && exit ||
set try ${try}x
initrd ${czurl} || goto retry
boot || goto utils_exit
:memtest
chain utils/memtest.bin ${params} && goto main_menu ||
echo MEMORY ERROR DETECTED! ${errno}
echo Press any key to continue ...
read a
goto utils_exit
:partition_wizard
kernel ${memdisk} iso raw
initrd http://www.partitionwizard.com/download/pwfree91-x64.iso
boot
goto utils_exit
:testpr
echo This will chainload into a testing branch of netboot.xyz. You'll need to enter
echo your Github User and the first part of the commit hash of the commit you want
echo to test or the branch name. This assumes you are testing from a netboot.xyz
echo repo.
echo
echo -n Specify Github User Name: ${} && read github_user
echo -n Specify branch name or shortened commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_hash
echo
echo Attempting to chainload:
chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_hash}/src/menu.ipxe || echo Unable to find branch... && sleep 5 && goto utils_exit
goto utils_exit
:utils_exit
clear menu
chain menu.ipxe
exit 0