Without mount point /sys/firmware/efi/efivars for target system, ubiquity sometimes failed to install bootloader on target system.
May 21 08:21:55 ubuntu ubiquity[29387]: Setting up grub-efi-amd64 (2.02-2ubuntu8) ...
May 21 08:21:56 ubuntu ubiquity[29387]:
May 21 08:21:56 ubuntu ubiquity[29387]: Creating config file /etc/default/grub with new version
May 21 08:21:56 ubuntu ubiquity[29387]: Installing for x86_64-efi platform.
May 21 08:21:57 ubuntu ubiquity[29387]: Skipping unreadable variable "Boot0000": Input/output error
May 21 08:21:57 ubuntu ubiquity[29387]: Could not prepare Boot variable: Input/output error
May 21 08:21:57 ubuntu ubiquity[29387]: grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
May 21 08:21:57 ubuntu ubiquity[29387]: Failed: grub-install --target=x86_64-efi
May 21 08:21:57 ubuntu ubiquity[29387]: WARNING: Bootloader is not properly installed, system may not be bootable
May 21 08:21:57 ubuntu ubiquity[29387]: Setting up grub-efi-amd64-signed (1.93+2.02-2ubuntu8) ...
May 21 08:21:57 ubuntu ubiquity[29387]: Installing for x86_64-efi platform.
May 21 08:21:58 ubuntu ubiquity[29387]: Skipping unreadable variable "Boot0000": Input/output error
May 21 08:21:58 ubuntu ubiquity[29387]: Could not prepare Boot variable: Input/output error
May 21 08:21:58 ubuntu ubiquity[29387]: grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
May 21 08:21:58 ubuntu ubiquity[29387]: dpkg: error processing package grub-efi-amd64-signed (--configure):
May 21 08:21:58 ubuntu ubiquity[29387]: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
May 21 08:21:58 ubuntu ubiquity[29387]: Errors were encountered while processing:
May 21 08:21:58 ubuntu ubiquity[29387]: grub-efi-amd64-signed
installation failed: