There are two things to care about: bootloaders and grub.
Bootloaders are programs that the EFI delegates in order to load operating systems. GRUB is one of the Linux bootloaders, but you can have plenty of others in your computer; in modern computers they are usually copied into an EFI partition that is small and formatted as FAT32. Windows will have its own bootloader, and what GRUB does is to give control to it. GRUB doesn't know how to load Windows.
Each bootable operating system has its own bootloader. When you configure a Linux bootloader as the first one (let's call it your main Linux installation), if you have configured it to scan for others, it will present you a menu to choose a Linux Kernel (of the many you have installed and preserved in your main installation), and other operating system options.
So, back to your questions:
- Windows 10/11 won't natively help you clean the bootloaders of missing Linux installations. You need to use other tools that may have changed since last time I checked, so better use your search engine of choice. If you want to remove all Linux installations and remain with Windows, what you would do would be to: (i) back up everything because if you make mistakes you'd end up with an empty computer (ii) get into EFI / BIOS, (iii) select as the EFI's first boot option the Windows Bootloader, and reboot your computer. (iv) You shall not see GRUB. Once into Windows, (v) delete Linux partitions to get back your storage space, and then (vi) use some other tool to delete the bootloaders from the EFI.
- If, otherwise, you want to keep only a Linux installation: (i) back up everthing, again (ii) get into EFI/ BIOS and make sure you are booting to the right GRUB by default. You'll know because the title will talk about your main distribution. (iii) make sure you have identified all your partitions from your main Linux installation (iv) Run
efibootmgr
to delete all other bootloaders, including windows (v) delete any unused partitions
efibootmgr
is a program that helps you see all the computers' boot options, which one is the default, their order, and manipulate them (e.g., delete entries).
I won't post the sequence of commands you should use because you must make sure you end up with a sequence of operations to serve your purposes, and this is rather a delicate thing to do. Rather, just check if your system has the tool, and if it finds anything --it will validate the process as it will tell you that your system has EFI and all the concepts related:
Code:
[l:0, a:0] ~ efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,001A,001B,001C,001D,001E,001F,0020,0021,0011,0023,0022,0028
Boot0000* Fedora
Boot0010 ThinkShield secure wipe
Boot0011* LENOVO CLOUD
Boot0012 Setup
Boot0013 Boot Menu
Boot0014 Diagnostic Splash Screen
Boot0015 Lenovo Diagnostics
Boot0016 Regulatory Information
Boot0017 Startup Interrupt Menu
Boot0018 Rescue and Recovery
Boot0019 MEBx Hot Key
Boot001A* USB CD
Boot001B* USB FDD
Boot001C* NVMe0
Boot001D* NVMe1
Boot001E* ATA HDD0
Boot001F* ATA HDD1
Boot0020* USB HDD
Boot0021* PXE BOOT
Boot0022 Other CD
Boot0023 Other HDD
Boot0024* IDER BOOT CDROM
Boot0025* IDER BOOT Floppy
Boot0026* ATA HDD
Boot0027* ATAPI CD
Boot0028* LENOVO CLOUD
As you can see:
- my first and default bootloader is
Fedora
, which means it will defer to GRUB (it could be systemd-boot, but not this time, Lennart, not this time). Grub won't present any Windows options, as I don't have it.
- the program also gives me a very valuable piece of information, and it's in the first line of its output: what EFI bootloader led me to the active operating system. Thanks to that, I know that the bootloader for this Linux installation is
BootCurrent: 0000
---> 0000
--> Boot0000
--> the one labelled as Fedora
. If I want to keep my current OS, Fedora 36 in this case, I should never delete the mentioned entry.
If I had Windows, you'd see something like the following:
Code:
[l:0, a:0] ~ efibootmgr
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,0001,001A,001B,001C,001D,001E,001F,0020,0021,0011,0023,0022,0028
Boot0000* Fedora
Boot0001* Windows
Boot0010 ThinkShield secure wipe
Boot0011* LENOVO CLOUD
Boot0012 Setup
Boot0013 Boot Menu
In that case, GRUB would be presenting me with a Windows option. The moment you'd delete Windows bootloader and refresh GRUB configuration according to your distribution's instructions, GRUB would be clean.
I hope this gives a bit of clarity. But you'll need to read and try, and make backups and mistakes, by yourself.
A last warning: only manipulate operating sytems' entries recognisable by you. You should never tinker with anything else. In my example, nothing from Boot0010 onwards is for us to tinker with, as doing the wrong thing could have unpredictable and harmful consequences to the EFI, other firmware, your machine's warranty or serviceability,... only touch what you know!