2

I installed Lubuntu on a flash drive as you would an HD (not live/squashfs). But whenever I boot it I get a grub rescue prompt.

It says it can't find /boot/grub/i386-pc/normal.mod which explains the rescue prompt. However, it's installed for x86_64. The folder for that arch is there with all the modules. When I did grub-install I targeted it to x86_64. When I try to explicitly insmod it it says wrong arch elf magic. So it is definitely looking for i386 and in the right place, but why and how do I fix it?

My question is different than the suggested duplicates because there is no Windows installation on the flash drive, which must be machine-independent. Also, the solutions provided in either do not help - even boot-repair doesn't fix it.

1 Answers1

2

I found the solution. It was booting in Legacy mode because it failed to boot in UEFI. The EFI partition contained EFI/Boot and EFI/ubuntu. It was looking for two files, grubx64.efi and MokManager.efi, in /EFI/Boot, but they were in ubuntu, so I did cp EFI/ubuntu/*.efi EFI/Boot and that fixed it! To clarify, the root problem was that the installer put the boot files in a location that is only suitable for fixed drives, and the solution was to cp -r the files to the correct location.