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
}
作者: jneny 时间: 2014-3-24 00:16
*******************************************************
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 ???