Install Lubuntu20.04 at UEFI booting machine

-1. Delete all of your disk partitions.


0. Use default installing GUI for full-disk erasing installation

It will fail, but it'll do some works for you.
The error message is "command returned non-zero exit status. cannot set efi variable boot00003. efivarfs_set_variable invalid argument. failed to register the efi boot entry."
Don't quit the USB OS yet. Open a terminal. do a check with `sudo df -hl`.
I suppose now you have a 300MB fat32 partition at /dev/sda1, and an ext4 partition at /dev/sda2, that's good!

1. Reboot to your USB live system again, but don't install anything. Just open the terminal.


2. Chroot

```
sudo mount /dev/sda2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
#sudo modprobe efivarfs #do it only when you got error when execute grub-install
sudo chroot /mnt
#mount -t efivarfs efivarfs /sys/firmware/efi/efivars #do it only when you got error when execute grub-install
```

3. Mount /dev/sda1 to /boot/efi

```
sudo mkdir /boot/efi
sudo mount /dev/sda1 /boot/efi
```

4. Update grub

```
sudo update-grub
```

3. Install grub

```
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --force
```

4. If it shows error: no enough space, can't register...

```
sudo rm /sys/firmware/efi/efivars/dump-*
# do grub-install again
```



Reference:
https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader