|
本帖最后由 chenall 于 2019-10-3 10:13 编辑
现在由于工作关系很少发贴和回复了,但是还是会经常上来看看
最近为了方便使用修改了ipxe的一些代码重新编译了一个(使用github上的最新源码修改编译的)
相对于默认编译额外开启了以下功能
FTP NFS COMBOOT HTTPS
ipxe1.zip 的开启了更多的功能. 像CONSOLE_CMD POWEROFF PING等
增加的功能
对于脚本或goto 增加了参数变量, 可以简化ipxe菜单的写法
比如启动命令 chain boot.ipxe aa bb cc dd
在boot.ipxe脚本里面就可以使用 ${%0} ${%1} 这些变量
其中 %0 就是boot.ipxe %1 第一个参数 %n 第n个参数 最多是 %9
goto 命令也是一样
比如:
goto winpe bootmgr.exe winpe.wim
在winpe标签下就可以使用${%1} bootmgr.exe
注: 使用了比较直接而且暴力的方式 简单的把参数设为变量,所以....你懂的.
附后使用wimboot启动各种PE的例子.
- #!ipxe
- #bootmgr启动文件判断
- iseq "${platform}" "pcbios" && set bootmgr bootmgr.exe || set bootmgr bootx64.efi
- iseq "${platform}_${buildarch}" "efi_i386" && set bootmgr bootia32.efi ||
- :menu
- menu Windows Preinstallation Environment
- item --gap -- -------Windows Preinstallation Environment-----------------------------
- item ljycslg/pe32.wim Windows 10 PE x86 with Network (by ljycslg)
- iseq ${buildarch} i386 || item ljycslg/pe64.wim Windows 10 PE x64 with Network (by ljycslg)
- item WEPE/WePE_32_V2.0.WIM Windows 10 PE x86 (WePe v2.0 2017-03-21)
- iseq ${buildarch} i386 || item WEPE/WePE_64_V2.0.WIM Windows 10 PE x64 (WePe v2.0 2017-03-21)
- iseq ${buildarch} i386 || item WEPE/WePE_64_V2.0_mod.WIM Windows 10 PE x64 (WePe v2.0 mod by 027sun 2019-09-27)
- item --gap -- ------------------------------ Advanced ---------------------------------
- item shell Drop to iPXE shell
- item exit Exit or Return
- choose --timeout 5000 MENU.SELECT
- ${MENU.SELECT} || goto wimboot ${MENU.SELECT}
- goto menu
- :wimboot
- imgfree
- kernel -a wimboot
- #附加文件会存放到 windows/system32 目录下
- initrd -n ${next-server}.cmd pxeautorun.txt ${next-server}.cmd ||
- initrd -n custom.7z custom/${ip}.7z custom.7z ||
- initrd -n custom.cmd custom/${ip}.cmd custom.cmd ||
- #pe wimboot启动通用文件
- initrd -n boot.sdi pxe/boot.sdi boot.sdi
- initrd -n ${bootmgr} pxe/${bootmgr} ${bootmgr}
- initrd -n bcd pxe/bcd bcd
- #PE WIM文件
- initrd -n boot.wim ${%1} boot.wim
- boot || prompt Boot failure press any key to continue
- goto menu
复制代码
|
-
-
ipxe.zip
1.18 MB, 下载次数: 149, 下载积分: 无忧币 -2
基础功能
-
-
ipxe1.zip
1.57 MB, 下载次数: 117, 下载积分: 无忧币 -2
大部份功能
评分
-
查看全部评分
|