无忧启动论坛

标题: [史上最伟大网管] 全套全功能全环境编译好的ipxe文件下载 (官方同步[支持本地云启]) [打印本页]

作者: 江南一根葱    时间: 2020-3-20 12:56
标题: [史上最伟大网管] 全套全功能全环境编译好的ipxe文件下载 (官方同步[支持本地云启])
本帖最后由 江南一根葱 于 2025-9-23 20:30 编辑

https://github.com/zwj4031/ipxe/releases
含有嵌入脚本的,和未嵌入脚本的支持背景图片、iscsi、本地fat分区文件读取(仅EFI支持)
欢迎测试ctrl+B改成呼出菜单,第一项为继续启动,第二项为取ipxefm脚本文件,如图:


无dhcp场所可以设置静态ip、子网掩码、网关、dns,如图:

可以设置启动服务器ip和启动脚本,结合上面的设置静态ip,无dhcp场所从U盘启动也可以启动公网上的脚本!!!比如gitee上的,自家nas上的,如图:

附上嵌入的脚本源码:


  1. #!ipxe
  2. #新版嵌入脚本
  3. :retry_dhcp
  4. dhcp || goto retry_dhcp
  5. ################## 如果filename设置不存在,则设置一个默认值

  6. isset ${filename} || set filename ipxeboot.txt

  7. # 这是进入菜单的唯一方式,并且它在任何网络操作之前执行。
  8. prompt --key 0x02 --timeout 60 Press Ctrl-B for iPXE Menu... && goto menu || autoboot

  9. :boot

  10. #找不到next-server变量就把dhcp-server的变量值给它
  11. isset ${next-server} || set next-server ${dhcp-server}
  12. #找不到proxydhcp/next-server变量就把proxydhcp/dhcp-server的变量值给它
  13. isset ${proxydhcp/next-server} || set proxydhcp/next-server ${proxydhcp/dhcp-server}
  14. #如果proxydhcp/next-server变量值存在,那么赋给booturl,不然就使用next-server的变量值
  15. isset ${proxydhcp/next-server} && set booturl ${proxydhcp/next-server} || set booturl ${next-server}
  16. # 如果上述变量都为空(例如静态IP),配置ip
  17. isset ${booturl} || goto netconfig

  18. :menu
  19. menu  iPXE's Boot Menu BootServer:http://${booturl}

  20.    item --gap -- Choose BootFile
  21.    item --key 1 autoboot            1.  AutoBoot
  22.    item --key 2 iPXEFM            2.  Boot iPXEFM
  23.    item --gap -- Cloud Boot
  24.    item  RyanBoot              RyanBoot
  25.    item  netboot.xyz.${platform}  netboot.xyz

  26.    item --gap -- Advanced options
  27.    item --key l reload         L.  Reload iPXE Menu
  28.    item --key c config              C.  Configure Boot Server
  29.    item --key n netconfig      N.  Configure Network (Static IP)
  30.    item --key s shell          S.  Drop to iPXE shell
  31.    item --key r reboot         R.  Reboot computer
  32.    item --key p poweroff       P.  Poweroff computer
  33.    item --key x bootlocal      X.  Exit iPXE and continue BIOS boot
  34.    item ratio                Resolution ratio [1920x1080 1024x768 800x600]
  35. choose --timeout 2000 --default autoboot selected ||
  36. iseq ${selected} autoboot && autoboot ||
  37. iseq ${selected} iPXEFM && chain tftp://${booturl}/ipxeboot.txt ||
  38. iseq ${selected} config && goto config ||
  39. iseq ${selected} netconfig && goto netconfig ||
  40. iseq ${selected} shell && shell ||
  41. iseq ${selected} reboot && reboot ||
  42. iseq ${selected} poweroff && poweroff ||
  43. iseq ${selected} bootlocal && goto ${platform}bootlocal ||
  44. iseq ${selected} ratio && goto ratio ||
  45. iseq ${selected} RyanBoot && chain --autofree http://hkkitlee.ddns.net:8999/chain.ipxe ||
  46. iseq ${selected} netboot.xyz.pcbios && chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn ||
  47. iseq ${selected} netboot.xyz.efi && chain --autofree https://boot.netboot.xyz/ipxe/netboot.xyz.efi ||
  48. iseq ${selected} burn && chain ${prefix}/types/burn ||
  49. iseq ${selected} reload && chain http://${booturl}/${filename} ||
  50. goto retry_dhcp


  51. :retry_dhcp
  52. dhcp || goto retry_dhcp

  53. :config
  54. # 判断应该进入哪个配置流程
  55. isset ${proxydhcp/next-server} && goto config_proxy || goto config_standard

  56. :config_proxy
  57. # ProxyDHCP环境下的配置表单
  58. form Configure ProxyDHCP Boot Server
  59. item proxydhcp/next-server   Boot Server (ProxyDHCP)
  60. item filename                Script Filename
  61. present || goto menu
  62. goto boot

  63. :config_standard
  64. # 标准DHCP或静态IP环境下的配置表单
  65. form Configure Boot Server (DHCP/Static)
  66. item next-server   Boot Server
  67. item filename      Script Filename
  68. present || goto menu
  69. goto boot

  70. :netconfig
  71. form Configure IPv4 networking on ${net0/mac}
  72. item net0/ip        IPv4 address
  73. item net0/netmask   Subnet mask
  74. item net0/gateway   Gateway address
  75. item dns            DNS server address
  76. present || goto menu
  77. goto menu
复制代码











作者: MC阿虎    时间: 2020-3-20 14:38
热心回复
作者: 9695    时间: 2020-3-20 16:12
谢谢分享
作者: xin266    时间: 2020-3-20 17:21
感谢热心人
作者: wdtx    时间: 2020-3-20 21:50
谢谢分享,虽然不太会用
作者: 邪恶海盗    时间: 2020-3-20 21:53
iPXE官方看起来天天在更新,不过我上次对比过一回,日期不同的文件MD5是一样的...
作者: MC阿虎    时间: 2020-3-21 09:05
热心回复
作者: 江南一根葱    时间: 2020-3-21 09:35
邪恶海盗 发表于 2020-3-20 21:53
iPXE官方看起来天天在更新,不过我上次对比过一回,日期不同的文件MD5是一样的...

就源码在更新吧 官方提供的估计n久没更新了
作者: 2012huguoliang    时间: 2020-3-21 10:11
大神 有没有IPXE可以直接引导远程桌面mstsc的
作者: gjm718    时间: 2020-3-22 02:50
热心回复!
作者: sxz7392    时间: 2020-3-22 14:59
请问大神,下载地址中的ipxe.efi是32位还是64位的?
作者: 江南一根葱    时间: 2020-3-22 15:04
sxz7392 发表于 2020-3-22 14:59
请问大神,下载地址中的ipxe.efi是32位还是64位的?

因为没见过活的32位efi环境,所以没编译。。
作者: sxz7392    时间: 2020-3-22 15:06
OK,谢谢
作者: 江南一根葱    时间: 2020-3-23 12:45
2012huguoliang 发表于 2020-3-21 10:11
大神 有没有IPXE可以直接引导远程桌面mstsc的

用tinycore可以,就是声音我没搞定,放弃了
作者: 江南一根葱    时间: 2020-3-23 12:45
2012huguoliang 发表于 2020-3-21 10:11
大神 有没有IPXE可以直接引导远程桌面mstsc的

用tinycore可以,就是声音我没搞定,放弃了
作者: dianzigou    时间: 2020-4-3 20:58
感谢热心人
作者: zhouyulong    时间: 2020-8-13 10:53
感谢分享,,
作者: mayi    时间: 2020-8-13 12:30

谢谢分享,虽然不太会用
作者: 2012=2012    时间: 2023-3-31 22:31
好久没更新了
作者: chairmansu    时间: 2023-4-7 19:26
谢谢分享
作者: hanchi123    时间: 2023-4-18 12:57
感谢分享
作者: 江南一根葱    时间: 2025-4-25 12:58
25250425 修复action同步 修复action编译



作者: twak2142    时间: 2025-4-27 02:57
恭喜,葱先生还在研发
作者: 13563496094    时间: 2025-5-7 10:08
江南一根葱 发表于 2025-4-25 12:58
25250425 修复action同步 修复action编译

葱大  netcopy 拷贝会修改bios设置,有解决办法吗,
作者: 201287zr    时间: 2025-5-19 00:58
本帖最后由 201287zr 于 2025-5-19 01:00 编辑

您编译的ipxe.efi是32位和64位都通用的吗?内嵌脚本的名称是什么呢,可否详细说明一下。
作者: 419545168    时间: 2025-6-6 21:14
厉害了
作者: 江南一根葱    时间: 2025-6-8 14:28
201287zr 发表于 2025-5-19 00:58
您编译的ipxe.efi是32位和64位都通用的吗?内嵌脚本的名称是什么呢,可否详细说明一下。

action脚本里有嵌入脚本语句
作者: wdtx    时间: 2025-7-12 20:06
没有教程不会用。
作者: wqsohu    时间: 2025-8-5 10:48
谢谢分享
作者: 菲菲18866    时间: 2025-8-6 16:34
全套全功能全环境编译
作者: 江南一根葱    时间: 2025-9-19 23:05
20250919 修复编译,增加一些ipxe新特性

作者: mygamexxx    时间: 2025-9-20 07:07
出现这个是什么原因?

PixPin_2025-09-20_07-07-13.jpg (76.07 KB, 下载次数: 106)

PixPin_2025-09-20_07-07-13.jpg

作者: 江南一根葱    时间: 2025-9-20 09:56
mygamexxx 发表于 2025-9-20 07:07
出现这个是什么原因?

启动文件太大
作者: gdlmxia    时间: 2025-9-20 10:18
太好啦&萬分感謝版主的無私發佈分享%
作者: mygamexxx    时间: 2025-9-20 15:44
江南一根葱 发表于 2025-9-20 09:56
启动文件太大

还没开始加载脚本,应该就是下载的ipxe.efi啊,怎么会文件太大?
作者: 江南一根葱    时间: 2025-9-20 19:21
mygamexxx 发表于 2025-9-20 15:44
还没开始加载脚本,应该就是下载的ipxe.efi啊,怎么会文件太大?

你传统bios启ipxe.efi?
作者: mygamexxx    时间: 2025-9-20 19:46
江南一根葱 发表于 2025-9-20 19:21
你传统bios启ipxe.efi?

ipxe.pxe在BIOS和ipxe.efi在UEFI都试了一样现象。
作者: 江南一根葱    时间: 2025-9-20 19:56
mygamexxx 发表于 2025-9-20 19:46
ipxe.pxe在BIOS和ipxe.efi在UEFI都试了一样现象。

还没试过,bios可能太大,但uefi不会是这个提示
作者: 江南一根葱    时间: 2025-9-21 11:09
mygamexxx 发表于 2025-9-20 19:46
ipxe.pxe在BIOS和ipxe.efi在UEFI都试了一样现象。


反复测试没你说的问题,你是不是把配置弄乱了

作者: 江南一根葱    时间: 2025-9-22 09:26
新版变化巨大,启动很快速,目前自动编译好的传统bios还有问题
作者: djsh001    时间: 2025-9-22 09:39
感谢分享!虽然不太会用。
作者: redapple    时间: 2025-9-22 10:29
djsh001 发表于 2025-9-22 09:39
感谢分享!虽然不太会用。

我也不清楚这个怎么用,等等吧。看后面有人出教程不。
作者: mygamexxx    时间: 2025-9-22 11:51
本帖最后由 mygamexxx 于 2025-9-22 12:21 编辑
江南一根葱 发表于 2025-9-21 11:09
反复测试没你说的问题,你是不是把配置弄乱了

今天重新下载最新版测试了,UEFI下ipxe.efi没有问题。bios下undionly.kpxe进入菜单,使用wimboot启动PE没成功,出现如图(用ipxe.pxe也一样)。同一脚本,使用yigeren编译的ipxe.pxe顺利启动pe。

wechat_2025-09-22_120912_786.png (3.72 KB, 下载次数: 92)

wechat_2025-09-22_120912_786.png

作者: abelll    时间: 2025-9-23 08:23
占楼
作者: 江南一根葱    时间: 2025-9-23 09:34
mygamexxx 发表于 2025-9-22 11:51
今天重新下载最新版测试了,UEFI下ipxe.efi没有问题。bios下undionly.kpxe进入菜单,使用wimboot启动PE没 ...

上面说了bios的还有问题
作者: 江南一根葱    时间: 2025-9-23 20:28


作者: 江南一根葱    时间: 2025-10-16 17:37
忘发了,bios下的问题已经修复
作者: 简减    时间: 2025-10-16 19:00
感谢分享
作者: 2011yaya2007777    时间: 2025-10-16 20:04
从ipxe加载g4e,tftp服务失效了,这是为什么呢?
作者: 江南一根葱    时间: 2025-10-16 20:42
本帖最后由 江南一根葱 于 2025-10-16 20:45 编辑
2011yaya2007777 发表于 2025-10-16 20:04
从ipxe加载g4e,tftp服务失效了,这是为什么呢?

从ipxe加载g4e确实会丢失next-server信息、proxydhcp信息,不能继承,grub2也这样,很多信息都丢失了,可能是grub2没有pxebs机制的关系,所以我网启服务器加了参数加载
chain netgrubfmx64.efi proxydhcp=${proxydhcp/next-server}传入参数再读取,强制设置tftp服务器ip来解决问题,
作者: 2011yaya2007777    时间: 2025-10-16 20:49
我传入了参数,服务器IP正确,http传输正常,但是tftp传输失败。
chain tftp://${next-server}/bootx64.efi  next-server=${next-server}

是不是传入的参数不对?
作者: 2011yaya2007777    时间: 2025-10-16 20:56
${proxydhcp/next-server} 与 ${next-server} 是一样的,都是 192.168.182.1
作者: 江南一根葱    时间: 2025-10-16 21:47
本帖最后由 江南一根葱 于 2025-10-16 21:50 编辑
2011yaya2007777 发表于 2025-10-16 20:49
我传入了参数,服务器IP正确,http传输正常,但是tftp传输失败。
chain tftp://${next-server}/bootx64.ef ...

这。。g4e不支持这样传吧。。要内部有脚本接受参数,设置到default-server
grubfm是内部脚本有这么一段

  1. function net_detect {
  2.   export grub_netboot=0;
  3.   if [ "${bootdev}" != "tftp" ];
  4.   then
  5.     return;
  6.   fi;
  7.   if [ "${grub_platform}" = "efi" ];
  8.   then
  9.     if [ -z "${net_default_server}" -a -n "${net_efinet0_next_server}" ];
  10.     then
  11.       export net_default_server="${net_efinet0_next_server}";
  12.     fi;
  13.     if getargs --value "proxydhcp" proxydhcp;
  14.     then
  15.       export net_default_server="${proxydhcp}";
  16.     fi;
  17.     if [ -z "${net_default_server}" ];
  18.     then
  19.       return;
  20.     fi;
  21.   else
  22.     if [ -z "${net_default_server}" ];
  23.     then
  24.       export net_default_server="${net_pxe_next_server}";
  25.     fi;
  26.   fi;
  27.   export grub_netboot=1;
  28.   grubfm_set --boot 1;
  29. }
复制代码



作者: 2011yaya2007777    时间: 2025-10-16 21:57
g4e可以支持这样传递。我明天试一试。谢了!
作者: 2011yaya2007777    时间: 2025-10-17 11:44
本帖最后由 2011yaya2007777 于 2025-10-17 11:47 编辑

ipxe里面似乎没有default-server这个变量,53楼里面的变量也没有。定位后发现,使用tftp获得文件尺寸 ,服务器返回了正确值,但是客户端返回错误,提示参数不支持。我怀疑要么是ipxe接管了tftp服务,然而其代码有缺陷,要么是破坏了客户端原代码?
作者: 江南一根葱    时间: 2025-10-17 12:30
本帖最后由 江南一根葱 于 2025-10-17 12:32 编辑
2011yaya2007777 发表于 2025-10-17 11:44
ipxe里面似乎没有default-server这个变量,53楼里面的变量也没有。定位后发现,使用tftp获得文件尺寸 ,服 ...

如果非proxydhcp也要传个ip过去我一般是
isset {proxydhcp/next-server} && set serverip= {proxydhcp/next-server} || set serverip= {netX/next-server}
chain grub2.efi serverip=${serverip}

不过http能正常的话,可以访问(tftp,192.168.11.1)/xxx这样的吧空了让ai看看能不能从ipxe获取更多和网络有关的数据

作者: 2011yaya2007777    时间: 2025-10-20 16:02
新版本支持ipxe启动g4e传入参数: chain /bootg4e.efi ipxe=${proxydhcp/next-server}
现在可以通过ipxe启动g4e了。
作者: 2012pq6895148    时间: 4 天前
感谢分享




欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/) Powered by Discuz! X3.3