Remove Grub2 - linuxmint entry from BIOS

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
haules_baules

Remove Grub2 - linuxmint entry from BIOS

Post by haules_baules »

I have installed Linux Mint on my new computer. After a while I have removed it, formatted the SSD and put windows on it with the intention of having a dual boot. Now I have only windows installed, but when I go in BIOS I can still see in the list of boot devices the linuxmint entry. I have removed all my hard drives and this entry is still there, so it must be written in BIOS somewhere.

Is there a way to remove it?

I have here a picture with my BIOS boot selection with no hdd attached to the system, no USB, no CD-ROM, nothing
https://www.dropbox.com/s/2x0aipje51n9v ... .48.30.jpg

Thank-you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: Remove Grub2 - linuxmint entry from BIOS

Post by srs5694 »

That's an EFI, not a BIOS. (I know the manufacturers are using the term "BIOS" to apply to their EFIs and I'm spitting in the wind on this one, but it bugs me because this misapplication of terms hinders understanding....) EFIs have built-in boot managers that have something that's (roughly) equivalent to a grub.cfg file stored in NVRAM. These entries can be persistent even when the relevant files have been deleted. You can deal with it as follows:
  1. Boot Linux in EFI mode. This could be a Linux installation disc in its emergency or "live CD" mode, or a Linux emergency system like System Rescue CD. Note, however, the emphasis on booting in EFI mode. If you boot in BIOS mode (aka CSM mode or legacy mode), the following steps won't work. If you plan to re-install Linux, you could wait until after you do so and use your new installation -- but it's possible that the problem will disappear in that case, or you might end up with two "linuxmint" entries and have to delete just one of them.
  2. Type "sudo modprobe efivars". In some environments you can omit "sudo", and some systems might not need this step, but it won't do any harm.
  3. Check for the presence of a directory called /sys/firmware/efi. If it's not present, you've either booted in BIOS mode or there's some other problem that will prevent the following steps from working, so you should reboot and check your boot options to get up and running in EFI mode.
  4. If you're using a distribution's live CD, you may need to install the "efibootmgr" package, as in "sudo apt-get install efibootmgr".
  5. Type "sudo efibootmgr -v". This should produce a listing of the boot loaders registered with the EFI. Look for the string "linuxmint"; it should be on a line that includes a reference to a filename in the \EFI\linuxmint directory. Note the boot number at the start of the line.
  6. Type "sudo efibootmgr -b {#} -B", where "{x}" is the hexadecimal boot number you've just identified. For instance, if the line referring to Mint began "Boot0005", you'd type "sudo efibootmgr -b 0005 -B".
  7. Do a clean shutdown and reboot.
The stray entry should now be gone. If it's not gone, there are other ways to accomplish the task. Some EFIs include a built-in user interface that enables removing such entries, and some will remove such entries if they notice that the relevant boot loader files have been deleted. It's also possible to use the "bcfg" command in an EFI version 2 shell to do the job; see this Arch Linux wiki entry for information on the EFI shell and bcfg.
haules_baules

Re: Remove Grub2 - linuxmint entry from BIOS

Post by haules_baules »

You are a legend. Thanks a lot!
Strandreiter

Re: Remove Grub2 - linuxmint entry from BIOS

Post by Strandreiter »

still working perfectly
Locked

Return to “Installation & Boot”