|
本帖最后由 rroo 于 2013-8-5 08:57 编辑
为什么用txt修改脚本文件myscript.ipxe,就会出问题,难道要用其它工具来修改这个myscript.ipxe?
原myscript.ipxe内容:
#!ipxe
#set menu-timeout 8000
set menu-default 0pe
isset ${ip} || dhcp
isset ${next-server} || set next-server 192.168.1.3
:start
menu iPXE Boot Menu
item --gap -- --------------------------------- PE --------------------------------
item winre BOOT Win7 RE (wimboot)
item 0pe BOOT Pseudo 0PE (iso)
item TangoPE BOOT Tango PE (iso)
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 shell Drop to iPXE shell
item reboot Reboot computer
item --key x exit Exit iPXE and continue BIOS boot -- x
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
:exit
exit
:config
config
goto start
:pxelinux
chain http://${next-server}/pxelinux.0 || goto failed
goto start
:memtest
chain http://${next-server}/MAXDOS/memtest.bin || goto failed #来源http://boot.ipxe.org/memtest.bin
goto start
:maxdos
initrd http://${next-server}/MAXDOS/max9.3.ima
chain http://${next-server}/memdisk || goto failed
:0pe
initrd http://${next-server}/ISO/0PE.ISO
chain http://${next-server}/memdisk iso raw
#chain http://${next-server}/ISO/grub.exe --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
:TangoPE
initrd http://${next-server}/ISO/TangoPE_NET.ISO
chain http://${next-server}/memdisk iso raw
:winre
kernel http://${next-server}/wimboot #来源http://git.ipxe.org/releases/wimboot/wimboot-latest.zip
initrd http://${next-server}/ISO/winre/bootmgr bootmgr
initrd http://${next-server}/ISO/winre/BCD BCD
initrd http://${next-server}/ISO/winre/boot.sdi boot.sdi
initrd http://${next-server}/ISO/winre/winre.wim boot.wim
boot || goto failed
goto start
修改后的myscript.ipxe内容:
#!ipxe
#set menu-timeout 8000
set menu-default 0pe
isset ${ip} || dhcp
isset ${next-server} || set next-server 192.168.1.3
:start
menu iPXE Boot Menu
item --gap -- --------------------------------- PE --------------------------------
item winre BOOT Win7 RE (wimboot)
item 0pe BOOT Pseudo 0PE (iso)
item TangoPE BOOT Tango PE (iso)
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 shell Drop to iPXE shell
item reboot Reboot computer
item --key x exit Exit iPXE and continue BIOS boot -- x
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
:exit
exit
:config
config
goto start
:pxelinux
chain http://${next-server}/pxelinux.0 || goto failed
goto start
:memtest
chain http://${next-server}/MAXDOS/memtest.bin || goto failed #来源http://boot.ipxe.org/memtest.bin
goto start
:maxdos
initrd http://${next-server}/MAXDOS/max9.3.ima
chain http://${next-server}/memdisk || goto failed
:0pe
initrd http://${next-server}/ISO/0PE.ISO
chain http://${next-server}/memdisk iso raw
#chain http://${next-server}/ISO/grub.exe --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
:TangoPE
initrd http://${next-server}/ISO/TangoPE_NET.ISO
chain http://${next-server}/memdisk iso raw
:winre
kernel http://${next-server}/wimboot
initrd http://${next-server}/bootmgr bootmgr
initrd http://${next-server}/boot/BCD BCD
initrd http://${next-server}/boot/boot.sdi boot.sdi
initrd http://${next-server}/sources/boot.wim boot.wim
boot || goto failed
goto start |
|