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.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communitySee 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 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 don't 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
.
sudo rm -r ubuntu
will only work if you cd
to the correct directory first. Better to use absolute path in the command: sudo rm -r /mnt/efipart/EFI/ubuntu
This answer borrowed verbatim from here)
cmd.exe
procescs with administrator privilegesdiskpart
list disk
then sel disk X
where X is the drive your boot files reside onlist vol
to see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)sel vol Y
where Y is the SYSTEM
volume (this is almost always the EFI partition)assign letter=Z:
where Z is a free (unused) drive letterexit
to leave disk partcmd
prompt, type: Z:
and hit enter, where Z was the drive letter you just created.dir
to list directories on this mounted EFI partitionEFI
cd EFI
and then dir
to list the child directories inside EFI
rmdir /S ubuntu
to delete the ubuntu boot directory TL;DR:
Run live Ubuntu and type:
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
Explanation:
In my case, I was stuck on grub rescue
. I was trying to fix a friend's laptop where he has deleted all Ubuntu partitions from the dual boot option thinking that's the standard way to wipe Ubuntu. Normally the answer mentioned by @kamal works as mentioned above. But in my case, this time it was a bit different/weird.
There was no Ubuntu directory inside the folder named EFI. I saw four EFI files inside the EFI folder. All of them were representing CPU architecture, and all looked like Windows EFI files. I didn't want to risk and delete the wrong EFI file.
Usually, the Ubuntu EFI file looks like this: elilo.efi. But there was no such EFI file in my case nor the directory with a name of a particular distribution.
I wish I knew this command before, it would have a huge amount of time. It's not usually mentioned in any blog. Good luck.