|
本帖最后由 zhaohj 于 2015-12-24 08:42 编辑
就是配置DHCP选项:
由于我80端口被其他程序占用改用81端口
menu.ipxe 样例(我真实机器配置):
#!ipxe
set menu-timeout 5000
set menu-default grub4dos
isset ${ip} || dhcp
isset ${next-server} || set next-server 192.168.1.11
:start
menu iPXE Boot Menu
item --gap -- --------------------------------- PE --------------------------------
item w8pe BOOT W8PE.WIM -----(wimboot)
item w8pe1 BOOT W8PE1.WIM ----(wimboot)
item w7pe BOOT W7PE.WIM -----(wimboot)
item w7pe1 BOOT W7PE1.WIM ----(wimboot)
item w81pex64 BOOT W81PEX64.WIM -(wimboot)
item --gap -- -------------------------------- TOOL --------------------------------
item maxdos Maxdos Tool
item memtest Memtest86
item --gap -- ---------------------------- Advanced options -----------------------
item --key c config Configure settings -- c
item --key p pxelinux Load PXELinux menu -- p
item --key g grub4dos load GRUB4DOS menu -- g
item shell Drop to iPXE shell
item Local Boot from local drive 0x80
item reboot Reboot computer
item --key x exit Exit iPXE and continue BIOS boot -- x
choose --timeout ${menu-timeout} --default ${menu-default} selected
imgfree
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
:Local
sanboot --no-describe --drive 0x80
goto failed
:reboot
reboot
:exit
exit
:config
config
goto start
:pxelinux
chain http://${next-server}:81/pxelinux.0 || goto failed
goto start
:grub4dos
set net0/filename grldr
chain grldr || goto failed
goto start
:memtest
chain http://${next-server}:81/MAXDOS/memtest.bin || goto failed #http://boot.ipxe.org/memtest.bin
goto start
:maxdos
initrd http://${next-server}:81/MAXDOS/max9.3.ima
chain http://${next-server}:81/memdisk || goto failed
:0pe
initrd http://${next-server}:81/ISO/0PE.ISO
chain http://${next-server}:81/memdisk iso raw
#chain http://${next-server}:81/ISO/grub.exe --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
:TangoPE
initrd http://${next-server}:81/ISO/TangoPE_NET.ISO
chain http://${next-server}:81/memdisk iso raw
:w8pe
initrd http://${next-server}:81/w8pe/w8pe.wim boot.wim
goto winpe
:w8pe1
initrd http://${next-server}:81/w8pe/w8pe1.wim boot.wim
goto winpe
:w7pe
initrd http://${next-server}:81/w7pe/w7pe.wim boot.wim
goto winpe
:w7pe1
initrd http://${next-server}:81/w7pe/w7pe1.wim boot.wim
goto winpe
:w81pex64
initrd http://${next-server}:81/w8pe/W81x64.wim boot.wim
goto winpe
:winpe
kernel http://${next-server}:81/wimboot gui pause
initrd http://${next-server}:81/bootmgr.exe bootmgr.exe
initrd http://${next-server}:81/boot/bcd bcd
initrd http://${next-server}:81/boot/fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd http://${next-server}:81/boot/fonts/chs_boot.ttf chs_boot.ttf
initrd http://${next-server}:81/boot/boot.sdi boot.sdi
imgstat
boot || goto failed
goto start |
|