initrd --timeout 2000 http://${web_pxe_server0${wanSvr_idx}}${colon}${default_webServerPort}/${pxeFileName} && set boot_server ${web_pxe_server0${wanSvr_idx}} && set wanBoot y && set boot_protocol http && set server_port ${colon}${default_webServerPort} && goto setBootURL ||
initrd --timeout 2000 ftp://${web_pxe_server0${wanSvr_idx}}${colon}${default_ftpServerpath}/${pxeFileName} && set boot_server ${web_pxe_server0${wanSvr_idx}} && set wanBoot y && set boot_protocol ftp && set server_port ${colon}${default_ftpServerpath} && goto setBootURL ||
initrd --timeout 2000 nfs://${web_pxe_server0${wanSvr_idx}}${default_nfsServerpath}/${pxeFileName} && set boot_server ${web_pxe_server0${wanSvr_idx}} && set wanBoot y && set boot_protocol ftp && set server_port ${default_nfsServerpath} && goto setBootURL ||
iseq ${diyPortTryed} y && goto noAnyServer || set diyPortTryed y ||
clear wanSvr_idx
iseq ${default_webServerPort} 80 && set default_webServerPort ${diyWebServerPort} || set default_webServerPort 80 ||
iseq ${default_ftpServerpath} 21 && set default_ftpServerpath ${diyFtpServerPort} || set default_ftpServerpath 21 ||
iseq ${default_nfsServerpath} /volume2/pxe && set default_nfsServerpath ${diyNfsServerpath} || set default_nfsServerpath /volume2/pxe ||
goto setWanBootProtocol ||
:noAnyServer
isset ${debug_timeout} && prompt --key 0x02 --timeout ${debug_timeout} Error! No Cloud server Online. Server use gateway. Press Ctrl-B for the iPXE shell. && shell ||
set boot_protocol tftp && clear server_port ||
set next-server ${netX/gateway} ||
set boot_server ${netX/gateway} ||
:setBootURL #确定设置网络启动传输协议
iseq ${wanBoot} y && set prefixHostname wanPC || set prefixHostname lanPC ||
iseq ${wanBoot} y || set boot_server ${next-server} ||
set boot_url ${boot_protocol}://${boot_server}${server_port} ||
:code_end
:code_begin # Note 取本机iP地址未位数关赋值本地名称
:start
set hostIP ${netX/ip} ||
set returnMenuPoint getLastIpend && goto Function_getLastIp ||
:getLastIpend
set hostname ${prefixHostname}${Function_getLastIp} ||
:code_end
:code_begin # Note 启动后自动取服务器上的如下菜单顺序尝试加载启动
isset ${debug_timeout} && prompt --timeout ${debug_timeout} filename: ${filename} begin loading order .ipxe by hostname\uuid\mac\bus\default ||
isset ${debug_timeout} && prompt --timeout ${debug_timeout} Ready ! Press any key enter system. ||
isset ${debug_timeout} && prompt --key 0x02 --timeout ${debug_timeout} Begin load bootServer ipxemenu and set var Press Ctrl-B for the iPXE shell. && shell ||