陈晓猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::
  364 随笔 :: 0 文章 :: 130 评论 :: 125万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

Tiny PXE Server简介
Tiny PXE Server是一款小巧而功能强大的网启软件。支持DHCP TFTP HTTP BINL DNS等多个协议,支持grub4dos,pxelinux,ipxe等多个引导器,支持从PXE/gPXE/IPXE启动,最新版居然能够直接从互联网通过http协议启动,实在逆天。
Tiny PXE Server下载地址:http://erwan.labalec.fr/tinypxeserver/pxesrv.zip
1、启动IPXE
Tiny PXE Server可以直接加载自定义的外置脚本菜单,所以Tiny PXE Server搭配IPXE启动,真是绝配,不用搭建linux编译环境编译IPXE启动菜单,或者是FQ从https://rom-o-matic.eu/网站编译。IPXE比PXE相比,由于采用了HTTP协议传输文件,传输速度大大提高。
①双击pxesrv.exe启动Tiny PXE Server,启动文件选择ipxe.pxe或者undionly.kpxe,undionly.kpxe仅加载UNDI而不加载PXE,后缀kpxe中的k表示keep UNDI,undionly.kpxe会通过UNDI复用网卡自身PXE软件栈的驱动。ipxe.pxe不加载UNDI,也不加载PXE,只能通过iPXE自己实现的硬件驱动来操作网卡。如果该网卡不被iPXE支持,就会出错。
【注意】Tiny PXE Server会把启动文件所在的目录设置为root path,root path子目录下的文件才可以通过http访问到,root path以上的文件无法访问。例如:如果把ipxe.pxe放在E:\boot\目录下,root path=E:\boot\,访问E:\boot\imgs\目录下的ISO文件是http://${next-server}/imgs/TonPE_net.iso,而不是http://${next-server}/boot/imgs/TonPE_net.iso,注意root path的设置,文件相对位置关系必须与菜单对应,否则会发生找不到文件的错误。
②Filename if user-class=gPXE or IPXE,输入自定义脚本菜单ipxemenu.ipxe,这是我编写的ipxe启动脚本,更详细的可以参考下载的安装包pxesrv.zip里面的menu.ipxe。
最新版的启动文件ipxe.pxe/undionly.kpxe可以从以下地址下载:http://boot.ipxe.org/
IPXE.KRN可以从上面网址中ipxe.iso中提取,用来从linux内核转到ipxe启动。
③其他配置Tiny PXE Server会自动配置,基本属于免配置。注意OPT17(root path)是dhcp root path (例如iscsi, aoe) ,而不是一个file root path,如果不用应该保持空白。
④右击历史记录框可以保存当前配置文件到exe所在目录的config.ini文件,修改配置文件之后,建议重新启动Tiny PXE Server,先点右上角的offline,然后单击online启动Tiny PXE Server。如果配置文件弄乱了,建议删除config.ini,然后重新配置并保存。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ipxemenu.ipxe<br>#!ipxe
  set menu-timeout 3000
   set menu-default tongyonpe_net
   isset ${ip} || dhcp
   isset ${next-server} || set next-server 192.168.168.105
:start
  menu iPXE Boot Menu
  item --gap --             --------------------------------- iPXE Boot Menu--------------------------------
  item tongyonpe_net                tongyonpe_net
  item tongyonpe                tongyonpe
  item tongyon7pe              tongyon7pe
  item grub4dos                 grub4dos
  item pxelinux                   pxelinux
  item reboot     Reboot
  item exit       Exit (boot local disk)
  item --gap --             ----------------------------------------------------------------------
  choose --timeout ${menu-timeout} --default ${menu-default} selected
  goto ${selected}
 
:tongyonpe_net
  initrd http://${next-server}/imgs/TonPE_net.iso
  #chain http://${next-server}/pxelinux.cfg/memdisk raw iso
  chain http://${next-server}/grub/grub.exe  --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
 
:tongyonpe
  initrd http://${next-server}/imgs/TonPE.iso
  #chain http://${next-server}/pxelinux.cfg/memdisk raw iso
  chain http://${next-server}/grub/grub.exe  --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
 
:tongyon7pe
  initrd http://${next-server}/imgs/TonPE_V3.3.iso
  #chain http://${next-server}/pxelinux.cfg/memdisk raw iso
  chain http://${next-server}/grub/grub.exe  --config-file="map (rd)+1 (0xff);map --hook;chainloader (0xff)"
 
 
 
:grub4dos
chain http://${next-server}/grub/grldr
    goto start
 
:pxelinux
#dhcp
dhcp net0
set 210:string tftp://${next-server}/
#set 210:string tftp://${dhcp-server}/
chain ${210:string}pxelinux.0
goto start
 
:reboot
reboot
 
:exit
exit

  


2、启动grub4dos
启动文件选择grldr即可,其他留空白。
3、启动pxelinux
启动文件选择pxelinux.0即可,其他留空。
个人觉得玩IPXE<==>grub4dos<==>pxelinux互相切换引导,没啥意思,选择哪个引导器就直接让他做第一引导就是了。

grub4dos通用菜单及相关工具包http://yunpan.cn/cyuuUtUQMfmGN  提取码 c2ac

posted on   陈晓猫  阅读(23503)  评论(1编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示