I’ve installed Fedora 40 Workstation after Windows, each on its own drive. Now Fedora shows up twice in my BIOS boot devices. Does Fedora modify the Windows drive in any way?
No, Fedora Linux shouldn’t modify the Windows drive in any way under those circumstances. The list of boot loaders is actually stored in a small piece of flash memory on your PC’s motherboard (alongside the BIOS/firmware). You can use the efibootmgr
tool to inspect and modify those boot entries if you want. Use sudo efibootmgr
to get information about each entry and if the two Fedora entries are exactly the same, then you can just delete one of them. If they are not the same, then you will need to be sure which is the working version before you delete one. I think the command is sudo efibootmgr -B -b <XXXX>
to delete one of the hex-numbered entries.
My guess as to why you have two entries is that you ran the Fedora Linux installation twice; possibly re-installing the OS a second time to the same secondary drive?
Edit: It looks like the efibootmgr tool has gained a bit more functionality since I last looked at it. It looks like there is now a --remove-dups
option that you can pass to efibootmgr to have it automatically detect and remove duplicates. I’d give that a try first.
Thank you very much for the thorough response. I’ll study and try the command.
However, a spontaneous question arises: it’s true, I installed Fedora and Windows after thoroughly cleaning both hard drives. So why is there still a trace of the previous installation?
Thoroughly cleaning the hard drives does not erase the EFI firmware variables. They are not stored on the hard drives. They are stored on the motherboard.
The two entries differs only in the filename: shim.efiRC and shimx64.efi!
That difference matters. I think one of those might be a 32-bit version of the boot loader whereas the other is the 64-bit version. You probably only need the 64-bit version. But if you decide to delete one of them, make sure you don’t delete one that you need. You might be able to (should be able to) manage the entries from your PC’s BIOS menu. I’m not sure if that would make it any easier to determine which is which. Oh, actually, I think the bootctl
command might also tell you which entry was actually used to boot the currently-running system. Try that.
Edit: It looks like you need to use Scratch that. bootctl list
to see which boot entry was actually used. It should be the one marked (selected)
.bootctl list
just shows the boot menu items, not the list of boot entries in the firmware. Which file was used to boot the system is listed at the end of the first section (
“Current Boot Loader”) in the output of the bootctl
command.
shim.efi
and shimx64.efi
are identical files. The letters “RC” are some garbage bytes that some version at some time put into the boot loader entry.
In the beginning there were only shim.efi
. Then it appeared that some computers had 32 bit UEFI and it needed a 32 bit version named shimia32.efi
and the 64 bit version was called shimx64.efi
but the original name of shim.efi
was keept in order to not break some old boot loader entry.
I would suggest to keep the shimx64.efi
entry and delete the other.
efibootmgr shows the details of the boot entries, and will tell you exactly which entry is being used to boot. Then you can use efibootmgr to delete the dup that you do not want.
My system shows this
# efibootmgr
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0009,0000
Boot0000* Fedora HD(1,GPT,3e9fc420-a651-4d1e-b8e7-f1fac4970613,0x800,0xa7800)/\EFI\FEDORA\SHIMX64.EFI
Boot0009* Fedora HD(1,GPT,3e9fc420-a651-4d1e-b8e7-f1fac4970613,0x800,0xa7800)/\EFI\FEDORA\SHIM.EFI0000424f
Notice that the current boot is entry Boot0009.
If I chose to delete the extra entry Boot0000 I would use the command
sudo efibootmgr -b 0000 -B
and that entry would be removed
Note that there are several things that can be done with efibootmgr as already noted. To see what is possible use man efibootmgr
for the man page that explains that command.
The -n XXXX
option allows you to specify the entry to use for the next boot without changing the boot order and can be used to test if that entry is valid. This can be useful to verify an entry before deleting it.
In my case both entries boot perfectly well.