2

I dual booted windows 10 and ubuntu. Now, I don't want the Ubuntu. So I deleted the ubuntu partitions. Next, I used the Windows recovery drive to run bootrec.exe /fixmbr in cmd.So If I power my pc now, it boots to Windows directly but there is a problem: Ubuntu still exists when I check the boot menu.How can I remove it?

In the Boot menu I see: -

  • OS Boot Manager
  • ubuntu(ST500LT012-1DG142
  • Boot from EFI File

When I select the ubuntu option: I see

GNU GRUB version 2.02~beta2-22ubuntu1

Minimal BASH-like line editing is supported....

When I press tab, it shows a list of commands to enter.

  • What devide are you using? Maybe you can remove it by accessing BIOS. – user495162 Jan 20 '16 at 22:04
  • 1
    Possible duplicate of Uninstall Grub and use Windows bootloader – Thomas Ward Jan 20 '16 at 22:09
  • To Faraday, hello Sir, when i tried doing this through msconfig and when i hit enter and go to boot tab it doesn't shows any ubuntu record. – Aniket Singh Jun 28 '16 at 8:12
2

I've gotten the solution https://askubuntu.com/a/63613/410771

You should be able to do this via a Live Ubuntu CD.

Install efibootmgr:

sudo apt-get install efibootmgr

Then add to the kernel efi support

sudo modprobe efivars

Then run sudo efibootmgr to check your boot entries. It will return something like this:

BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 2001,0003,0005,0006,0000
Boot0000* Lenovo Recovery System
Boot0001* EFI Network 0 for IPv6 (B8-88-E3-84-F3-EF)
Boot0002* EFI Network 0 for IPv4 (B8-88-E3-84-F3-EF)
Boot0003* Windows Boot Manager
Boot0004* EFI USB Device (SanDisk)
Boot0005* ubuntu
Boot2001* EFI USB Device

Then delete the option you dont want. In this example, Ubuntu is entry 5. the following could be called to delete entry 5 and remove it from the BootOrder.

(CAUTION: Before executing the following command make sure you enter the correct Boot entry number)

sudo efibootmgr -b 5 -B 

Further details described here: http://linux.die.net/man/8/efibootmgr

Note: as for anything that changes your bootloader, please ensure you have a good disk image that you can boot with.

Now you should also delete the ubuntu subdirectory in the EFI partition to prevent the UEFI firmware from restoring the entry into the BootOrder.

To do that, first find your EFI partition. Run sudo fdisk -l to see the partitions on all attached drives. The EFI partition has EFI Partition under the Type column.

Suppose your EFI partition was /dev/sda2, then mount it on an empty folder anywhere.

    sudo mkdir /mnt/efipart
    sudo mount /dev/sda2 /mnt/efipart

Now we have to find the directory Ubuntu or any other distro's name in this partition. It is mostly under EFI/distro_name.

Remove that directory and its contents by (PLEASE MAKE SURE YOU ARE DELETING THE CORRECT DIRECTORY) sudo rm -r ubuntu.

0

If I understand correctly - you have Ubuntu option in boot menu on startup. The easyest way is to press Win + R and type msconfig and hit Enter. In window that appears go to Boot tab select ubuntu record and press Delete Then mark the checkfield Make all boot setting permanent Then press Yes to conform and reboot.

  • I followed this but it's only Windows that's listed. In other words, Ubuntu isn't in the list. – Faraday Jan 20 '16 at 20:28
  • Then please provide some more information where you see the Ubuntu? Maybe screenshot? – Ivan Temchenko Jan 20 '16 at 20:34
  • I have updated my question. – Faraday Jan 20 '16 at 21:14
  • Try this method: askubuntu.com/questions/429610/… – Ivan Temchenko Jan 20 '16 at 21:23
  • Great, I'm glad it helped! – Ivan Temchenko Jan 21 '16 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.