2018-11-02, 15:26
Hello! I'm having some trouble booting to menus with my EFI-clients. I'm new to EFI and can't figure out how to adapt my current setup.
Running on CentOS 7.5 using latest syslinux and iPXE.
I embedded this script and compiled the ipxe.efi:
Relevant config for isc-dhcp-server. I have activated all of the "option space ipxe" options:
The boot.php chains boot2.php to match the MAC-address with mysql and decide to either sanboot, load the default menu or load the menu to restore/capture an image:
boot2.php:
This works perfectly with BIOS-clients, but obviously not with EFI-clients.
I made a test menu as per the wiki:
Trying this makes the VM crash:
This results in error 2e008081:
So i think biggest problem is I can't figure out how to boot to menus for EFI-clients.
This works ok, but results in kernel panic I guess because it does not use the bootx64.efi:
I bet it's something really basic, but I don't know what to do.
Thanks!
Running on CentOS 7.5 using latest syslinux and iPXE.
I embedded this script and compiled the ipxe.efi:
Code:
#!ipxe
dhcp
chain http://10.0.0.3/boot.php
Relevant config for isc-dhcp-server. I have activated all of the "option space ipxe" options:
Code:
#EFI 32 & 64bit
class "UEFI-32-1" {
match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
filename "gpxe/ipexe.efi";
}
class "UEFI-64-1" {
match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
filename "gpxe/ipxe.efi";
}
#BIOS
if not exists ipxe.bus-id {
filename "gpxe/undionly.kpxe";
} else {
filename "http://10.0.0.3/boot.php";
}
The boot.php chains boot2.php to match the MAC-address with mysql and decide to either sanboot, load the default menu or load the menu to restore/capture an image:
PHP Code:
<?php
echo "#!ipxe\n";
echo "chain ".
"http://".$_SERVER["SERVER_NAME"].
dirname( $_SERVER["REQUEST_URI"] ).
"boot2.php?mac=\${net0/mac}\n";
?>
PHP Code:
--snip--
if($restore->num_rows > 0){
echo "#!ipxe\n";
echo "set 209:string http://10.0.0.3/boot/pxelinux.cfg/restore\n";
echo "set 210:string http://10.0.0.3/boot/\n";
echo "chain http://10.0.0.3/boot/pxelinux.0\n";
}
if($sanboot->num_rows == '0' && $restore->num_rows == '0' ){
echo "#!ipxe\n";
echo "set 209:string http://10.0.0.3/boot/pxelinux.cfg/default\n";
echo "set 210:string http://10.0.0.3/boot/\n";
echo "chain http://10.0.0.3/boot/pxelinux.0\n";
}
This works perfectly with BIOS-clients, but obviously not with EFI-clients.
I made a test menu as per the wiki:
Code:
menu
item linux Boot Linux
item shell Enter iPXE shell
item exit Exit to BIOS
choose --default exit --timeout 3000 target && goto ${target}
Trying this makes the VM crash:
PHP Code:
if($sanboot->num_rows == '0' && $restore->num_rows == '0' ){
echo "#!ipxe\n";
echo "set 209:string http://10.0.0.3/boot/pxelinux.cfg/default.efi\n";
echo "set 210:string http://10.0.0.3/boot/\n";
echo "chain http://10.0.0.3/boot/syslinux.efi\n";
}
This results in error 2e008081:
PHP Code:
if($boot->num_rows == '0' && $restore->num_rows == '0' ){
echo "#!ipxe\n";
echo "set 209:string http://10.0.0.3/boot/pxelinux.cfg/default.efi\n";
echo "set 210:string http://10.0.0.3/boot/\n";
echo "chain http://10.0.0.3/boot/ldlinux.c32\n";
}
So i think biggest problem is I can't figure out how to boot to menus for EFI-clients.
This works ok, but results in kernel panic I guess because it does not use the bootx64.efi:
PHP Code:
if($sanboot->num_rows == '0' && $restore->num_rows == '0' ){
echo "#!ipxe\n";
echo "kernel http://10.0.0.3/boot/linux/clonezilla/vmlinuz\n";
echo "initrd http://10.0.0.3/boot/linux/clonezilla/initrd.img boot=live hostname=oneiric config quiet noswap nolocales edd=on nomodeset ocs_live_run='ocs-live-general' ocs_live_extra_param='' keyboard-layouts='SE' ocs_live_batch='no' ocs_lang='' video=uvesafb:mode_option=640x480-16 ip=frommedia fetch=http://10.0.0.3/boot/linux/clonezilla/filesystem.squashfs\n";
echo "boot\n";
}
I bet it's something really basic, but I don't know what to do.
Thanks!