Description:
I have already wrote about how I choose different operating systems during server start-up, the solution is straight forward - DHCP server with TFTP (I use Dnsmasq) that switches Syslinux boot configurations (there are some tricks for Windows booting, but it works).
Recently I realized that I have to boot-up my second device (in addition to the server) in the same way, but there is a little difference - the device heavily depeneds on UEFI. I thought that I just need to put some additional Syslinux configurations and there we go. I was wrong. There is no way to chain UEFI boot with Syslinux (at least 6.04_pre1). It means you cannot boot other UEFI bootloaders with Syslinux. But GRUB is capable to do that for you :)
Dnsmasq:
enable-tftp
tftp-root=/var/lib/tftpboot
# filename for initial booting.
# server: /var/lib/tftpboot/00-25-90-61-3d-04/bootloader -> pxelinux.0
# device: /var/lib/tftpboot/b8-85-84-9e-e0-ce/bootloader -> core.efi
dhcp-boot=bootloader
# use separate directories for clients based on MAC addresses.
tftp-unique-root=mac
Syslinux configurations for the server:
cat /var/lib/tftpboot/00-25-90-61-3d-04/pxelinux.cfg/default
ui menu.c32
menu title multiboot
timeout 30
default w7
label beast
menu label beast
com32 chain.c32
append hd0 8
label openstack
menu label openstack
com32 chain.c32
append hd0 6
label w2016
menu label w2016
com32 chain.c32
append hd0
label w7
menu label w7
com32 linux.c32
append wimboot rawbcd initrdfile=boot/bootmgr.exe,boot/BCD
GRUB configurations for the device:
cat /var/lib/tftpboot/b8-85-84-9e-e0-ce/boot/grub/grub.cfg
insmod part_gpt
insmod fat
set default="1"
set timeout=3
menuentry "devbox" {
configfile (hd1,gpt1)/grub/grub.cfg
}
menuentry "winbox" {
set root="hd0,gpt2"
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}