Ubuntu – Removing Ubuntu from UEFI Bios Menu

uefi

I have a Lenovo Ideapad Y510P. I recently removed Ubuntu 12.04 from it, and did a reset on the Windows 8 Partition. However, I still have the Ubuntu option in the firmware (not bios) boot menu, and I want to get rid of it.

The problems are (I looked this up ahead of time):

  1. In order to boot into the Ubuntu USB I have, I need to be in Legacy Mode.
  2. In order to run sudo efibootmgr in Ubuntu, I need to be in UEFI Mode. Right now, when I run it, I get the:

    couldn't open either sysfs or procfs directories for accessing EFI variables 
    

    error (I tried sudo modprobe efivars before it and after it and it looked like it did nothing).

  3. I can't be in both modes at once.

Best Answer

You can do this easily using Visual BCD Editor in Windows 7/8/10.

  • Map EFI System drive to Z: using

    mountvol z: /s

  • Run Visual BCD Editor and select "Store","Backup store".

  • a)Click on browse icon in dialog and using the explorer window select z: drive - now you have full access to EFI System Partition (ESP).

    b)Click on EFI folder to expand - you will see "Boot", "Microsoft" and "ubuntu" folders if you have Windows and Ubuntu installed.

    c) You can delete "ubuntu" directory by selecting it and pressing "Del" key.

  • In Visual BCD Editor click on loader entry "Ubuntu" to select it and then press "Del" key to delete.

After reboot Ubuntu boot option in UEFI boot menu will be completely gone.

Note:

You could alternatively use bcdedit.exe to delete EFI boot entry for Ubuntu and use command prompt to delete "ubuntu" folder from EFI System Partition (drive z:) if you feel more comfortable with commands.