123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #!ipxe
- :start
- chain --autofree boot.ipxe ||
- iseq ${cls} serial && goto ignore_cls ||
- set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J"
- set cls ${cls:string}
- :ignore_cls
- :version_check
- set latest_version 1.04
- echo ${cls}
- iseq ${version} ${latest_version} && goto version_up2date ||
- echo
- echo Updated version of netboot.xyz is available:
- echo
- echo Running version.....${version}
- echo Updated version.....${latest_version}
- echo
- echo Please download the latest version from netboot.xyz.
- echo
- echo Attempting to chain to latest version...
- chain --autofree http://${boot_domain}/ipxe/${ipxe_disk} ||
- :version_up2date
- isset ${arch} && goto skip_arch_detect ||
- cpuid --ext 29 && set arch x86_64 || set arch i386
- iseq ${buildarch} arm64 && set arch arm64 ||
- :skip_arch_detect
- isset ${menu} && goto ${menu} ||
- isset ${ip} || dhcp || echo DHCP failed
- :main_menu
- clear menu
- set space:hex 20:20
- set space ${space:string}
- iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
- menu ${site_name}
- item --gap Default:
- item local ${space} Boot from local hdd
- item --gap Distributions:
- iseq ${menu_live} 1 && item live ${space} Live CDs ||
- iseq ${menu_linux} 1 && item linux ${space} Linux Network Installs ||
- iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs ||
- iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS ||
- iseq ${menu_security} 1 && item security ${space} Security Related ||
- iseq ${menu_windows} 1 && item windows ${space} Windows ||
- item --gap Tools:
- iseq ${menu_utils} 1 && item utils ${space} Utilities ||
- iseq ${arch} x86_64 && set bits 64 || set bits 32
- item changebits ${space} Architecture: ${arch} (${bits}bit)
- item shell ${space} iPXE shell
- item netinfo ${space} Network card info
- item --gap Signature Checks:
- item sig_check ${space} netboot.xyz [ enabled: ${sigs_enabled} ]
- item img_sigs_check ${space} Images [ enabled: ${img_sigs_enabled} ]
- isset ${github_user} && item --gap Custom Menu: ||
- isset ${github_user} && item nbxyz-custom ${space} ${github_user}'s Custom Menu ||
- isset ${menu} && set timeout 0 || set timeout 300000
- choose --timeout ${timeout} --default ${menu} menu || goto local
- echo ${cls}
- goto ${menu} ||
- iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
- :verify_sigs
- imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error
- goto change_menu
- :change_menu
- chain ${menu}.ipxe || goto error
- goto main_menu
- :error
- echo Error occured, press any key to return to menu ...
- prompt
- goto main_menu
- :local
- echo Booting from local disks ...
- exit 0
- :shell
- echo Type "exit" to return to menu.
- set menu main_menu
- shell
- goto main_menu
- :changebits
- iseq ${arch} x86_64 && set arch i386 || set arch x86_64
- goto main_menu
- :sig_check
- iseq ${sigs_enabled} true && set sigs_enabled false || set sigs_enabled true
- goto main_menu
- :img_sigs_check
- iseq ${img_sigs_enabled} true && set img_sigs_enabled false || set img_sigs_enabled true
- goto main_menu
- :nbxyz-custom
- chain https://raw.githubusercontent.com/${github_user}/netboot.xyz-custom/master/custom.ipxe || goto error
- goto main_menu
|