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.

8
  • Please repair/re-install Grub! Boot-Repair might work for installations on external drives, but if it fails, use the manual method. Dec 29 '15 at 15:48
  • I have already reinstalled using grub-install /dev/sdb --root-directory /mnt where the Lubuntu partition is /dev/sdb1 mounted on /mnt Dec 29 '15 at 16:48
  • @Eric Carvalho I will try boot repair but none of the other solutions worked for me. Dec 29 '15 at 16:54
  • 4
    Is your system UEFI. Error is typical of installing in one mode UEFI or BIOS, but trying to boot in other mode. There are two grub2s. grub-pc (BIOS) and grub-efi-amd64(UEFI). And how you install, is then how you must set UEFI/BIOS to boot.
    – oldfred
    Dec 29 '15 at 16:58
  • 1
    Possible duplicate of error: file '/grub/i386-pc/normal.mod' not found
    – Rod Smith
    Jan 5 '16 at 16:32
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.

6
  • 1
    That's the correct observation UEFI booting from external media is only supported from \EFI\Boot, I wrote about it here: askubuntu.com/q/559007/40581
    – LiveWireBT
    Dec 31 '15 at 21:56
  • Question: Why does Ubuntu install it to EFI/ubuntu if it doesn't always work and in what cases does it work? Jan 2 '16 at 5:50
  • 1
    As far as I understand the UEFI spec, which I recommend to look up yourself, the way Ubuntu does it is considered expected behavior from a UEFI computer: boot the first bootloader entry in the boot catalog. \EFI\Boot was initially only for removable media, but was later added for internal drives as a fallback if the catalog has no valid entries. Example: Asus motherboard firmware updates deleted the entire catalog. You can find these issues where manufacturers weren't considerate enough about users wanting to install something else than Windows. I filed a bug, but it didn't get much attention.
    – LiveWireBT
    Jan 3 '16 at 19:11
  • Alright. Why is it that that doesn't work for removable drives? Jan 3 '16 at 20:38
  • 1
    The boot catalog is stored in the platform (on the mainboard) and each operating system is responsible for registering it's bootloader in the catalog (basically telling the firmware where the file is and a corresponding name to display , this is done on Linux with efibootmgr). In case of removable media, if you use the storage device on another computer this information is not available and would not make much sense (you could still add it though).
    – LiveWireBT
    Jan 3 '16 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.