Tiny PXE Server简介

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启动菜单,或者是翻墙从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:oot目录下,root path=E:oot,访问E:ootimgs目录下的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,然后重新配置并保存。

ipxemenu.ipxe
#!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

原文地址:https://www.cnblogs.com/liuzhaoyzz/p/4967201.html