Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1068  / 2 Years ago, sat, april 16, 2022, 5:08:01

I got a computer running Ubuntu 12.04 64bit with UEFI. Today (2013-09-21) I installed all updates that were available without carefully reading through the list (shame on me), since noone touched the computer for some weeks and the list was more than 100 items long...



I remember from another machine, that one of the updates changes the boot system on UEFI machines in order to always use shim, even if restricted boot is disabled.



Well, problem diagnosis is rather straightforward: Something went wrong with the bootloader update, although no error was given, and the Ubuntu entry went missing from the UEFI boot menu, making the computer try to boot in BIOS mode, of course failing. If I run efibootmgr from a bootable USB it only shows the BIOS boot mode for the HDD...



How do I restore the Ubuntu entry in the UEFI menu to make the machine bootable again?


More From » 12.04

 Answers
7

A simpler solution than the one provided by soulsource is:




  1. Boot with an emergency disc in EFI mode. The Ubuntu installation disc should work for this.

  2. If necessary, install efibootmgr.

  3. Type sudo efibootmgr -c -d /dev/sda -p 1 -l EFIubuntugrubx64.efi -L Ubuntu. Change grubx64.efi to shimx64.efi if you're booting with Secure Boot enabled. Change -d /dev/sda to your boot disk if it's not /dev/sda, and change -p 1 to the number of your EFI System Partition (ESP). (The command I provided assumes the ESP is on /dev/sda1, which seems to be the case based on the information you've provided.)



The Boot Repair tool can also fix the problem, but it will try to do more than simply restore the original GRUB entry. This opens the possibility for it to cause damage by accident, so if you're comfortable with issuing shell commands, I recommend running efibootmgr manually for this task.



It's also possible to do the same thing using the Windows bcdedit command or the EFI shell's bcfg command. The Installing rEFInd Manually section of my rEFInd documentation describes how to use these commands to register rEFInd with the firmware. You should be able to easily adapt these commands for GRUB.


[#29342] Monday, April 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coffekne

Total Points: 114
Total Questions: 122
Total Answers: 126

Location: Mauritania
Member since Sun, Oct 17, 2021
3 Years ago
;