3

I am trying to convert an existing custom USB ISO installer image that presently boots via BIOS to one that boots via UEFI. I use mkisofs and isohybrid to make the ISO, and it boots via ISOLINUX. I know I'm supposed to use the -eltorito-alt-boot -eltorito-platform 0xEF -eltorito-boot isolinux/efiboot.img options to enable UEFI boot, but for the life of me I can't find any page on Google that tells me where to get the elusive efiboot.img source file. Everyone mentions it but everyone assumes you have it already. How is this built or obtained? The man page for mkisofs is of no help. Do I have to use xorriso?

FYI I am trying to boot this via libvirt/kvm/qemu/virt-manager though eventually it has to boot on real hardware. Development environment is openSUSE Leap 42.1. There is no need to support BIOS or multiple platforms. I'd rather not tinker with too much existing build code but at least one comment (@mikeserv) suggested that an ISO is completely the wrong mechanism for this (meaning it's a gross hack and totally unnecessary). But that would involve completely revamping the build which would be a lot of time.

Links to tutorials or other well-written pages on this topic will be gratefully received. I've already looked at the Syslinux website and Rod Smith's page and totally exhausted myself looking at everything else.

  • Since you have the option -eltorito-platform you could use the parameter efi for it. But more important: this verifies that you use a recent version of mkisofs that supports to include EFI support. Since this option has been added on request from Oracle, you would need to find out which boot image your OS platform supplies for making a EFI bootable CD/DVD. – schily Jul 9 '18 at 11:47
4

Do I have to use xorriso?

Not necessarily. You need an ISO producer which can mark the EFI System Partition as El Torito boot image. mkisofs will probably do with the options you mentioned. isohybrid --uefi may be applied afterwards to make it bootable from hard-disk-like devices. (It might be necessary to have a ISOLINUX BIOS boot image, too, so that isohybrid works.)

The main problem is that you need an EFI System Partition file, which has to be a FAT filesystem image with the necessary programs to bring up the operating system files, which are either in the FAT image or in the enclosing ISO 9660 filesystem.

SYSLINUX EFI software does not boot from optical media. So most of the projects use GRUB 2 (not GRUB legacy) for that purpose and combine it with ISOLINUX BIOS software. Debian netinst amd64 ISO for example has a small FAT image with just enough GRUB brain to hop onto the GRUB configuration in the ISO. The one in the openSUSE NET-x86_64 ISO is bigger.

To inspect Debian's EFI equipment, mount it as ISO, and then mount its file /boot/grub/efi.img as FAT. Inside you find a file /efi/boot/bootx64.efi which inspected by program strings reveils that it contains an embedded GRUB configuration

search --file --set=root /.disk/info
set prefix=($root)/boot/grub
source $prefix/x86_64-efi/grub.cfg
(memdisk)/boot/grub

I understand that the FAT image file was created by GRUB program mkimage. The file /.disk/info is considered to exist only in the Debian ISO, so that search can use it to find the ISO filesystem.

In the SuSE ISO, the FAT image is named /boot/x86_64/efi. It contains more stuff than the Debian one. Besides the EFI boot file bootx64.efi there is a grub.cfg and other files beyond my GRUB knowledge.

If you start bootable ISO development from scratch, then consider to produce your ISO by GRUB program grub-mkrescue. (That's when you really need xorriso, of which i am the developer.)

On Debian one would have to install packages grub-pc, grub-efi-ia32-bin, for BIOS, and grub-efi-amd64-bin for x86_64 EFI. Prepare your payload in a directory tree and run

grub-mkrescue -o output.iso my_prepared_dir

I assume SuSE offers similar GRUB packages as Debian, which configure for the grub-mkrescue run to produce BIOS and/or EFI equipment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.