|
本帖最后由 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 |
评分
-
查看全部评分
|