iPXE-UEFI网启小工具
本帖最后由 captain_g 于 2018-11-21 14:05 编辑# BOOT文件夹(请解压到磁盘、分区根目录下):
boot.sdi——取自64位WIN8;
bootmgfw.efi——取自64位WIN8;
ipxe.efi——下载自IPXE官网;
wimboot——下载自IPXE官网;
tinypxesrv.exe——网启服务器1.0.0.21;
wimboot.ipxe——纯文本配置文件(ANSI,可自行修改内容):
#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/BOOT/wimboot
initrd ${boot-url}/BOOT/bootmgfw.efi bootmgfw.efi
initrd ${boot-url}/EFI/MICROSOFT/BOOT/BCD BCD
initrd ${boot-url}/BOOT/BOOT.SDI BOOT.SDI
initrd ${boot-url}/BOOT/BOOT.WIM BOOT.WIM
boot
BOOT.WIM——支持UEFI启动的64位PE核心文件;
# EFI文件夹(请解压到磁盘、分区根目录下):
取自微软64位WIN8原版光盘(只在BCD中禁用了数字签名验证,其他不动);
# 为使用方便:
启用网启服务端iPXE-UEFI.CMD(需与BOOT、EFI文件夹在同一磁盘、分区);
# 请关闭“安全启动”选项;
# 条件有限,只在64位机器上测试通过UEFI网启!
https://pan.baidu.com/s/19Sn4L1XZ4CRk8jLvdAgL8Q 密码:slwm
本帖最后由 yigeren 于 2018-11-24 14:43 编辑
提供一个菜单文件自动识别BIOS和EFI启动
#!ipxe
#check platform (pcbios or efi)
echo Platform: ${platform}
set menu-timeout 20000
dhcp
isset ${next-server} || set next-server 192.168.1.2#自行指定服务器ip
iseq ${platform} pcbios && set start BIOS_MENU || set start EFI_MENU
goto ${start}
:BIOS_MENU
set menu-default win10pe
menu iPXE BIOS Boot Menu
#item win2003 0.Yigeren Win2003PE
item --key 1 win7pe 1.Yigeren Win7PE
item --key 2 win8pe 2.Yigeren Win8PE
item --key 3 win8x64 3.Yigeren Win8x64PE
item --key 4 win10pe 4.Yigeren Win10x64PE
item --key 5 maxdos 5.MAXDOS9.3PLUS
item --key 6 diskgen 6.DISKGEN
item --key 7 hddreg 7.HDDREG
item --key h hddboot H.HDDBOOT
item --key r reboot R.ReBoot Computer
choose --timeout ${menu-timeout} --default ${menu-default} selected
goto ${selected}
:shell
echo Type 'Exit' to get the back to the menu
shell
goto start
:failed
echo Booting failed, dropping to shell
goto shell
:reboot
reboot
:hddboot
sanboot --no-describe --drive 0x80
:maxdos
initrd http://${next-server}/img/MAXDOS.IMG
chain http://${next-server}/memdisk || goto failed
:diskgen
initrd http://${next-server}/img/DISKGEN.img
chain http://${next-server}/memdisk || goto failed
:hddreg
initrd http://${next-server}/img/HDDREG.IMG
chain http://${next-server}/memdisk || goto failed
#:win2003
#kernel http://${next-server}/STARTROM.0
#boot || goto failed
:win7pe
kernel http://${next-server}/wimboot
initrd http://${next-server}/boot/bootmgr.exe bootmgr.exe
initrd http://${next-server}/boot/BCD BCD
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win7PE.wim Win7PE.wim
boot || goto failed
:win8pe
kernel http://${next-server}/wimboot
initrd http://${next-server}/boot/bootmg8.exe bootmgr.exe
initrd http://${next-server}/boot/BC8 BC8
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win8PE.wim Win8PE.wim
boot || goto failed
:win8x64
kernel http://${next-server}/wimboot
initrd http://${next-server}/boot/boot864.exe bootmgr.exe
initrd http://${next-server}/boot/864 864
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win864PE.wim Win864PE.wim
boot || goto failed
:win10pe
kernel http://${next-server}/wimboot
initrd http://${next-server}/boot/boot164.exe bootmgr.exe
initrd http://${next-server}/boot/164 164
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win10x64.wim Win10x64.wim
boot || goto failed
goto start
:EFI_MENU
set menu-default win10efi
menu iPXE EFI Boot Menu
item win8efi 1.Yigeren Win8x64PE
item win10efi 2.Yigeren Win10x64PE
item reboot 3.ReBoot Computer
choose --timeout ${menu-timeout} --default ${menu-default} selected
goto ${selected}
:win8efi
kernel http://${next-server}/wimboot
initrd http://${next-server}/boot/bootx64.efi bootx64.efi
initrd http://${next-server}/boot/boot864.exe bootmgr.exe
initrd http://${next-server}/efi/microsoft/boot/864 864
initrd http://${next-server}/efi/microsoft/boot/fonts/chs_boot.ttf chs_boot.ttf
initrd http://${next-server}/efi/microsoft/boot/fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win864PE.wim Win864PE.wim
boot || goto failed
:win10efi
kernel http://${next-server}/wimboot
initrd http://${next-server}/efi/boot/bootx64.efi bootx64.efi
initrd http://${next-server}/boot/boot164.exe bootmgr.exe
initrd http://${next-server}/efi/microsoft/boot/BCD BCD
initrd http://${next-server}/efi/microsoft/boot/fonts/chs_boot.ttf chs_boot.ttf
initrd http://${next-server}/efi/microsoft/boot/fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/boot/Win10x64.wim Win10x64.wim
boot || goto failed
goto start 这是个好东西啦...
大家快点下载哈... 好工具,谢谢分享。。。 下来学习一下 谢谢了 谢谢分享 下载备用 本帖最后由 captain_g 于 2017-10-21 09:16 编辑
根据官网介绍:
# wimboot自己会自行提取wim文件中的启动管理器,如bootmgr.exe(BIOS)或bootmgfw.efi(UEFI),有些
网友制作的PE中可能精简掉了这些文件,会导致网启失败,所以在配置脚本中予以指定并在外部提供相
应文件,可以避免因找不到文件而导致的失败,如1楼的:
initrd ${boot-url}/BOOT/bootmgfw.efi bootmgfw.efi
又,如系BIOS启动,类似的可以写成initrd ${boot-url}/BOOT/bootmgr bootmgr (从bootmgr中提取bootmgr.exe);
或者 initrd ${boot-url}/BOOT/bootmgr.exe bootmgr.exe
# wimboot在使用BCD文件时自己会在虚拟内存环境中“修补”BCD的内部配置,如果用的是BIOS启动的
BCD,则wimboot在UEFI启动时,会将BCD内部的字串.exe改成.efi,就是说,假如根下目录结构与微软的
一致,可以直接用原版的BCD(禁用数字签名验证除外);
# wimboot执行后在内存中创建虚拟文件系统,该系统使得在下列多个位置调用BCD、BOOT.SDI、BOOT.WIM
成为可能:
\
\Boot
\Boot\Fonts
\Boot\Resources
\Sources
\EFI
\EFI\Boot
\EFI\Microsoft
\EFI\Microsoft\Boot
BCD最好用原名,因为bootmgr.exe只简单搜索\Boot\BCD;
BCD中指定的BOOT.SDI、BOOT.WIM路径必须是上面几种并互相匹配,以boot.wim为例,\boot.wim或
\Boot\boot.wim或\Sources\boot.wim以及上面列举的子目录等都行,但不支持像\Image\boot.wim这样
的路径(因为Image并非认可的子目录);
E文水平有限,难免理解错误,请查阅官网,或参靠比较论坛前辈们的配置文件;
好工具,谢谢分享。。。下来学习一下 這個好用,我試過了,可以用,就是不知道穩定不,托個30臺機子沒問題吧,請老板指教下,我沒試過。 谢谢 学习 谢谢分享 下载看看 学习了,谢谢分享,希望大师指导一下gho文件放在哪,实现自动网络克隆! 本帖最后由 captain_g 于 2018-4-25 20:48 编辑
txh0714 发表于 2018-4-19 21:22
学习了,谢谢分享,希望大师指导一下gho文件放在哪,实现自动网络克隆!
“大师”不敢当!弄这个东西纯粹是为了好玩。
不知道你的网络环境究竟如何,也不知道在网启后准备克隆一台电脑还是若干台电脑一起克。
论坛内网启、网克工具很多,这个主要是针对UEFI网启的,没有想过用它进行网克,简单说几点:
1、假如网启用的PE不带网络功能或网络功能不正常,且GHO文件不大,可以考虑将它封在BOOT.WIM中;自己编写一个批处理脚本,让它在PE启动后自动运行,调用
Ghost64.exe(Ghost32.exe),从而实现自动克隆,但这个批处理脚本只能适用于特定的已知情形,这种实际上属于网启后的“本地”克隆。
2、假如网启用的PE带网络功能而且网络功能正常,即客户端(网启,使用PE系统的)电脑与服务端(运行本工具,使用正常Windows的)电脑可以互联:
1)在服务端上退出本网启小工具。在服务端上运行Symantec GhostCast Server(Ghostsrv.exe),在客户端(需要克隆的)电脑上运行Ghost64.exe(Ghost32.exe),
服务端、客户端经过一番设置即可进行“多播”多机克隆,这种情况GHO文件放在服务端即可,但很难做到“自动”克隆;
2)在服务端上退出本网启小工具。事先已将服务端上GHO文件所在的文件夹设为“共享”文件夹,在客户端可以通过批处理脚本:a.先将前述共享文件夹“映射”为
“网络驱动器”;b.调用Ghost64.exe(Ghost32.exe),从而实现自动克隆,但这个批处理脚本同样也只能适用于特定的已知情形。还有一点,Windows下共享文件的共
享连接数很有限。
3、根据个人经验,要想实现网启后自动进行克隆,很难,有很多先决条件需要满足!换一个说法,如果不是特定已知情形,则很危险!
谢谢大师的耐心指导!我受教了。像您这样的大师现在很少了,因为您没有这样的义务。再次谢谢了! 正在找winboot文件,用grub引导win7.wim文件,好东西下载看看,应该能用! 感谢分享~ 谢谢分享! 好工具,谢谢分享。。。 下载试试,谢谢。 下载学学,多谢分享. captain_g 发表于 2018-4-25 20:45
“大师”不敢当!弄这个东西纯粹是为了好玩。
不知道你的网络环境究竟如何,也不知道在网启后准备克 ...
可以做到半自动。PE打好网卡驱动,去掉图形界面,pecmd.ini加一句:
exec =ghost.exe -clone,src=@MCDeploy,dst=1 -rb -sure
服务器启动ghostsrv,会话名称为Deploy,选择镜像,输入数量,接受客户机,连接够数了自动开始。
配合菜单,客户机重启后可以自动关机。可以回家睡觉了😊 哎,我折腾了好几天,uefi ipxe通过http启动wim总是bcd错误。TFTP方式一点问题也没有,除了慢的令人怀疑人生。下了你这个想学习一下,结果还是一样的错误。{:1_188:} hanzsim 发表于 2018-10-29 17:20
哎,我折腾了好几天,uefi ipxe通过http启动wim总是bcd错误。TFTP方式一点问题也没有,除了慢的令人怀疑人 ...
从一楼下载的压缩包要解压到分区、磁盘根目录下,即BOOT文件夹、批处理要在分区、磁盘根目录下。
另外,其他都(如BCD)不要动它,直接将你的PE核心WIM重命名为BOOT.WIM放在BOOT文件夹中就行了。
还有,压缩包里的bootmgfw.efi提取自WIN8,可以要换成WIN10的,最后确保WIM文件中最好也要包含这个文件。 hanzsim 发表于 2018-10-29 17:20
哎,我折腾了好几天,uefi ipxe通过http启动wim总是bcd错误。TFTP方式一点问题也没有,除了慢的令人怀疑人 ...
“uefi ipxe通过http启动wim总是bcd错误”
究竟是什么问题?BCD没传过去,还是找不到BOOT.WIM?
客户端有没有成功读取5个文件;
wimboot + ipxe UEFI 网络启动时,不支持WIM文件改成其他名称,只能是BOOT.WIM,如果没改过BCD;
但wimboot + ipxe BIOS 网络启动时,WIM文件是可以改其他名称的,即不改BCD的情况下:
BIOS: initrd ${boot-url}/BOOT/WXYZ.WIM BOOT.WIM,没问题;
UEFI: initrd ${boot-url}/BOOT/WXYZ.WIM BOOT.WIM,不可以! 网络UEFI启动不止一个WIM,去这里看看:
下载链接:
https://pan.baidu.com/s/19Sn4L1XZ4CRk8jLvdAgL8Q 密码:slwm captain_g 发表于 2018-10-29 17:43
从一楼下载的压缩包要解压到分区、磁盘根目录下,即BOOT文件夹、批处理要在分区、磁盘根目录下。
另外 ...
我看了你的批处理了,是调整web路径的,我用IIS,不影响。除了wim用的自己的,别的用的都是你的文件。
文件传输完了。载入efi文件时,出的0xc000000f错误 我做的是U盘BIOS、uefi双启是成功的,网启不用uefi也是成功的。用uefi直接用x64.efi做启动文件也成功了,就是全TFTP太慢了。换用ipxe启动就出这个0xc000000f hanzsim 发表于 2018-10-29 19:55
我做的是U盘BIOS、uefi双启是成功的,网启不用uefi也是成功的。用uefi直接用x64.efi做启动文件也成功了,就 ...
严格按下面的做:
#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/BOOT/wimboot
initrd ${boot-url}/BOOT/bootmgfw.efi bootmgfw.efi
initrd ${boot-url}/EFI/MICROSOFT/BOOT/BCD BCD
initrd ${boot-url}/BOOT/BOOT.SDI BOOT.SDI
initrd ${boot-url}/BOOT/BOOT.WIM BOOT.WIM
boot
什么都不动,文件都是原版的,除了WIM是自己的,但必须文件名必须是BOOT.WIM。
根据这个配置,wimboot + ipxe.efi网络启动,不使用bootx64.efi 还有服务器上proxydhcp勾或不勾分别试一试 感谢给了我思路,我的问题解决了。就是如你说的,文件名的问题。起因是我web服务用的是IIS,性能高了很多。而IIS默认的没有扩展名的文件是不能下载的。这样,wimboot,bcd都没办法走http。担心微软的不好搞,就给他们加了扩展名。结果出了这问题。现在经过测试,不止是wim文件,bcd也是,文件名错了不能正常启动。而这在legacy下完全不会出问题的。所以现在所有的wim都只能有一个名字了。还好放在其它文件夹中还是可以的。
多谢{:1_183:}