I've been trying to add UEFI support in the 64-bit version of Minimal Linux Live for quite some time, unfortunately without much success. As you can see from the below image, I get critical error each time I try to boot via UEFI.
This is what I did in order to get to this point:
- I downloaded syslinux-6.0.3.
- I followed the instructions here and copied
- I also copied
- I created virtual machine in VirtualBox (version 5.0.20) and enabled UEFI.
- I generated new ISO image (all ISOLINUX configuration files are in the root folder, see the screenshot) and put it as primary bootable media in the virtual machine.
- After boot I immediately got the error which you see on the screenshot.
- At this point I had to rename
\EFI\BOOT\BOOTX641.EFIin order to "break" the boot process and fall back to UEFI shell.
- In the UEFI shell I used the command
editand then I navigated to the
- I manually invoked
BOOTX641.EFIand I ended up with the same error which you can see.
So, I can conclude that my EFI stub is getting executed but something breaks during the execution process and at this point I don't know what's wrong.
I checked the ISO image structure of System Rescue CD which I know that supports UEFI and I noticed the following:
- The EFI structure contains only one file:
- The size of
\efi\boot\bootx64.efiis 724KB while the corresponding file in Syslinux 6.03
efi64/efi/syslinux.efiis ~200KB so this is definitely not the same file.
- When I copied
\efi\boot\bootx64.efifrom "System Rescue CD" and used it in the EFI structure in "Minimal Linux Live" the UEFI boot process was fine to the point where I was presented with GRUB 2 shell.
That's how I found out that the file
\efi\boot\bootx64.efi in "System Rescue CD" has built-in GRUB 2 support, therefore it must be a custom built solution.
So, the problem in just few words - I'm using vanilla Syslinux package and I'd like to create UEFI compatible configuration which boots a simple ISO image. Following the official instructions doesn't seem to work for me.
All suggestions are highly appreciated! Thank you!
Note 1: The ISO image boots fine in BIOS mode. There is no problem there.
Note 2: Most probably this is not a bug in VirtualBox because other operating systems (e.g. Ubuntu and Linux Mint) boot just fine in UEFI mode.
EDIT 1 - (Jan-2017):
It has been very long time without answer, so I implemented my solution in quite different way:
- I don't use
Syslinuxin UEFI boot mode.
- I compiled my Linux kernel with EFI stub.
- I created simple
startup.nshscript which is executed automatically after UEFI boot.
- The same script loads the kernel and the initramfs.
In this way I lose some of the boot functionality, e.g.
vga=ask which works fine in
Syslinux but it doesn't work in UEFI mode since this particular boot option requires proper Linux boot loader.
Even though I have solution which works fine, the question is still open.
EDIT 2 - (Dec-2017):
This is in addition to the previous update. The solution with
startup.nsh works only if the UEFI system has 'UEFI Shell' (according to the UEFI specs the firmware may or may not provide shell) and only if this shell has support level 1 or above. Also, there is no guarantee that the startup script will be executed, because the proper way to provide ESP in ISO image is via 'El Torito' boot image. Providing ESP compatible structure directly on the ISO image seems to work fine on certain firmwares but it is not universal solution.
The question is still open but meanwhile I managed to integrate systemd-boot and I no longer consider this issue as high priority.