I have a device with an AMD64 CPU but a UEFI bootloader that only supports i386.
I have made a custom Ubuntu 19.04 ISO installer using Cubic and have flashed it to a USB using usb-creator-gtk (Startup Disk Creator).
This creates two partitions on the USB:
The first partition formatted as ISO9660 and holds the ISO contents, the second is a FAT32 partition that contains only the .EFI boot files.
The second partition is what the tablet will boot from. Its contents come from an efi.img file stored inside /boot/grub on the ISO. This originally contained only AMD64 EFI files.:
I have created my own replacement img.efi file and input a bootia32.efi file using these commands:
dd if=/dev/zero of=efi.img bs=1M count=5
mkfs.fat efi.img
sudo mount -o loop,rw efi.img /media/efi
sudo cp -r <files> /media/efi
This successfully makes a bootable USB, however it doesn't load the installer Grub, it only loads a Grub command line.
I've used this bootia32.efi
file to successfully load grub before, if I instead manually format the USB as FAT32, copy over the ISO files and put the custom EFI file inside of /EFI/BOOT then the device will boot into Grub as I would expect.
But I'd like to make an ISO that can be flashed as normal and boot fine.
My question is, what is the point of creating a separate partition to hold the boot EFI files as usb-creator-gtk does? How do I make that partition load the installer's Grub config instead of just the Grub command line?
Thank you