# Windows – Fix GRUB/EFI Boot partition after deleting Ubuntu

bootgrubUbuntuwindows 8

I inatalled Ubuntu in a new (Asus Zenbook UX305) laptop, with Windows 8.1 preinstalled, I choosed 'Install alongside' option when installing Ubuntu. Then I wanted to try ElementaryOS, and I chosen 'Delete Ubuntu and reinstall' option. The installation process went well until it ask me for space, it was recognizing many OS installed, so, I decided to stop installation to fix partitions.

After I fixed partitions I installed Elementary normally, but when I reboot I got a black screen, grub console:

grub>


When I was using Ubuntu I modified GRUB to launch Ubuntu without asking or showing any option (I think now Ubuntu is missing and GRUB is failing), but keeping Windows on disk.

I have Restored PC from Windows options, it suposed to clean the complete disk, but when I go to boot options in BIOS I still see a couple of options for Ubuntu, they fail, of course.

Now when I try to reinstall Elementary I get the same GRUB console. But I can start Windows if I 'clean' the disk.

I have also tried with Boot-repair from a LiveUSB, it shows a success message, but it's not working.

How can I repair this?

On UEFI every OS install involves changing/creating 3 entities:

A. Change of NVRAM variables.

B. Change of EFI System partition(ESP) which is a hidden partition.

C. Partition with OS (+swap partition for Linux).

So removing an OS completely from computer is done by removing these 3 changes.

1. The easiest thing to do is first to delete OS partition (paragraph C.)

2. Then you have to delete the corresponding OS folder in EFI SYStem partition: You map ESP and simply delete \EFI\Ubuntu subfolder for example (paragraph B.)

3. For editing NVRAM variables you can use UEFI firmware functionality where you can add, delete and reorder boot entries. (Linux systems have the utility "efibootmgr" which gives access to NVRAM)