I've attempted the installation of Ubuntu Server 20.04 multiple times on my Lenovo Thinkpad X120e machine, running in UEFI mode. The installation gets all the way to the "installing grub to target devices" step before failing. Here is the final entry in the installation log.
Command ['unshare', '--fork', '--pid', '--', 'chroot', '/target', '/usr/lib/grub/grub-multi-install']
Exit code: 1
Reason: -
Stdout: ''
Stderr: Installing grub to /boot/efi
Installing for x86_64-efi platform
grub-install: warning: Cannot set EFI variable Boot000A.
grub-install: warning: efivarfs_set_variable: writing to fd 7 failed: Invalid argument.
grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: Invalid argument.
grub-install: error: failed to register the EFI boot entry: Invalid Argument.
From the research I've done it seems like this era of Lenovo machines (2011-ish) might have slightly buggy UEFI firmware? This answer Could not prepare Boot variable: No space left on device grub-install: error: efibootmgr failed to register the boot entry: Input/output error seems to suggest I should try the "efi_no_storage_paranoia" kernel option, but I'm not sure how to set this variable and continue the installer. I'm also not positive this will fix the problem.
I've exited into the live installer's interactive shell and tried to run efibootmgr
(which the logs suggest is installed) but I don't get any response.
Any suggestions on how to set the "efi_no_storage_paranoia" option and successfully complete the bootloader installation, or any other ideas on how I can get this installed? Thanks!