0

After installing Windows 10 on a new hard drive, Ubuntu 18.04 will no longer boot.

The computer boots to Grub 2.02, but to a version I'm not familiar with, showing the EFI images.

GRUB boot menu

Choosing the different options results in the following:

  • "EFI/ubuntu/fwupx64.efi" returns me to the menu, with no message
  • "EFI/ubuntu/mmx64.efi" shows Shim UEFI key management screen
  • All "efi/Efi//.efi" options result in a file not found error
  • The Windows options boot to Windows correctly

I've tried Boot-Repair a couple of times with no luck. The last report from Boot-Repair can be found here.

Is there any way to completely reinstall the EFI setup?

Update: Running grub-mkconfig produces the same incorrect menu entries. The config is generated using the files in /etc/grub.d. My directory only contained /etc/grub.d/25_custom, which is the only file in that directory. It looks like my /etc/grub.d templates are hosed, and I need to find a way to regenerate them. Is there a command to rebuild these templates?

  • @karel I've tried both the accepted answer from Scott, and subtleseeker's suggested fix - neither of which have changed the situation. – Adam Moore Aug 27 at 13:27
  • After trying the suggestion to apt purge -y grub*-common grub-pc, that the /boot/grub/grub.cfg remains intact. Is this a clue to the issue? – Adam Moore Aug 27 at 13:42
  • /boot/grub/grub.cfg is automatically generated by grub-mkconfig using templates from /etc/grub.d and settings from /etc/default/grub. – karel Aug 27 at 13:45
  • @karel Running grub-mkconfig produces the same incorrect menu entries. They are loaded from /etc/grub.d/25_custom, which is the only file in that directory. It looks like my /etc/grub.d templates are hosed and I need to find a way to regenerate them. – Adam Moore Aug 28 at 10:22
1

Assuming that Windows was installed after Ubuntu, boot in Windows and open cmd prompt in admin mode. Run this cmd line:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

The computer should boot into Ubuntu directly. Open the terminal and update Grub:

sudo update-grub

If you see Win Boot Manager, you'll be set to go. The actual Grub menu (screenshot) is the result of Grub repair and there is no need of using it, since the problem is on the Windows side.

  • This had no effect. – Adam Moore Aug 28 at 9:01
1

As pointed out by @karels comment, the grub config is generated using the files in /etc/grub.d. My directory only contained /etc/grub.d/25_custom, which contained the strange menu entries shown in the screenshot. It looks like my /etc/grub.d templates were maybe hosed by boot-repair.

I fixed this by:

  1. Boot with Live CD (probably important to use same Ubuntu version)
  2. sudo mount /dev/sdxx /mnt
  3. sudo cp /etc/grub.d/* /mnt/etc/grub.d/
  4. sudo update-grub
  5. Reboot & relax after 48 hours of pain

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