I'm working with a cast-off Intel server, and when I go to the Boot Menu after POST, there's an entry there BOOT0006. It does not appear in the BIOS/Settings which I access with F2.
Run sudo efibootmgr; efibootmgr will show a list of all the boot devices stored in EFI, and their current order in booting. Find the bogus entry to delete from that list and its order number.
Run efibootmgr -b X -B where X is the number of the bogus device to delete. For example, if BOOT0006 was the third item in the Boot Order, found in the previous step, do efibootmgr -b 3 -B.
Shut down, reboot to see the boot order; the bogus entry should be gone. Then you can reinstall the HDD or SDD.
Remove the internal drive (HDD or SSD).
Boot from a LiveUSB and open a terminal.
Run
sudo efibootmgr
; efibootmgr will show a list of all the boot devices stored in EFI, and their current order in booting. Find the bogus entry to delete from that list and its order number.Run
efibootmgr -b X -B
where X is the number of the bogus device to delete. For example, if BOOT0006 was the third item in the Boot Order, found in the previous step, doefibootmgr -b 3 -B
.Shut down, reboot to see the boot order; the bogus entry should be gone. Then you can reinstall the HDD or SDD.