Is it possible to use EFI booting?
EFI boot
(6 posts) (1 voice)-
Posted 1 year ago #
-
I was able to get the SliTaz ISO to boot so at this point this is a matter of intellectual curiosity. I flashed the ISO to a flash drive using Balena Etcher. Despite having a EFI folder the firmware does not see this drive as EFI bootable. However, in CSM mode it is legacy bootable. But, how? There is no syslinux on the drive. I see that both the MBR and VBR are made for SliTaz. I surmise they contain a custom boot loader that loads bootia32.efi which despite its name is not the GRUB boot loader but the Linux kernel - quite unconventional.
Posted 1 year ago # -
Sorry, I forgot to say what I am asking which is "Is my supposition correct?".
Posted 1 year ago # -
After many hours of research and experimenting I have learned:
1. isolinux.bin does exists on the flash drive. When Balena Etcher writes an ISO to a flash drive, not everything it writes is contained in valid Linux filesystem. In particular, isolinux.bin is not contained in a valid Linux filesystem but it was written to the disk. It cannot be seen by Linux but the MBR/VBR boot loader can find it because it knows the physical location of the first sector of isolinux.bin. So, isolinux.bin is loading SliTaz.
2. /EFI/boot/bootia32.efi still confuses me. /EFI/boot/bootia32.efi is the same as /boot/vmlinuz-3.16.55-slitaz - the Linux kernel. I don't understand how this works. Doesn't bootia32.efi have to be in PE32+ format? Isn't the format of the linux kernel different? The UEFI firmware on my machine does not see this as a UEFI bootable drive so I cannot test this. Is it really possible for the UEFI firmware to directly load the Linux kernel?
Posted 1 year ago # -
I create a FAT32 partition flagged as boot,efi and populated with the SliTaz EFI folder with the /EFI/boot/bootia32.efi binary. My UEFI firmware does not see this as a bootable drive. I replaced this with a known working EFI folder and my UEFI firmware sees this same physical drive as bootable. I think the firmware does not see the drive as bootable because it cannot find a PE32+ format .efi file. I have now spent many hours trying to understand what SliTaz's /EFI/boot/bootia32.efi is all about - please enlighten me.
Posted 1 year ago # -
After more research I learned that a Linux kernel built with the CONFIG_EFI_STUB flag will look like it is in PE format and the UEFI firmware can directly load this kernel without using a boot loader (e.g. GRUB). Using xxd I examined bootia32.efi. At offset x3c is the offset 0x82. At the offset 0x82 are the 4 bytes - 'P', 'E', 0x0, 0x0 which should be the signature for a PE format file. However, my UEFI firmware says that this flash drive is not UEFI bootable. But, if on this same drive I install another EFI folder the firmware says the drive is UEFI bootable so the problem is not with the drive. Why is it that my UEFI firmware cannot boot from this SliTaz EFI folder?
Posted 1 year ago #
Reply
You must log in to post.