From your description, it's apparent that you're running an EFI-based computer. There are several ways to do what you want, but I first want to note a caveat: Some tools (such as Boot Repair, if you activate certain advanced options) move and rename EFI boot loaders in order to work around EFI bugs. If you've used such a tool on your computer in the past, doing the "right" thing can actually make matters worse. I don't think that doing as I describe here will do that, but it's possible that this procedure won't work if your files have been moved and renamed. That out of the way, one way to get rid of GRUB on such a system is as follows:
- Boot to Windows using your built-in boot manager.
- Open an Administrator Command Prompt window. In Windows 7, you'd do this by right-clicking the Command Prompt item and selecting "Run as Administrator." This is probably different in Windows 8, though.
- Type
mountvol P: /S
. This should mount the ESP as P:
. (You can change that identifier if you like.)
- Back up the contents of
P:
. You could do this with xcopy
, which copies entire directory trees; or use a command-line Zip utility.
- Type
cd P:
.
- Explore the files on
P:
. There should be a directory called EFI\ubuntu
. Delete it. There may be other suspicious files or directories, but don't delete them just yet. Be especially careful to not delete the EFI\Microsoft
directory. Note that you'll need to do all this in the Administrator Command Prompt window, using commands like dir
and del
.
When you reboot, the computer should boot straight to Windows. If it doesn't, you can go back in and review any other files or directories. Most Windows machines have an EFI\Microsoft
directory on the ESP, and possibly a directory for the computer's manufacturer, but that's it. Anything else is suspect, especially if it's got a Linux-related name -- for instance, if EFI\fedora
is present, it's likely to be the boot loader from a leftover Fedora installation.
There are alternatives to this approach. For instance, you could use EasyUEFI in Windows or efibootmgr
in an emergency Linux boot to change the boot order. Many EFIs provide similar functionality in their built-in setup utilities, but the details of how to use these tools varies from one machine to another. Re-ordering the boot options may pose slightly less risk of doing something catastrophically wrong than deleting the Ubuntu files from the ESP, but it also won't fully "get rid of" GRUB, in the sense that GRUB will still be on the hard disk.
Note also that there's a possibility that GRUB is installed in BIOS/CSM/legacy mode, in which case the easiest and safest solution is to disable this support. Many Ubuntu installation instructions recommend enabling this support, but that's a Bad Idea, IMO. If you did this, you should follow those instructions in reverse to undo the damage and get your system back to booting in EFI-only mode.