#!ipxe

:retry_dhcp
dhcp || goto retry_dhcp

set version 26.04
set base http://rescue.wmi.amu.edu.pl/archive/

echo Detecting architecture
cpuid --ext 29 && set arch amd64 || set arch i386

iseq ${arch} amd64 && goto boot ||
echo WMI Rescue supports only the amd64 architecture
exit

:boot

echo Booting WMI Rescue ${version} ${arch}

kernel ${base}/${version}/netboot/${arch}/vmlinuz
initrd ${base}/${version}/netboot/${arch}/initrd.img

boot
