Convert legacy BIOS installed system to UEFI BIOS bootable

At first boot set UEFI only option from BIOS settings. Then boot the computer using rEFInd CD or USB

When the computer has booted up, check that EFI partition is available and GPT partition table is in use

sudo parted -l

…. if EFI partition is /dev/sda1, edit /etc/fstab file like

/dev/sda1 /boot/efi vfat defaults 0 2

….. but using UUID is the better way

UUID=xxxx-xxxx /boot/efi vfat defaults 0 2

…. after that mount that partition

sudo mount -a

…. and make a folder

sudo mkdir -p /boot/efi/EFI/ubuntu

… install grub-efi and update grub

apt update
apt install grub-efi-amd64
sudo update-grub

…. after that grubx64.efi should see in /boot/efi/EFI/ubuntu and system should boot if ubuntu is set as the first device from the BIOS settings.

###############################

Tested 22.12.2019 using Mint 19.2