How to remove a particular option from grub boot loader

I got update of linux zen 5.12.3.zen1-1 after updating to it grub loader is showing two options for same garuda linux, another garuda linux is added on grub and named it like this -- Garuda linux (on dev/sda2)
and booting from this option boots normally as usual then why this another option is added
i want to remove this another added option because both are same

apart from this topic

grub loader is showing windows boot loader also ( i have not dual booted garuda with windows)
i want to remove windows boot loader option form grub how can i remove it?

I just updated to the same kernel and had no problems with grub afterwards, so this should be due to your specific configuration.
The second problem is even stranger!
Let me try to guess: you use or used in the past grub-customizer?

3 Likes

I have not just updated kernel but there are other things also that I got update of , kernel was one of those update maybe other things in update have configured grub loader

I was previously using Windows 10 but now I am using garuda Linux (not dual booted with windows) I think some of windows files are still there that's why grub is showing windows boot manager ( I am seeing this windows boot manager option when I installed garuda no connection with this update)
I want to delete windows boot manager remove it from grub how can I?

I think one thing you could do to avoid the os-prober to "find" Windows is the following:

sudo su -
cd /boot/efi/EFI

you should still have a "Microsoft" folder there, if so delete it with:
rm -r Microsoft
Then try to update the grub: hopefully at least the Windows problem should disappear...

4 Likes

For the “duplication” problem, I don’t know.
The reference for you to “study” is:
https://wiki.archlinux.org/title/GRUB
As you’ll see and probably know, /boot/grub/grub.cfg is generated automatically by a variety of options in /etc/default/grub and scripts in /etc/grub.d/.
You could easily solve the problem correcting /boot/grub/grub.cfg, but problably the issue will re-appear next time you update the grub.
Checking options in /etc/default/grub and scripts in /etc/grub.d/ could be quite complex, but you can try.
Maybe (but I’m really guessing here) you could chroot from an live USB (to start from a clean status, I don’t know), reinstall the bootloader and upgrade grub according to:

3 Likes

For the "Garuda Linux on /dev/..." I've had this too, particularly after restoring from a snapshot and performing a further update. Besides the cosmetic itch it's nothing to worry about. For the Windows thing, it sounds like the efi partition was just not formatted during installations, so deleting the Windows folder as @filo suggests sounds like a good starting point.

6 Likes

No windows is not there I have checked in bios
In bios windows boot manager is showing on my other disk but there windows is not there

I also tried to remove it from boot entry using these commands

sudo efibootmgr
sudo efibootmgr -b 8 -B

But ufei regenerate this entry again that I have just deleted

BIOS (UEFI) sees what efibootmgr sees basically.
Edit: UEFI reinstalls an entry if /EFI/Microsoft folder is not deleted from the efi(ESP) partition ony our drive (see my next post)
Have you tried:

sudo su -
cd /boot/efi/EFI

you should still have a "Microsoft" folder there, if so delete it with:
rm -r Microsoft
Then update the grub
?

2 Likes
man efibootmgr
-b | --bootnum XXXX
              Modify BootXXXX (hex)

Try 0008, not 8

efibootmgr 
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0002,0003,0005,0006,0009
Boot0000* garuda
Boot0001* UEFI OS
Boot0002* CD/DVD Drive 
Boot0003* Hard Drive 
Boot0005* UEFI OS
Boot0006* UEFI OS
Boot0009* UEFI OS
1 Like

If you don't delete /boot/efi/EFI/Microsoft, even after proper efibootmgr deletion, the entry will be recreated next time.

2 Likes

Post info, not descriptions, please.

ls -l "/boot/"*
ls -l "/boot/efi/"*
efibootmgr -v
sudo sed -n '/initrd\|vmlinuz\|menuentry/p ' "/boot/grub/grub.cfg"
2 Likes

Issue solved
I have two drives installed on my pc i found windows efi on my second drive partiton
using these commands i deleted efi partition

fdisk -l 
fdisk /dev/sdb
d
6 

then i updated grub

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.