7

How to uninstall the Grub and restore the Windows 8 system with secure boot and UEFI?

THpubs
  • 2,795

6 Answers6

3

Simply use this tool from a live disc: OS-Uninstaller

enter image description here

LovinBuntu
  • 3,615
  • 2
  • 20
  • 21
2

I recommend the following:

  1. Boot from an emergency system (Ubuntu in "live CD" mode, PartedMagic, System Rescue CD, or whatever).
  2. Mount your EFI System Partition (ESP). This is often (but not always) /dev/sda1. It's always a FAT32 partition that has its "boot flag" set (in parted terminology) or a partition type code of EF00 (in gdisk terminology).
  3. Launch a shell and change to the ESP.
  4. Type sudo rm -rf EFI/ubuntu. (You can omit sudo on some systems.)
  5. If you ever used Boot Repair on the disk, undo its damage:
    1. Change to EFI/Microsoft/Boot on the ESP.
    2. Move bootmgfw.efi.bkp to bootmgfw.efi, overwriting the existing file.
    3. Change to EFI/BOOT on the ESP.
    4. Move bootx64.efi.bkp to bootx64.efi, overwriting the existing file.
  6. Launch GParted, parted, gdisk, or cgdisk on the disk.
  7. Delete the Linux partition(s).
  8. Optional: Resize the Windows partition(s) to fill the disk. It's probably best to skip this if you intend to do a fresh re-install of Ubuntu, since you'll just undo this change shortly.
  9. Reboot into Windows to test that it still works. This will probably also clear out the EFI's NVRAM entries for Ubuntu.
Rod Smith
  • 44,284
  • 7
  • 63
  • 105
0

Insert windows repair disk to restore the startup (grub). In Administrative tools in windows, delete the ubuntu partition and extend the windows partition to take up all free space.

0

here is a better way if under windows 8.

  1. go to disk management by pressing WinKey + X
  2. then choose disk management
  3. delete the ubuntu drives(extended partitions) must be two. make sure you dont delete recovery disks.
  4. then extend your disk.
  5. reboot your computer with your OS DVD OR BOOTABLE USB. under win8 select keyboard then language.
  6. click next, then click on repair
  7. select second option then click next
  8. click cancel then select command
  9. type "bootsect /nt60 /mbr" then press enter. please note this is only under win8. reboot
  10. windows will attempt to repair wait or give it 4 min then reboot it. "simply press and hold power button untill system turns off.
  11. after 5 sec turn it again and you are good to go.

please note bootsec that is being mentioned over the internet works under windows 7 and other previous windows versions not win8.

please correct me if i m wrong.

0

After much stress, and looking everywhere for the answers I managed to do it manually. I removed Ubuntu and all the partitions I created for it. I booted into a Ubuntu Live-USB and opened the LSR partition created by windows which is filled with EFI files. I found and deleted all mentions of grub and a couple of other files and it removed grub from the startup. Hope that helps, it was more of a trial and error, there are a couple of files that don't belong which you need to delete and it will work fine.

0

You can just do it as you would if UEFI and "Secure Boot" were not involved, but re-enable "Secure Boot" in your firmware ("BIOS") before installing Windows. It might be even simpler though, depending on what you have set up right now and what you want to acccomplish.

Ubuntu supports (but does not require) "Secure Boot," so if you are dual-booting Ubuntu and Windows 8, you likely already have "Secure Boot" enabled, especially if it is the stock, OEM-provided Windows 8 installation. If that is the case, then there is no difference at all between the usual procedures for removing Ubuntu and making Windows bootable, and your situation.

If you just have Ubuntu installed now, and you want to remove Ubuntu, enable "Secure Boot," and just have Windows 8 installed (at least for the time being), then it is very simple. Just do one of the following:

  • Wipe your disk (for example, by running GParted from an Ubuntu live CD and telling it to create a new partition table), enable "Secure Boot," and install Windows 8. Or:
  • Skip wiping your disk, enable "Secure Boot," install Windows 8, and tell Windows 8's installer to wipe the disk (or delete all existing partitions). Windows installers have been capable of this for the last several Windows OSes.

If Windows 8 is already installed in a way that does not need "Secure Boot" (for example, a 32-bit Windows 8 installation), then probably it too will not work when Secure Boot is enabled. In that case, you would probably have to remove both Ubuntu and Windows 8, to enable "Secure Boot." So for that situation, you can just wipe your disk, enable "Secure Boot," and install Windows 8.

(Alternatively, if you wanted to try to make a non-"Secure Boot" Windows 8 installation work with "Secure Boot," or a "Secure Boot" Windows 8 installation work without it, you could ask about that somewhere Windows question that don't relate much to Ubuntu is supported. Super User is often good for that. But from your description, it doesn't seem like that's what you're trying to do.)

Eliah Kagan
  • 117,780