I created a syslinux/isolinux hybrid CD iso to boot either legacy bios or eufi depending on what is needed. The legacy bios part works well and has worked for many years. I am using the newest (6.0.3) version of syslinux. I used a rhel7 efiboot.img I got from a rhel7 bood CD to boot the eufi part, just as a test. I am able to boot this CD iso in a VM with a uefi bios.
This drops me into a grub2 shell, which is expected behaviour since I created no usable grub.cfg yet (just the default one that came with the image file). So at least I am able to boot this CD in uefi mode.
I am trying to chainload the syslinux.efi through the grub2 shell in order to find out whether I can chainload syslinux at all (and how) and then to see whether it can load the menu I use for legacy bios.
I have used various combinations of grub2 commands, but I always end up with this error no matter what I try. Searching for this error does not give mu much useful information
grub> set root='(cd0)'
grub> chainloader /syslinux/efi/syslinux.efi
grub> boot
Failed to locate root device to prep for file operations & ADV initialization
error: unknown error
grub>
I am wondering whether this is a problem with grub2 or the syslinux.efi file, or something completely different.
I don't think it'd be a problem with the efiboot.img I am using, since it comes from a CD that's known to work with uefi.
Note that I think the "chainloader" command sees the file as something grub2 could potentially use to load. If I use a different file, or a non existent file I get the following errors:
grub> chainloader /isolinux/efi/libmenu.c32
error: cannot load image.
grub> chainloader /isolinux/efi/doesnotexist
error: file 'isolinux/efi/doesnotexist' not found.
Edit Aug. 9, 2019
I believe this is actually not possible with the current (6.03) release of syslinux. What I did as a work around is to use a rhel7 boot image and copy the EFI directory and use that as a basis to create a bootable hybdrid CD which boots in uefi mode as well as legacy bios mode. To create a boot menu the EFI/BOOT/grub.cfg file just needs to be adapted to your needs. I think this actually uses gummiboot/systemd-boot. I used the same to configure uefi network booting.
0 Answers