See this ubuntu appears in BIOS menu (UEFI)

I have this on my Lenovo s205 too.

Is there some way to remove "ubuntu" from the menu? I don't even have it installed anymore.

  • you can try easyBCD app for windows. – RonnieDroid Aug 15 '15 at 17:31
  • 3
    @RonnieDroid EasyBCD is a tool for modifying the boot configuration data in Windows (aka, the Windows bootloader). BCD and UEFI are separate because BCD relies on Windows, while UEFI is OS-independent (still present without an OS installed). Modifying the BCD would be useless because, by default, the only option would be Windows, even if another OS is installed. – ExplodingKittens Aug 22 '15 at 1:55

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.

| improve this answer | |
  • 4
    UEFI may reinstall entry if /EFI/ubuntu folder not deleted from the efi(ESP) partition on drive. Always best to fully backup efi partition before deleting any files or folders. – oldfred Apr 6 '15 at 16:47
  • In 16.04 I get a 'permission denied' message when trying to access my mounted efi partition, even with sudo. Any suggestions? – Major Productions Feb 17 '17 at 20:28
  • I think the . at the end or your last sentence is quite dangerous x) – Oragon Efreet Apr 4 '17 at 22:04
  • Some answers told me to use boot-repair...got no result. Other said run bootrec.exe /fixmbr...no results. Others said delete just the ubuntu folder....it kept coming back... other said just remove the boot entry with efibootmgr...that came back too. Nothing worked. But then...suddenly I read your post and I realise have to remove the folder AND the boot entry together? Suddenly it worked! This here is the answer you've been searching for. – Silversonic Jul 29 '17 at 10:12
  • Using Rufus on Windows 10 I just prepared a USB stick with Ubuntu 18.04 Desktop on it and followed your instructions. It worked like a charm. – Peter Gloor Jun 29 '18 at 15:01

This answer borrowed verbatim from here)

  1. Run a cmd.exe procescs with administrator privileges
  2. Run diskpart
  3. Type: list disk then sel disk X where X is the drive your boot files reside on
  4. Type list vol to see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)
  5. Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
  6. For convenience, assign a drive letter by typing: assign letter=Z: where Z is a free (unused) drive letter
  7. Type exit to leave disk part
  8. While still in the cmd prompt, type: Z: and hit enter, where Z was the drive letter you just created.
  9. Type dir to list directories on this mounted EFI partition
  10. If you are in the right place, you should see a directory called EFI
  11. Type cd EFI and then dir to list the child directories inside EFI
  12. Type rmdir /S ubuntu to delete the ubuntu boot directory
| improve this answer | |

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