As the first step boot into live disk:
Then install efibootmgr:
sudo apt update
sudo apt install efibootmgr
Then load the kernel efivars
module:
sudo modprobe efivars
Then run sudo efibootmgr
to check your boot entries. It will return something like this:
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0004,0002,0003
Boot0000* Windows Boot Manager
Boot0001* ubuntu
Boot0002* Hard Drive
Boot0003* CD/DVD Drive
Boot0004* ubuntu
Then delete which you don't want to be shown in BIOS.
So for example we want to remove Ubuntu from BootOrder. So run this commands (in my example Ubuntu is refer to 1 and 4 boot order but you must to replace this numbers with your own):
sudo efibootmgr -b 1 -B
sudo efibootmgr -b 4 -B
Then 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. So run this command:
sudo fdisk -l
(The EFI partition has EFI System
under the Type column.)
For example in my case /dev/sda2
is EFI partition :
/dev/sda1 2048 923647 921600 450M BIOS boot
/dev/sda2 923648 1128447 204800 100M EFI System
/dev/sda3 1128448 1161215 32768 16M Microsoft reserved
/dev/sda4 1161216 425428991 424267776 202.3G Microsoft basic data
/dev/sda5 425428992 1347025381 921596390 439.5G Microsoft basic data
/dev/sda6 1347026944 1395853311 48826368 23.3G Linux swap
/dev/sda7 2166228992 3907025693 1740796702 830.1G Microsoft basic data
/dev/sda8 1395853312 2166228991 770375680 367.4G Linux filesystem
So mount EFI partition on an empty folder anywhere.
sudo mkdir /mnt/boot
sudo mount /dev/sda2 /mnt/boot
Now find the directory Ubuntu
or any other distro's name in this partition. It is mostly under efi/ubuntu
.
Remove that directory and its contents by commands like this:
cd /mnt/boot/efi/
sudo rm -r ubuntu