Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 11471  / 1 Year ago, fri, february 17, 2023, 9:00:52

grub-install fails to reinstall grub with:


Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.

I noticed while performing an upgrade which tries to upgrade the package grub-efi-amd64-signed. This gives a more informative error message:


Installing grub to /boot/efi.
Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.
mount: /var/lib/grub/esp: mount point does not exist.

The system is trying to find the EFI partition on /var/lib/grub/esp


This is strange since my fstab looks correct,


/dev/sda7 has the boot flag and /dev/sda2 has the esp flag. I don't know why grub-install goes to /var/lib to try to find the efi partition. The error still persists even if I explicitly pass the directories to grub-install.


grub-install --efi-directory=/boot/efi/ --boot-directory=/boot/


Yes, I tried running boot repair. Got the following out: https://paste.ubuntu.com/p/THG9p4YQgQ/


More From » boot

 Answers
2

After turning off Fast Boot UEFI settings, the grub-install problem vanished. I also turned off Fast Boot from withing Windows itself as advised by @oldfred. grub-install works. However, when I upgrade the grub-efi-amd64-signed package, I still get the same /var/lib/grub/esp error:


Setting up grub-efi-amd64-signed (1.142.9+2.04-1ubuntu26.7) ...
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Installation finished. No error reported.
mount: /var/lib/grub/esp: mount point does not exist.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32
Errors were encountered while processing:
grub-efi-amd64-signed

After that, purging grub and reinstalling grub by running the following commands solved the grub-efi-amd64-signed installation issue.


sudo apt-get purge grub*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub

[#2291] Sunday, February 19, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
olltea

Total Points: 238
Total Questions: 115
Total Answers: 107

Location: Moldova
Member since Tue, Feb 7, 2023
1 Year ago
olltea questions
Thu, Feb 16, 23, 21:03, 1 Year ago
Sun, Jul 31, 22, 11:21, 2 Years ago
Sat, Jan 15, 22, 03:57, 2 Years ago
Tue, Apr 4, 23, 19:14, 1 Year ago
;