- make a fat32 partition of size 10M, e.g. /dev/sda1
- sudo mkdir /boot/efi
- put this line into /etc/fstab
UUID=4CA9-C727 /boot/efi vfat umask=0077 0 1 - sudo mount -a
- purge old grub-pc, e.g.
- install grub-efi. e.g. apt install grub-efi
- sudo update-grub
- sudo grub-install
- Done.
Using ubuntu live CD and suppose /mnt/2 contains all the old operation system, say ubuntu 18.04.
cd /mnt/2
mount -B /dev dev
mount -B /dev/pts dev/pts
mount -B /proc proc
mount -B /sys sys
mount -B /run run
cd /
chroot /mnt/2
vim /etc/hosts, add this line:
140.110.240.80 tw.archive.ubuntu.com
To find where efi, say sda2, then
mount /dev/sda2 /boot/efi
apt purge grub-pc
apt update
apt install grub-efi
update-grub
grub-install
exit
umount /mnt/2/dev/pts
umount /mnt/2/dev
umount /mnt/2/proc
umount /mnt/2/sys
umount /mnt/2/run