﻿#!ipxe
# ============================================================
# Lucx PXE - WinPE 救援环境
# Package: tools/rescue/winpe
# ============================================================

isset ${server} || set server 192.168.169.1
set base http://${server}/pxe

echo Starting WinPE Rescue Environment...
echo Platform: ${platform}

iseq ${platform} pcbios || goto unsupported

kernel ${base}/boot/wimboot || goto failed
initrd ${base}/boot/BCD BCD || goto failed
initrd ${base}/boot/boot.sdi boot.sdi || goto failed
initrd ${base}/tools/rescue/winpe/boot.wim boot.wim || goto failed

boot

:unsupported
echo !! WinPE PXE boot only supports BIOS
echo Current platform: ${platform}
sleep 5
exit 1

:failed
echo !! Failed to load WinPE boot files
echo Check:
echo   ${base}/boot/wimboot
echo   ${base}/tools/rescue/winpe/boot.wim
sleep 3
exit 1
