I added GRUB to my Ubuntu installation's disk by bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi.
Then, I removed Ubuntu from my disk and deleted the "ubuntu" file in the EFI.
Every time I boot my computer, I get a message: fail to open EFI.... and then my computer boots into Windows 8.
2 Answers
There are several ways to do what you want:
- You can use the same
bcdeditcommand in Windows, but instead of\EFI\ubuntu\grubx64.efi, you can specify\EFI\Microsoft\Boot\bootmgfw.efi. - You can use the EasyUEFI program in Windows to manage the EFI boot entries in a GUI way. This is likely to be less error-prone that
bcdedit. Move the Windows entry to the top of the list and/or delete the Ubuntu entry. - You can boot an Ubuntu live disk and use
efibootmgrto delete the Ubuntu entry and/or move the Windows entry to the top of the list. Typesudo efibootmgr(orsudo efibootmgr -vto see more details) to see the list of options; then use the-b #### -Boption to delete one, or-o ####[,####[,...]]to change the boot order. (####is a four-digit hexadecimal number associated with a boot entry.) Typeman efibootmgrfor more documentation on this command. - Many EFIs provide a way to manage boot entries in their own user interfaces. Details vary greatly from one system to another, though.
Another simple way to fix this from Windows 8/10 is using admin command prompt:
bcdboot c:\windowsTo remove remnants of grub completely you have to clean up EFI system partition(ESP). This can be done easily using Dual-boot Repair 10 as it mapps ESP automatically to drive Z:(or another free drive letter). Use for example "Backup BCD" dialog to browse z:\EFI and delete "ubuntu" folder.