10

I can find a lot of information on the opposite (removing Ubuntu from a dual boot) but not how to remove Windows from a dual boot. I did this once before and then I just deleted the whole EFI partition, however, that was a bad decision (also couldn't boot Ubuntu because it was installed in UEFI mode) and in the end I had to do a clean install.

So what I did now is removing the NTFS partition and keep the EFI partition intact. However the Windows Boot Manager still shows up in GRUB, but of course gives an error when selected.

So I thought an update-grub might solve it, but it says:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-24-generic
Found initrd image: /boot/initrd.img-4.4.0-24-generic
Found linux image: /boot/vmlinuz-4.4.0-22-generic
Found initrd image: /boot/initrd.img-4.4.0-22-generic
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

So how do I get rid of this Windows Boot Manager entry in EFI? I tried to use efibootmgr as suggested by https://superuser.com/questions/930725/how-to-delete-os-from-boot-menu but update-grub keeps picking it up and when I reboot and run efibootmgr again the entry is back...

  • I had to use the -A option to make the entries inactive, that did work for me. – RCF Jun 19 '16 at 00:03
  • @RCF-U16.04 Thanks, that post indeed helped me to remove it from the boot menu, I deleted the whole /dev/sda2@/EFI/Microsoft folder. As for the duplicate, I agree, it was meant as a sort of general approach on how to delete Windows from a dual boot, but a separate question for that makes more sense. – Gerhard Burger Jun 19 '16 at 07:29
  • @RCF-U16.04 - This user wants to get read of Windows not of Ubuntu. So it can't be a duplicate. More like a... "mirror". – Cristiana Nicolae Jun 19 '16 at 07:33

1 Answers1

5

Windows Boot Manager bootmgr, manages the boot process. UEFI-based systems contain a firmware boot manager, Bootmgfw.efi.

The BCD settings for the device and path elements in Windows Boot Manager indicate the firmware boot manager.

The path element specifies the location of the Windows Boot Manager application on that volume.

For UEFI systems, path indicates the firmware boot manager, whose path is \EFI\Microsoft\Boot\Bootmgfw.efi.

According to the information provided by you.

You should erase in the partition /dev/sda2@/

The file /EFI/Microsoft/Boot/bootmgfw.efi

Then run sudo update-grub

kyodake
  • 15,401
  • Ubuntu 18.04: This helped me get windows out of the grub menu after I replaced a hard drive and didn't copy windows back on to it. Finally windows is totally gone, thanks! – Organic Marble Jun 15 '21 at 20:01