pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.41k stars 83 forks source link

Installing grub installs bad grubx64.efi file preventing loading grub menu edit Pop os 20.04 #1007

Open foxtrotdragon opened 4 years ago

foxtrotdragon commented 4 years ago

As stated, The grubx64.efi refuses to read grub.cfg in same directory can manually load it, I tried various methods of installing, all failed

You can fix the issue by overwriting the default efi from /boot/grub, this allows to boot fine

cp /boot/grub/x86_64-efi/grub.efi /boot/efi/EFI/pop/grubx64.efi

SamDM commented 3 years ago

I believe I had the same problem.

It seems like grub is hard-coded to read the configuration in /EFI/ubuntu/grub.cfg, but by default grub-install will put the configuration in /EFI/pop/grub.cfg. Therefore, the latter is ignored.

So this is what happens on my system:

  1. UEFI boot manager loads up /EFI/pop/grubx64.efi
  2. grub tries to read /EFI/ubuntu/grub.cfg which doesn't exist
  3. grub panics and displays the command prompt.

An overly detailed SO question is here: https://unix.stackexchange.com/q/615109/141189

SamDM commented 3 years ago

Digging deeper into the workaround of @foxtrotdragon, a SO user (telcoM) posted this suggestion, it may be helpful:

If copying /boot/grub/x86_64-efi/grub.efi to /boot/efi/EFI/pop/grubx64.efi helps, it might be that the actual GRUB package of Pop!OS is now fixed, but the fix may have not been propagated to the grub-efi-amd64-signed package (which provides another copy of grubx64.efi that's been signed for Secure Boot).

rsescu commented 3 years ago

Ran into same issue, SO post helped a lot! For me this was enough: sudo cp /boot/efi/EFI/pop/grub.cfg /boot/efi/EFI/ubuntu/grub.cfg

AustinStarnes commented 4 months ago

I'm here in 2024 and @rsescu's solution has worked for me. I've been struggling with this for ages ever since I decided to repartition my drive (and redo the EFI partition, "oh, it'll be easy to set up", damn that was rough) Thanks to everyone here for giving me a workaround.

Edit: it's worth noting that I have this exact issue on Pop! OS 22.04 LTS, rather than 20.04, as the title specifies.