I’ve been trying to clean up my efi boot images using efibootmgr…
" $ sudo efibootmgr
[sudo] password for user:
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0002,0004,0005,0006
Boot0002* endeavouros
Boot0003* Debian
Boot0004 Windows Boot Manager
Boot0005 ubuntu
Boot0006 Fedora
"
Boot images 004,005 and 006 are no longer needed, used “sudo efibootmgr -b x -B” to remove them, then ran “sudo grub-mkconfig -o /boot/grub/grub.cfg”. and shutdown. Reset the BIOS, hoping that might erase the unwanted efi boot entries, it didn’t. I’ve run through the efibootmgr procedure in both endeverous and debian, each time shutting down, and reseting the BIOS.
I see a lot of google links describing the success of this procedure, however I must be overlooking something. Any ‘nudge’ in the right direction would be much appreciated.
Just to make sure, do you run for example: sudo efibootmgr -b 0004 -B
?
Second thing you should do is to remove respective boot folders from /boot/efi/EFI/
example: sudo rm -rf /boot/efi/EFI/Microsoft
Third reboot
Fourth, after rebooting, sudo grub-mkconfig -o /boot/grub/grub.cfg
EDIT: What you do now is you remove boot entries using efibootmgr
and just after that you add them by running grub-mkconfig
, kinda endless loop
su
efibootmgr -b 0006 -B
for deleting Fedora for example
sudo rm -rf /boot/efi/EFI/Microsoft
Well that took care of the Microsoft entry in the BIOS, although grub still shows it, although that’s a different issue.
Only remaining entries is the Fedora and Ubuntu, I wonder if I could do an “rm -f” operation for those two, I’m not sure where they reside or if that could endanger my Endeavouros and Debian efi boots…?
Because this is kinda iterative process first you need to remove respective UEFI boot records, then boot folders and at the end, regenerate grub config to show only desired entries.
You need to remove all folders and UEFI entries representing OSes tht you don’t need anymore. efibootmgr
will help you to identify their path.
For example:
[dzyndzla@LENOVO-T470S-E ~]$ sudo efibootmgr
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0000,0010,0011,0012,0013,0017,0018,0019,001A,001B,001C,001D,001E
Boot0000* Windows Boot Manager HD(1,GPT,c1056429-af42-4d35-8289-774bdf621e63,0x800,0x100000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000050100000010000000040000007fff0400
This is windows entry, it points at \EFI\Microsoft
in \boot\efi
folder. Assuming that I don’t need Windows anymore, I need to:
sudo efibootmgr -b 0000 -B
sudo rm -rf /boot/efi/EFI/Microsoft
sudo grub-mkconfig -o /boot/grub/grub.cfg
And apply that for every single record I don’t want anymore.
Thanks! I learned something new! I navigated to the /boot/efi directory and saw the boot entries that I wanted to delete, deleted them and ran “grub-mkconfig -o /boot/grub/grub.cfg”
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.