I recently migrated my system to UEFI boot.
The system is a HP EliteBook 840 G1, with a SATA hard disk. Ubuntu is the only operating system.
I converted the disk to GPT, added the necessary partitions, installed
grub-efi-amd64, then ran
grub-install --target=x86_64-efi /dev/sda. (Based on my bash history – this was done a while back.)
When I rebooted the system, it booted right into Ubuntu.
However, after the first cold boot, the system did not boot properly: first it tried to boot from LAN, then presented me with a message that there was no OS installed and prompted me to press F2 for system diagnostics. I did that, exited the diagnostics tool, and Ubuntu came up.
I tried messing with the boot order in BIOS setup. There is no option to boot from the SATA disk (but one to boot from the M.2 SSD, if one were installed). So I moved OS boot manager to the top, but to no avail – I still get the same error.