无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 9492|回复: 16
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 2016-2-22 13:13:35 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 nytc006 于 2016-2-23 08:08 编辑

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


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

  5. #-------------------------------------------------------------------------
  6. #check platform (pcbios or efi), buildarch (i386 or efi)
  7. echo Platform: ${platform}
  8. echo Buildarch: ${buildarch}

  9. set menu-timeout 6000
  10. set menu-default 0PE
  11. isset ${ip} || dhcp
  12. isset ${next-server} || set next-server 192.168.16.11
  13. iseq ${platform} efi && set start EFI_Start || set start BIOS_Start
  14. goto ${start}


  15. #>Begin iPXE uEFI Boot ===========================================
  16. :EFI_Start
  17.     #cpuid --ext 29 && set arch X64 || set arch X86
  18.     iseq ${buildarch} i386 set arch X86 || set arch X64
  19.     set menu-default EFI_Win8PE
  20.     menu iPXE uEFI Boot Menu -- ${ip}
  21.     item --gap --             ------------------------------------ WinPE ----------------------
  22.     item --key 5 EFI_WePE          Boot WePE ${arch} (wimboot)               ----------- Hotkey 5
  23.     item --key 8 EFI_Win8PE        Boot Win8PE ${arch} (wimboot)               --------- Hotkey 8
  24.     item --key A EFI_Win10PE       Boot Win10PE ${arch} (wimboot)               -------- Hotkey A
  25.     item --gap --             ----------------------------------- DOS Tool -----------------------------------
  26.     item MaxDOS                    Load MaxDOS TooBOX
  27.     item Memtest                   Load Memtest86
  28.     item --gap --             -------------------------------- Advanced options --------------
  29.     item --key c Config            Configure settings                   ---------------- Hotkey c
  30.     item --key i Shell             Drop to iPXE shell                   ---------------- Hotkey i
  31.     item --key r Reboot            Reboot the computer                   --------------- Hotkey r
  32.     item --key s Power             Shutdown the computer                   ------------- Hotkey s
  33.     item --key x Exit              Exit iPXE and continue boot                   ------- Hotkey x
  34.     item --gap --             ------------------------------------------------------------------
  35.     choose --timeout ${menu-timeout} --default ${menu-default} selected
  36.     goto ${selected}

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

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

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

  49. :EFI_Wimboot
  50.     kernel http://${next-server}/EFI/Boot/${wimboot}
  51.     initrd http://${next-server}/EFI/Boot/${bootfile}
  52.     initrd -n bcd http://${next-server}/EFI/Microsoft/Boot/${sbcdfile}
  53.     initrd http://${next-server}/EFI/Boot/boot.sdi
  54.     initrd http://${next-server}/WinPE/${pefile}
  55.     boot || goto Failed
  56.     goto ${start}
  57. #<End iPXE uEFI Boot =================================


  58. #>Begin iPXE BIOS Boot =================================
  59. :BIOS_Start
  60.     #console --picture http://${next-server}/Black.png --top 100 --left 100 --bottom 100 ||
  61.     console --picture http://${next-server}/Black.png ||
  62.     set menu-default Win8PEX64
  63.     menu iPXE Boot Menu -- ${ip}
  64.     item --gap --             ----------------------------- WinPE ----------------------
  65.     item --key 2 WinPE2008X86      Boot WinPE2008 X86 (wim)                   --- Hotkey 2
  66.     item --key v WinPE2008X64      Boot WinPE2008 X64 (wim)                   --- Hotkey v
  67.     item --key A Win10PEX64        Boot Win10PE X64 (wim)                   ----- Hotkey A
  68.     item --key A Win10PEX86        Boot Win10PE X86 (wim)                   ----- Hotkey B
  69.     item --key 8 Win8PEX64         Boot Win8PE X64 (wim)                   ------ Hotkey 8
  70.     item --key 5 WePEX64           Boot WePE X64 (wim)                   -------- Hotkey 5
  71.     item --key 0 0PE               Boot Pseudo 0PE (iso)                   ------ Hotkey 0
  72.     item --key g GhostPE           Boot GhostPE (iso)                   --------- Hotkey g
  73.     item --gap --             ---------------------------- DOS Tool -----------------
  74.     item MaxDOS                    Load MaxDOS TooBOX
  75.     item Memtest                   Load Memtest86
  76.     item --gap --             ---------------------------- EXT Boot ------------------
  77.     item Exit                      Exit iPXE and continue boot
  78.     item iSCSI                     Boot from an iSCSI target
  79.     item HTTP                      Boot from an HTTP target
  80.     item Local                     Boot from local drive
  81.     item PXELinux                  Load PXELinux menu
  82.     item PXEGrub4dos               Load PXEGrldr menu
  83.     item --gap --             ------------------------ Advanced options ------------
  84.     item --key c Config            Configure settings                   --------- Hotkey c
  85.     item --key i Shell             Drop to iPXE shell                   --------- Hotkey i
  86.     item --key r Reboot            Reboot the computer                   -------- Hotkey r
  87.     item --key s Power             Shutdown the computer                   ------ Hotkey s
  88.     item --gap --             --------------------------------------------------------
  89.     choose --timeout ${menu-timeout} --default ${menu-default} selected
  90.     goto ${selected}

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

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

  99. :WinPE2008X86
  100.     set pefile WinPE2008X86.WIM
  101.     goto BIOS_Wimboot

  102. :WinPE2008X64
  103.     set pefile WinPE2008X64.WIM
  104.     goto BIOS_Wimboot

  105. :Win10PEX64
  106.     set pefile Win10PEX64.WIM
  107.     goto BIOS_Wimboot

  108. :Win10PEX86
  109.     set pefile Win10PEX86.WIM
  110.     goto BIOS_Wimboot

  111. :Win8PEX64
  112.     set pefile Win8PEX64.WIM
  113.     goto BIOS_Wimboot

  114. :WePEX64
  115.     set pefile WePEX64.WIM
  116.     goto BIOS_Wimboot

  117. :BIOS_Wimboot
  118.     kernel http://${next-server}/EFI/Boot/wimboot                      gui || goto Failed
  119.     initrd http://${next-server}/EFI/bootmgr                       bootmgr || goto Failed
  120.     initrd http://${next-server}/EFI/bcd                               bcd || goto Failed
  121.     initrd http://${next-server}/EFI/Boot/boot.sdi                boot.sdi || goto Failed
  122.     initrd http://${next-server}/WinPE/${pefile}                   boot.wim || goto Failed
  123.     boot                                                                   || goto Failed
  124.     goto ${start}
  125. #<End iPXE BIOS Boot =================================

  126. :Failed
  127.     echo Booting Failed, dropping to shell
  128.     goto shell
  129.     goto ${start}


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

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

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

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

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

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

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

  149. :Config
  150.     config
  151.     goto ${start}

  152. :Power
  153.     poweroff

  154. :Reboot
  155.     reboot

  156. :Exit
  157.     exit
复制代码

小Q截图-20160222131302.png (39.32 KB, 下载次数: 176)

小Q截图-20160222131302.png
2#
发表于 2016-2-23 00:26:12 | 只看该作者
看着眼熟,貌似是我网盘里面的东西。

点评

哈哈~好眼力  发表于 2016-10-20 08:41
看了一下你发的帖子,确实是你的。 多谢!!!  详情 回复 发表于 2016-2-23 08:02
回复

使用道具 举报

3#
 楼主| 发表于 2016-2-23 08:02:56 | 只看该作者
notepad 发表于 2016-2-23 00:26
看着眼熟,貌似是我网盘里面的东西。

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

点评

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

使用道具 举报

4#
发表于 2016-2-23 08:59:58 | 只看该作者
nytc006 发表于 2016-2-23 08:02
看了一下你发的帖子,确实是你的。
多谢!!!

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

点评

还好只是供学习之用,如果遇到问题再去找问题解决——不遇到问题就不能进步。。。  详情 回复 发表于 2016-2-23 10:13
回复

使用道具 举报

5#
 楼主| 发表于 2016-2-23 10:13:18 | 只看该作者
notepad 发表于 2016-2-23 08:59
其实这个菜单文件还是有一些毛病的,不过主要的部分能用,所以不管也管不了。

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

使用道具 举报

6#
 楼主| 发表于 2016-2-25 12:39:56 | 只看该作者
Windows10 10586 PE x86+64(2016.2.3更新)
http://bbs.wuyou.net/forum.php?m ... &fromuid=343911
(出处: 无忧启动论坛)
ljycslg 的pe中带的ipxe脚本,给力→
  1. #!ipxe
  2.    set menu-timeout 10000
  3.    iseq ${platform} efi && set menu-default win64 || set menu-default win32
  4.    set xieyi:string http
  5.    isset ${ip} || dhcp
  6. :start
  7.   menu iPXE Boot Menu --${platform}--${ip}
  8.   item --gap --             --------------------------------- PE --------------------------------
  9.   item
  10.   item win32                Windows10 PE x86
  11.   item
  12.   item win64                Windows10 PE x64
  13.   item
  14.   item --gap --             -------------------------------- TOOL --------------------------------
  15.   item
  16.   item winmem               Windows Memmory Diagnostic
  17.   item memtest              Memtest86+ 5.01  ---- online
  18.   item test                 ${xieyi} ----  select change
  19.   item
  20.   item --gap --             ---------------------------- Advanced options -----------------------
  21.   item
  22.   item msboot               Enter Windows Boot Manager Menu (BIOS)
  23.   item --key c config       Configure settings                                   -- c
  24.   item shell                Drop to iPXE shell
  25.   item reboot               Reboot computer
  26.   item --key h local        Boot from local drive                                -- h
  27.   item --key x exit         Exit iPXE and continue BIOS boot                     -- x
  28.   choose --timeout ${menu-timeout} --default ${menu-default} selected
  29.   goto ${selected}

  30. :local
  31.   sanboot --no-describe --drive 0x80

  32. :shell
  33.   echo Type 'exit' to get the back to the menu
  34.   shell
  35.   goto start

  36. :reboot
  37.   reboot

  38. :exit
  39.   exit

  40. :config
  41.   config
  42.   goto start

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

  46. :test
  47.    iseq ${xieyi} tftp && set xieyi http && goto start ||
  48.    iseq ${xieyi} http && set xieyi tftp && goto start ||

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

  52. :winmem
  53.   kernel ${xieyi}://${next-server}/boot/wimboot || goto retry
  54.   initrd ${xieyi}://${next-server}/bootmgr.exe     bootmgr.exe || goto retry
  55.   initrd ${xieyi}://${next-server}/boot/bme    BXD  || goto retry
  56.   initrd ${xieyi}://${next-server}/boot/Fonts/segmono_boot.ttf  segmono_boot.ttf || goto retry
  57.   initrd ${xieyi}://${next-server}/boot/Fonts/wgl4_boot.ttf     wgl4_boot.ttf || goto retry
  58.   initrd ${xieyi}://${next-server}/boot/memtest.exe   memtest.exe || goto retry
  59.   boot || goto retry
  60.   goto start

  61. :win32
  62.   set pefile PE32.wim
  63.   goto bootpe

  64. :win64
  65.   set pefile PE64.wim
  66.   goto bootpe

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

  73. :bootpe
  74.   kernel ${xieyi}://${next-server}/boot/wimboot gui || goto retry
  75.   initrd ${xieyi}://${next-server}/boot/boot.sdi   boot.sdi  || goto retry
  76.   iseq ${platform} pcbios || goto winefi
  77.   initrd ${xieyi}://${next-server}/bootmgr.exe bootmgr.exe || goto retry
  78.   initrd ${xieyi}://${next-server}/boot/bxe bxd || goto retry
  79.   initrd ${xieyi}://${next-server}/boot/${pefile}  boot.WIM  || goto retry
  80.   boot || goto retry
  81.   goto start

  82. :retry
  83.   imgfree
  84.   prompt Error! press any key to retry
  85.   goto start
复制代码
回复

使用道具 举报

7#
发表于 2016-4-2 11:08:04 | 只看该作者
到底怎么做 有教程吗?  上面那些代码保存到那个位置啊   我不明白啊
回复

使用道具 举报

8#
发表于 2016-5-1 15:40:57 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

9#
发表于 2016-5-2 20:29:43 | 只看该作者
看看看看看
回复

使用道具 举报

10#
发表于 2016-6-24 11:42:05 | 只看该作者
我顶啊。接着顶












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

使用道具 举报

11#
发表于 2016-7-2 00:25:45 | 只看该作者
强烈感谢楼主安乐死药价格多少  哪里有买慢性药怎么卖【QQ  2557860556】
回复

使用道具 举报

12#
发表于 2017-4-22 06:30:02 来自手机 | 只看该作者
不太会
回复

使用道具 举报

13#
发表于 2017-5-11 19:55:45 | 只看该作者

期待高手破解
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-20 09:11

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表