How to uninstall the Grub and restore the Windows 8 system with secure boot and UEFI?
-
2Well, "Secure Boot" is more like a "Restricted Boot", see this. I don't know why you'd want to restore a feature that threatens your freedom.– Alba MendezJan 11, 2013 at 16:34
-
Also, this could (or not) be seen off-topic here.– Alba MendezJan 11, 2013 at 16:34
-
3@jmendeth Im trying to experiment a new way to install Linux with it. So i need to restore the original settings first.– THpubsJan 11, 2013 at 16:39
-
@jmendeth It's no prblem as Ubuntu has added support of Secure boot. I am using Ubuntu in secure boot now.– Kolappan NDec 31, 2014 at 4:23
-
youtube.com/watch?v=zyOBF2ePvHY– Nehal J WaniNov 15, 2015 at 18:26
6 Answers
Simply use this tool from a live disc: OS-Uninstaller
-
-
1yes, as long as you use it in an UEFI-mode session. (if you are in a Legacy session but need an UEFI session, the tool will warn you anyway). Jan 1, 2015 at 23:12
I recommend the following:
- Boot from an emergency system (Ubuntu in "live CD" mode, PartedMagic, System Rescue CD, or whatever).
- 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 (inparted
terminology) or a partition type code of EF00 (ingdisk
terminology). - Launch a shell and change to the ESP.
- Type
sudo rm -rf EFI/ubuntu
. (You can omitsudo
on some systems.) - If you ever used Boot Repair on the disk, undo its damage:
- Change to
EFI/Microsoft/Boot
on the ESP. - Move
bootmgfw.efi.bkp
tobootmgfw.efi
, overwriting the existing file. - Change to
EFI/BOOT
on the ESP. - Move
bootx64.efi.bkp
tobootx64.efi
, overwriting the existing file.
- Change to
- Launch GParted,
parted
,gdisk
, orcgdisk
on the disk. - Delete the Linux partition(s).
- 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.
- Reboot into Windows to test that it still works. This will probably also clear out the EFI's NVRAM entries for Ubuntu.
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.
-
He was saying about removing GRUB even removing entire linux partition willn not help with it. Dec 31, 2014 at 4:26
here is a better way if under windows 8.
- go to disk management by pressing WinKey + X
- then choose disk management
- delete the ubuntu drives(extended partitions) must be two. make sure you dont delete recovery disks.
- then extend your disk.
- reboot your computer with your OS DVD OR BOOTABLE USB. under win8 select keyboard then language.
- click next, then click on repair
- select second option then click next
- click cancel then select command
- type "bootsect /nt60 /mbr" then press enter. please note this is only under win8. reboot
- windows will attempt to repair wait or give it 4 min then reboot it. "simply press and hold power button untill system turns off.
- 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.
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.
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.)