Why can't I "cd" into /boot/efi/EFI?

When I do nothing happens, not even sudo cd works. Am I doing something wrong?

I’m using an old dell laptop with unknown specs and newest Fedora 39 update

sudo cd works, but when it is finished running the command, it returns back to your original directory (which makes that command pointless). Maybe sudo ls /boot/efi/EFI or sudo tree /boot is what you want?

2 Likes

When I ls and then rm -rf Microsoft/ nothing happens since i’m technically not inside the EFI folder yet

You should be able to provide a full path to the rm command. For example, sudo rm -rf '/boot/efi/EFI/Microsoft'.

1 Like

Ohhh, that worked. Thx

1 Like

@glb btw, how do I update grub now? The guide says sudo update-grub or update-grub if I am the root user. But I know it works differently in Fedora 39

Are you asking how to update the GRUB program or its configuration? Assuming the later, I think the command would be sudo grub2-mkconfig -o /etc/grub2.cfg. I don’t use the GRUB boot loader though, so I’m not 100% sure.

Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done

Are you sure this is the correct behaviour? I think I did that command earlier after googling and it said the same thing two times in a row

The guide says " Execute the following command to reload the GRUB configurations, which internally utilizes the os-prober command to detect operating systems:"

Sorry, I’m not sure. I don’t have GRUB installed, so I cannot test it on my PC. What is the problem that you are trying to solve? Is something incorrect about your boot loader configuration?

I’m trying to completely remove Windows after I had a dual boot with it before, now i’m following this guide

I think it ought to work. You can use the command sudo less /boot/grub2/grub.cfg to view your GRUB configuration (press the Q key to quit when you are done). Unfortunately, that file is quite complex, but the gist of it is that there is one “menuentry” section per boot menu item (the sections begin and end with curly brackets { and }). If the section containing Windows is no longer present in that configuration file, then it shouldn’t show up on your boot menu.

It is automatically generated by grub2-mkconfig using templates
from /etc/grub.d and settings from /etc/default/grub

Doesn’t this mean it’s just better to sudo nano? Won’t these settings reset after an update or something? When I restart the pc now it’s atleast gone, so mission successful?

You can use sudo nano instead of sudo less to view the GRUB configuration file. You wouldn’t want to edit that file with nano though because a) it is a complex file and if you get anything wrong it could leave your system unbootable and b) your changes would likely be overwritten the next time you update your system. I suggested using the less command instead of nano just as a “safe” way of viewing the file (the less command is not capable of changing or overwriting the file).

You can use nano to edit /etc/default/grub, but you should use the grub2-mkconfig command to propagate those changes to the final /boot/grub2/grub.cfg file.

It sounds like you succeeded to me. :slightly_smiling_face:

1 Like

Ah, ok. Thx again :slight_smile:

2 Likes

Afaik these are the things Windows could have left behind:

  • various partitions (like the “C:” drive, recovery, Microsoft reserved)
  • some files on the EFI system partition
  • UEFI boot entries
  • anything on Fedora that was aware of the other OS (like GRUB, partition auto-mounting)

If you already got rid of these, then I don’t think you have anything to worry about. If not, it will still likely work without an issue.

Would you say this guide goes over all of that?

It seems rather comprehensive. The only thing I’m not sure about are the UEFI boot entries (maybe that os-prober command takes care of it). If you want to make sure, you can run efibootmgr | less -S and see whether the Windows boot manager appears there.

BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0000,0003,0004,0002
Boot0000 Windows Boot Manager HD(1,GPT,978452fd-8825-4a1a-af66-ed0e7c14ea5c,0x800,0xf9800)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0001* Fedora HD(1,GPT,978452fd-8825-4a1a-af66-ed0e7c14ea5c,0x800,0xf9800)/\EFI\fedora\shimx64.efi
Boot0002* Linux Firmware Updater HD(1,GPT,978452fd-8825-4a1a-af66-ed0e7c14ea5c,0x800,0xf9800)/\EFI\fedora\fwupdx64.efi
Boot0003* Onboard NIC(IPV4)
Boot0004* Onboard NIC(IPV6)
Boot000C* Onboard NIC(IPV6)

I think sudo efibootmgr -b 0000 -B would work to delete “Windows Boot Manager” from that list. Or you could probably do it from your PC’s BIOS. The BIOS is typically accessed by pressing the F2 key (perhaps a few times repeatedly) when you power on your PC. Either method should achieve exactly the same result.