nytc006 发表于 2016-2-22 13:13:35

【转载】一个值得我一样的新手学习的ipxe 网启脚本文件

本帖最后由 nytc006 于 2016-2-23 08:08 编辑

这个是在notepad 网盘里找到的ipxe网启资源里用到的脚本文件。
相当给力哦~值得学习。感谢 notepad


#!ipxe   
#http://boot.ipxe.org/ipxe.iso
# Booting Windows PE using wimboot   http://git.ipxe.org/releases/wimboot/wimboot-latest.zip
# x86 or x64, pcbios or UEFI, PC or vmware

#-------------------------------------------------------------------------
#check platform (pcbios or efi), buildarch (i386 or efi)
echo Platform: ${platform}
echo Buildarch: ${buildarch}

set menu-timeout 6000
set menu-default 0PE
isset ${ip} || dhcp
isset ${next-server} || set next-server 192.168.16.11
iseq ${platform} efi && set start EFI_Start || set start BIOS_Start
goto ${start}


#>Begin iPXE uEFI Boot ===========================================
:EFI_Start
    #cpuid --ext 29 && set arch X64 || set arch X86
    iseq ${buildarch} i386 set arch X86 || set arch X64
    set menu-default EFI_Win8PE
    menu iPXE uEFI Boot Menu -- ${ip}
    item --gap --             ------------------------------------ WinPE ----------------------
    item --key 5 EFI_WePE          Boot WePE ${arch} (wimboot)               ----------- Hotkey 5
    item --key 8 EFI_Win8PE      Boot Win8PE ${arch} (wimboot)               --------- Hotkey 8
    item --key A EFI_Win10PE       Boot Win10PE ${arch} (wimboot)               -------- Hotkey A
    item --gap --             ----------------------------------- DOS Tool -----------------------------------
    item MaxDOS                  Load MaxDOS TooBOX
    item Memtest                   Load Memtest86
    item --gap --             -------------------------------- Advanced options --------------
    item --key c Config            Configure settings                   ---------------- Hotkey c
    item --key i Shell             Drop to iPXE shell                   ---------------- Hotkey i
    item --key r Reboot            Reboot the computer                   --------------- Hotkey r
    item --key s Power             Shutdown the computer                   ------------- Hotkey s
    item --key x Exit            Exit iPXE and continue boot                   ------- Hotkey x
    item --gap --             ------------------------------------------------------------------
    choose --timeout ${menu-timeout} --default ${menu-default} selected
    goto ${selected}

:EFI_WePE
    set bootfile bootx64.efi && set wimboot wimboot && set sbcdfile bcd_WePEX64 && set pefile WePEX64.WIM
    iseq ${arch} X86 && set bootfile bootia32.efi && set wimboot wimboot.i38 && set sbcdfile bcd_WePEX86 && set pefile WePEX86.WIM ||
    goto EFI_Wimboot

:EFI_Win8PE
    set bootfile bootx64.efi && set wimboot wimboot && set sbcdfile bcd_Win8PEX64 && set pefile Win8PEX64.WIM
    iseq ${arch} X86 && set bootfile bootia32.efi && set wimboot wimboot.i386 && set sbcdfile bcd_Win8PEX86 && set pefile Win8PEX86.WIM ||
    goto EFI_Wimboot

:EFI_Win10PE
    set bootfile bootx64.efi && set wimboot wimboot && set sbcdfile bcd_Win10PEX64 && set pefile Win10PEX64.WIM
    iseq ${arch} X86 && set bootfile bootia32.efi && set wimboot wimboot.i386 && set sbcdfile bcd_Win10PEX86 && set pefile Win10PEX86.WIM ||
    goto EFI_Wimboot

:EFI_Wimboot
    kernel http://${next-server}/EFI/Boot/${wimboot}
    initrd http://${next-server}/EFI/Boot/${bootfile}
    initrd -n bcd http://${next-server}/EFI/Microsoft/Boot/${sbcdfile}
    initrd http://${next-server}/EFI/Boot/boot.sdi
    initrd http://${next-server}/WinPE/${pefile}
    boot || goto Failed
    goto ${start}
#<End iPXE uEFI Boot =================================


#>Begin iPXE BIOS Boot =================================
:BIOS_Start
    #console --picture http://${next-server}/Black.png --top 100 --left 100 --bottom 100 ||
    console --picture http://${next-server}/Black.png ||
    set menu-default Win8PEX64
    menu iPXE Boot Menu -- ${ip}
    item --gap --             ----------------------------- WinPE ----------------------
    item --key 2 WinPE2008X86      Boot WinPE2008 X86 (wim)                   --- Hotkey 2
    item --key v WinPE2008X64      Boot WinPE2008 X64 (wim)                   --- Hotkey v
    item --key A Win10PEX64      Boot Win10PE X64 (wim)                   ----- Hotkey A
    item --key A Win10PEX86      Boot Win10PE X86 (wim)                   ----- Hotkey B
    item --key 8 Win8PEX64         Boot Win8PE X64 (wim)                   ------ Hotkey 8
    item --key 5 WePEX64         Boot WePE X64 (wim)                   -------- Hotkey 5
    item --key 0 0PE               Boot Pseudo 0PE (iso)                   ------ Hotkey 0
    item --key g GhostPE         Boot GhostPE (iso)                   --------- Hotkey g
    item --gap --             ---------------------------- DOS Tool -----------------
    item MaxDOS                  Load MaxDOS TooBOX
    item Memtest                   Load Memtest86
    item --gap --             ---------------------------- EXT Boot ------------------
    item Exit                      Exit iPXE and continue boot
    item iSCSI                     Boot from an iSCSI target
    item HTTP                      Boot from an HTTP target
    item Local                     Boot from local drive
    item PXELinux                  Load PXELinux menu
    item PXEGrub4dos               Load PXEGrldr menu
    item --gap --             ------------------------ Advanced options ------------
    item --key c Config            Configure settings                   --------- Hotkey c
    item --key i Shell             Drop to iPXE shell                   --------- Hotkey i
    item --key r Reboot            Reboot the computer                   -------- Hotkey r
    item --key s Power             Shutdown the computer                   ------ Hotkey s
    item --gap --             --------------------------------------------------------
    choose --timeout ${menu-timeout} --default ${menu-default} selected
    goto ${selected}

:0PE
    kernel http://${next-server}/PXELinux.CFG/memdisk iso raw || goto Failed
    initrd http://${next-server}/WinPE/0PEnb.ISO || goto Failed
    boot || goto Failed

:GhostPE
    set keep-san 1
    sanboot --drive 0xff http://${next-server}/WinPE/GhostPE.ISO || goto Failed
    boot || goto Failed

:WinPE2008X86
    set pefile WinPE2008X86.WIM
    goto BIOS_Wimboot

:WinPE2008X64
    set pefile WinPE2008X64.WIM
    goto BIOS_Wimboot

:Win10PEX64
    set pefile Win10PEX64.WIM
    goto BIOS_Wimboot

:Win10PEX86
    set pefile Win10PEX86.WIM
    goto BIOS_Wimboot

:Win8PEX64
    set pefile Win8PEX64.WIM
    goto BIOS_Wimboot

:WePEX64
    set pefile WePEX64.WIM
    goto BIOS_Wimboot

:BIOS_Wimboot
    kernel http://${next-server}/EFI/Boot/wimboot                      gui || goto Failed
    initrd http://${next-server}/EFI/bootmgr                     bootmgr || goto Failed
    initrd http://${next-server}/EFI/bcd                               bcd || goto Failed
    initrd http://${next-server}/EFI/Boot/boot.sdi                boot.sdi || goto Failed
    initrd http://${next-server}/WinPE/${pefile}                   boot.wim || goto Failed
    boot                                                                   || goto Failed
    goto ${start}
#<End iPXE BIOS Boot =================================

:Failed
    echo Booting Failed, dropping to shell
    goto shell
    goto ${start}


:iSCSI
    sanboot iscsi:10.0.4.1:::1:iqn.2010-04.org.ipxe.dolphin:storage || goto Failed       #http://ipxe.org/cmd/sanboot

:HTTP
    sanboot http://boot.ipxe.org/freedos/fdfullcd.iso || goto Failed                     #http://ipxe.org/cmd/sanboot

:Local
    sanboot --no-describe --drive 0x80 || goto Failed                                    #http://ipxe.org/cmd/sanboot

:MaxDOS
    kernel http://${next-server}/PXELinux.CFG/memdisk || goto Failed
    initrd http://${next-server}/IMGS/MaxDOS.img || goto Failed
    boot || goto Failed

:Memtest
    chain http://${next-server}/PXELinux.CFG/memtest.bin || goto Failed                  #http://boot.ipxe.org/memtest.bin
    goto ${start}

:PXELinux
    chain http://${next-server}/PXELinux.0 || goto Failed
    goto ${start}

:PXEGrub4dos
    chain http://${next-server}/PXEGrldr.0 || goto Failed
    goto ${start}

:Config
    config
    goto ${start}

:Power
    poweroff

:Reboot
    reboot

:Exit
    exit

notepad 发表于 2016-2-23 00:26:12

看着眼熟,貌似是我网盘里面的东西。

nytc006 发表于 2016-2-23 08:02:56

notepad 发表于 2016-2-23 00:26
看着眼熟,貌似是我网盘里面的东西。

看了一下你发的帖子,确实是你的。
多谢!!!

notepad 发表于 2016-2-23 08:59:58

nytc006 发表于 2016-2-23 08:02
看了一下你发的帖子,确实是你的。
多谢!!!

其实这个菜单文件还是有一些毛病的,不过主要的部分能用,所以不管也管不了。

nytc006 发表于 2016-2-23 10:13:18

notepad 发表于 2016-2-23 08:59
其实这个菜单文件还是有一些毛病的,不过主要的部分能用,所以不管也管不了。

还好只是供学习之用,如果遇到问题再去找问题解决——不遇到问题就不能进步。。。

nytc006 发表于 2016-2-25 12:39:56

Windows10 10586 PE x86+64(2016.2.3更新)
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=366781&fromuid=343911
(出处: 无忧启动论坛)
ljycslg 的pe中带的ipxe脚本,给力→
#!ipxe
   set menu-timeout 10000
   iseq ${platform} efi && set menu-default win64 || set menu-default win32
   set xieyi:string http
   isset ${ip} || dhcp
:start
menu iPXE Boot Menu --${platform}--${ip}
item --gap --             --------------------------------- PE --------------------------------
item
item win32                Windows10 PE x86
item
item win64                Windows10 PE x64
item
item --gap --             -------------------------------- TOOL --------------------------------
item
item winmem               Windows Memmory Diagnostic
item memtest            Memtest86+ 5.01---- online
item test               ${xieyi} ----select change
item
item --gap --             ---------------------------- Advanced options -----------------------
item
item msboot               Enter Windows Boot Manager Menu (BIOS)
item --key c config       Configure settings                                 -- c
item shell                Drop to iPXE shell
item reboot               Reboot computer
item --key h local      Boot from local drive                              -- h
item --key x exit         Exit iPXE and continue BIOS boot                     -- x
choose --timeout ${menu-timeout} --default ${menu-default} selected
goto ${selected}

:local
sanboot --no-describe --drive 0x80

:shell
echo Type 'exit' to get the back to the menu
shell
goto start

:reboot
reboot

:exit
exit

:config
config
goto start

:msboot
chain tftp://${next-server}/pxeboot.n12
goto start

:test
   iseq ${xieyi} tftp && set xieyi http && goto start ||
   iseq ${xieyi} http && set xieyi tftp && goto start ||

:memtest
chain http://boot.ipxe.org/memtest.0 || goto retry
goto start

:winmem
kernel ${xieyi}://${next-server}/boot/wimboot || goto retry
initrd ${xieyi}://${next-server}/bootmgr.exe   bootmgr.exe || goto retry
initrd ${xieyi}://${next-server}/boot/bme    BXD|| goto retry
initrd ${xieyi}://${next-server}/boot/Fonts/segmono_boot.ttfsegmono_boot.ttf || goto retry
initrd ${xieyi}://${next-server}/boot/Fonts/wgl4_boot.ttf   wgl4_boot.ttf || goto retry
initrd ${xieyi}://${next-server}/boot/memtest.exe   memtest.exe || goto retry
boot || goto retry
goto start

:win32
set pefile PE32.wim
goto bootpe

:win64
set pefile PE64.wim
goto bootpe

:winefi
initrd ${xieyi}://${next-server}/EFI/Boot/bootx64.efi || goto retry
initrd ${xieyi}://${next-server}/boot/bcd|| goto retry
initrd ${xieyi}://${next-server}/boot/PE64.WIM || goto retry
boot || goto retry
goto start

:bootpe
kernel ${xieyi}://${next-server}/boot/wimboot gui || goto retry
initrd ${xieyi}://${next-server}/boot/boot.sdi   boot.sdi|| goto retry
iseq ${platform} pcbios || goto winefi
initrd ${xieyi}://${next-server}/bootmgr.exe bootmgr.exe || goto retry
initrd ${xieyi}://${next-server}/boot/bxe bxd || goto retry
initrd ${xieyi}://${next-server}/boot/${pefile}boot.WIM|| goto retry
boot || goto retry
goto start

:retry
imgfree
prompt Error! press any key to retry
goto start

cctvyz 发表于 2016-4-2 11:08:04

到底怎么做 有教程吗?上面那些代码保存到那个位置啊   我不明白啊

qmvnarqf 发表于 2016-5-1 15:40:57

dd777 发表于 2016-5-2 20:29:43

看看看看看

波涛澎湃mw67 发表于 2016-6-24 11:42:05

我顶啊。接着顶











static/image/common/sigline.gif
老婆不在家,约请人来家里做
史上最恐怖迷宫,千万别点
男人抵挡不住这处丰满的女人
看日本女忧的私密生活l
十个男人也征服不了这个女人
女子独处一室,寂寞难耐
恐怖!酒店摄像头拍下的灵体
AV拍摄时的花絮
灵异事件!真实记录紫禁城的午夜
艳照门事件,视频照片完整版
高清偷拍邻居少妇换内衣

lslkh 发表于 2016-7-2 00:25:45

强烈感谢楼主安乐死药价格多少哪里有买慢性药怎么卖【QQ2557860556】

oob 发表于 2017-4-22 06:30:02

不太会

tang009 发表于 2017-5-11 19:55:45


期待高手破解
页: [1]
查看完整版本: 【转载】一个值得我一样的新手学习的ipxe 网启脚本文件