I am working on an installer image for yocto linux, which seems to mostly work, but for one issue that is preventing me from testing.
When I load the image onto a USB stick, and boot off of the USB stick on my target device (intel-x86-based mini PC), the internal eMMC boots instead. This is true even if I disable all boot devices in the UEFI firmware except for USB. What I believe is happening is that the USB device is loading, but for some reason points to the GRUB-efi installation on the eMMC instead of the one on the USB
The image currently loaded onto the eMMC is very similar to the installer image (it was installed by the .iso installer that can be built with IMAGE_FSTYPES += “iso”), and I am wondering if there is some sort of naming or other reference conflict that might cause the bootloader to be confused about which drive to load GRUB from, but I frankly don’t know enough about UEFI to know where to begin to diagnose the issue.
Notably, both the .iso installer and my custom installer produce this behavior. Additionally, I have had the reverse of this issue in previous testing with the .iso installer, where the USB image boots, installs my image successfully to the eMMC, then reboots to the USB, even if the eMMC is higher priority in the boot list, or if I disable the USB boot device completely in firmware. If it was plugged in during boot, the device would boot to the USB stick. I was able to get around this at the time by unplugging the USB stick, and I could boot normally, test my image etc.
I’ve made several configuration changes between having the issue (in reverse) the first time, not having the issue, and having it the second time, but nothing I can clearly correlate to the boot process, and it is not random; every time I have recently tried to build my installer (including with a clean environment), I get the same USB->eMMC loading behavior.
What could some causes be for this? Where can I even look on my system for clues?