I tried to create a workable persistent Ubuntu pendrive using Rufus and even Ventoy which I never heard of until yesterday. One of the frequent problems I faced was this:
- If I update my live OS packages, it will pollute the guest OS grub where I use Fedora only.
I wonder who you guys deal with such scenarios! Do you guys use “apt mark/hold grub2” command or something like that?
This doesn’t only happen while upgrading the live OS package, it also helps, when I tried to install Ubuntu in pendrive. Grub will push itself in boot loader because of which I had to type
exit after each normal boot to shift from “ubuntu’s grub menu” to “fedora invisible grub menu”. (Invisible because we don’t really see Fedora grub menu these days, which is cool since it saves time.)
So I googled some sort of tool/command to clean up my grub menu.
I went to this directory
/boot/efi/EFI where I saw “ubuntu” directory. I used
sudo rm -rf to delete it.
/boot/efi/EFI/boot directory, I see these files:
I wonder which one Fedora uses! Please do let me know. I think 1 and 2 are used by Windows, I wonder how it got there. Can I just delete it?!
And last but not least, the efibootmgr command, which is very simple and yet important:
⟹ efibootmgr -v BootCurrent: 0002 Timeout: 0 seconds BootOrder: 0002,0003,0001,2001,2002,2003 Boot0001* Fedora HD(1,GPT,5073d7c8-a7f0-40c1-85df-479f8626cbdf,0x800,0x12c000)/File(\EFI\fedora\shim.efi)RC Boot0002* ubuntu HD(1,GPT,5073d7c8-a7f0-40c1-85df-479f8626cbdf,0x800,0x12c000)/File(\EFI\ubuntu\shimx64.efi) Boot0003* Fedora HD(1,GPT,5073d7c8-a7f0-40c1-85df-479f8626cbdf,0x800,0x12c000)/File(\EFI\fedora\shimx64.efi) Boot2001* EFI USB Device RC Boot2002* EFI DVD/CDROM RC Boot2003* EFI Network RC
sudo efibootmgr -b Boot0002 --delete-bootnum to delete Ubuntu.
I’m curious about my WHY efibootmgr command shows 2 fedora files?! The only difference I see is
shim64.efi at the last of their name. Does Fedora use 32 bit to load OS? Isn’t Shim64.efi more faster than Shim.efi? Do we really need both of them? Unlike ubuntu which apparently only needed Shim64.efi to work? EL5 on this one.
Thank you in advance. I’m trying to know how things work along with cleaning my boot menu files. Any tips/ideas are appreciated.