本帖最后由 星体投射 于 2019-10-11 07:48 编辑
按F8手动选菜单,不按自动加载第一项,并实现自动ipxe加载菜单(网启目录下放ipxemenu.txt),ipxe可以直接用官方的文件,无需编译内置菜单
dnsmasq的UEFI网启非常古怪,反复捉摸网上的各种别人写的菜单,最终总结只能这么写
小技巧:openwrt 路由器上一般都是u盘和sd卡上放网启目录,可以把该目录软链接到/www下就实现了http服务,方便用ipxe的http启动
- ln -s /mnt/sda1/pxeboot /www/pxeboot
复制代码
dnsmasq版本2.76以上
dnsmasq.conf配置
- enable-tftp
- tftp-lowercase
- dhcp-no-override
- tftp-root=/mnt/sda1/pxeboot
- dhcp-match=set:iPXE,175
- dhcp-vendorclass=set:flag,PXEClient:Arch:00000
- dhcp-vendorclass=set:flag,PXEClient:Arch:00006
- dhcp-vendorclass=set:flag,PXEClient:Arch:00007
- dhcp-vendorclass=set:flag,PXEClient:Arch:00009
- tag-if=set:load,tag:!iPXE,tag:flag
- pxe-prompt="Press F8 or Enter key for PXE menu.", 5
- #BIOS MENU
- pxe-service=tag:load,X86PC, "BIOS ipxe undionly", undionly.kpxe
- pxe-service=tag:load,X86PC, "BIOS ipxe.pxe", ipxe.pxe
- pxe-service=tag:load,X86PC, "BIOS Microsoft PXE", pxeboot.n12
- pxe-service=tag:load,X86PC, "boot from local", 0
- #UEFI MENU
- pxe-service=tag:load,IA32_EFI, "Microsoft UEFI (IA32_EFI)", bootia32.efi
- pxe-service=tag:load,X86-64_EFI, "Microsoft UEFI (X86-64_EFI)", bootx64.efi
- pxe-service=tag:load,BC_EFI, "Microsoft UEFI(BC-EFI)", bootx64.efi
- pxe-service=tag:load,6, "iPXE snponly UEFI32(6)", snponly32.efi
- pxe-service=tag:load,7, "iPXE snponly UEFI(7)", snponly.efi
- pxe-service=tag:load,9, "iPXE snponly UEFI(9)", snponly.efi
- pxe-service=tag:load,06, "iPXE UEFI32(06)", ipxe32.efi
- pxe-service=tag:load,07, "iPXE UEFI(07)", ipxe.efi
- pxe-service=tag:load,09, "iPXE UEFI(09)", ipxe.efi
- dhcp-boot=tag:iPXE,ipxemenu.txt
复制代码
bios加菜单很简单
uefi加菜单方法:
比如添加grub2的64位efi,如下多加个0
pxe-service=tag:load,007, "GRUB2 UEFI(007)", grub2.efi
pxe-service=tag:load,009, "GRUB2 UEFI(009)", grub2.efi |