无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 8041|回复: 4

[讨论] UEFI、BIOS之PXE启动相关文件

  [复制链接]
发表于 2014-3-23 17:09:11 | 显示全部楼层 |阅读模式
目前我收集到的PXE方式启动有:
BIOS:grldr、pxelinux/gpxelinux、grub2、ipxe
UEFI:ipxe、grub2

grldr,pxelinux 论坛帖子很多。主要讨论下grub2,ipxe


grub2:
下载源码:
git clone git://git.savannah.gnu.org/grub.git
cd grub

生成configure文件
./autogen.sh   

一、pxe bios:
./configure    --with-platform=i386-pc  --prefix=$HOME/grub-bios
make
make install
cd $HOME/grub-bios
bin/grub-mkimage  -d lib/grub/i386-pc/ -O i386-pc  -p /grub2 -o ~/core.0 pxe pxechain net tftp
cat lib/grub/i386-pc/pxeboot.img ~/core.0 > /tftpboot/pxeboot.0
mkdir /tftpboot/grub2
cp -R $HOME/grub-bios/lib/grub/i386-pc  /tftpboot/grub2

        或直接  bin/grub-mknetdir  -d lib/grub/i386-pc/   --net-directory=/tftpboot/ --subdir=grub2  --modules="pxe pxechain net tftp"

二、pxe uefi:
cd $HOME/grub-efi
./configure    --with-platform=efi  --prefix=$HOME/grub-efi   
make &&make install
bin/grub-mkimage  -O x86_64-efi  -o /tftpboot/bootx64.efi --prefix='(pxe)/grub2' efinet normal tftp  
mkdir /tftpboot/grub2
cp -R $HOME/grub-efi/lib/grub/x86_64-efi  /tftpboot/grub2



三、使用HTTP方式

menuentry "sysrecd PXE uefi or Bios" --class windows --class os {
        insmod http
        set root=http,net_default_server
        linux  /altker64 dodhcp root=auto netboot=http://10.0.8.6/sysrecd/sysrcd.dat
        initrd  /initram.igz
}


IPXE:
ipxe  官方源不支持efi 引导设备
我用第三方源替换文件完成的
git clone  git://git.ipxe.org/ipxe.git ipxe
git clone  git://git.ipxe.org/vendor/xcat/ipxe.git ipxe-xcat     #第三方源
cp ipxe-xcat/image/efi_image.c  ipxe/image/efi_image.c     #替换EFI相关文件

BIOS平台编译:make bin/undionly.kpxe
uefi平台编译: make bin-x86_64-efi/snponly.efi

提供的附件grub2文件是从ubuntu版的grub2的,PXE BIOS 的grub2 HTTP传送能达到10MB/s 而UEFI只有500KB和tftp 相当。从官方源码编译过来的2种都只在500KB以下
我测试了gpxelinux.0 HTTP最快有13MB/s,win 8.1 版pxe bootmgr 的pxeboot.n12 有8MB/s ,VM+centos+apache 主机,VM客户机测试仅供参考。

最后请教syslinux PXE UEFI 、bootmgr  PXE UEFI 及memdisk.efi的制作方法? PXE-UEFI&BIOS网启文件iPXE-GRUB2.zip (1.58 MB, 下载次数: 519)
 楼主| 发表于 2014-3-24 00:16:33 | 显示全部楼层
*******************************************************
GRUB2 will be compiled with following components:
Platform: x86_64-efi
With devmapper support: No (need libdevmapper header)
With memory debugging: No
With disk cache statistics: No
With boot time statistics: No
efiemu runtime: No (not available on efi)
grub-mkfont: No (need freetype2 library)
grub-mount: No (need FUSE library)
starfield theme: No (No build-time grub-mkfont)
With libzfs support: No (need zfs library)
Build-time grub-mkfont: No (need freetype2 library)
Without unifont (no build-time grub-mkfont)
With liblzma from -llzma (support for XZ-compressed mips images)       # 测试的beta版本,安装了xz-devel 后再编译,HTTP速度从500KB增加到8MB/s ???

grub2 PXE UEFI依然在 700KB左右。
http://pan.baidu.com/s/1jGLrWkY

回复

使用道具 举报

发表于 2014-12-28 18:36:35 | 显示全部楼层
共享的连接失效了......
回复

使用道具 举报

发表于 2015-2-11 17:07:44 | 显示全部楼层
没用过PXE
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-4-16 12:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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