Do this as root
Code:
apt install grub-efi
mkdir /boot/efi
mount <efi partition>/boot/efi
Code:
grub-install --target=x86_64-efi
will get error about no efivars varibles
create a /etc/fstab to mount the efi partition to /boot/efi
If you have an iso you can boot in efi mode, chroot into your system to do this, you can skip the rest of this and won't get the efivars error. I think boot-repair has an option to convert over also.
reboot, use the bios boot options to select ubunut/debian efi boot option
It it boots, rerun
or use efibootmgr to create an entry in the firmware and make default.