I recently bought an SSD to be made as a boot drive for my laptop. When I cloned it though, it also copied its boot menu option. Is there a way to delete the Ubuntu option and Windows Boot Manager option of my HDD?
-
Does this answer your question? How do I remove Windows from the UEFI boot menu after custom installing Ubuntu? – user68186 Dec 24 '19 at 17:23
1 Answers
You should be able to use UEFI directly or efibootmgr from Ubuntu booted in UEFI mode. Either your install or a live installer.
sudo efibootmgr -v
The "-v" option displays all the entries so you can confirm you're deleting the right one, and then you use the combination of "-b ####" (to specify the entry) and "-B" (to delete it). Examples #5 is delete:, with Ubuntu you need sudo, others must be at root. some need all 4 hex chars, others only need significant digits
sudo efibootmgr -b XXXX -B
man efibootmgr
If descriptions are identical, they should still have unique GUID or your clone was too good as duplicates partitions are not allowed. UEFI may have duplicate descriptions and can get duplicate entries that should be housecleaned.
Run this for each drive partuuid is the same as GUID you see in efibootmgr -v detailed entry.
lsblk -o name,mountpoint,label,size,fstype,uuid,partuuid | egrep -v "^loop"
Most UEFI seem to find Windows entries in ESP - Efi System Partition, but not Linux UEFI boot entries. If UEFI does find them, then you also have to delete the folders in the ESP on the older drive.

- 12,100