1

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!

5
  • what version firmware do you have, and what is the latest offered by the vendor? Certainly you will want the latest offered.
    – ubfan1
    Mar 10, 2021 at 3:44
  • @ubfan1 I'm on firmware 1.16 - the latest is 1.17. Unfortunately for a few reasons I don't really want to upgrade if I don't need to. 1. Firmware 1.17's changelog only shows that the Computrace module was updated, with no other changes. 2. I have a modified firmware installed that removes the wifi card whitelist. 3 The lenovo firmware flash utility didn't work on a Windows 10 install - I think my next step would be to try Windows 7. Regardless of the content of the firmware update, do you think flashing new firmware would help?
    – glorange
    Mar 10, 2021 at 14:28
  • maybe some of the commands in this bug will help you troubleshoot the problem - bugs.launchpad.net/ubuntu/+source/shim-signed/+bug/1851955 Mar 10, 2021 at 15:47
  • Hardware issues are a valid reason not to update. I'm on a W520, about the same age as yours, 64bit UEFI but pre secure boot. Never any problems with UEFI installs, actually running both legacy on original disk and UEFI on disk caddy.Stopped firmware updates at the point they would clobber the PCI buffers (to give the non-existent 32 bit uses more memory!!!) -- needed that PCI memory for an eGPU off the expresscard slot.
    – ubfan1
    Mar 10, 2021 at 16:42
  • Just to be sure I upgraded to the 1.17 bios - didn't make a difference
    – glorange
    Mar 11, 2021 at 20:11

2 Answers 2

2

I was able to get this installed using the efi_no_storage_paranoia parameter!

To add the parameter, press 'e' on the live usb boot menu. Then add efi_no_storage_paranoia as the last parameter on the line with linux at the beginning. Press F10 to boot with the parameter now set.

Once the live usb boots, I recommend dropping into the shell (through the help menu or otherwise) and typing dmesg | grep "Command line". If you entered the kernel parameter correctly, you should see efi_no_storage_paranoia listed at the end of the command.

Note that using this parameter could be dangerous (and brick your system), so only use it if you're sure it's the issue.

From here I was able to proceed as normal, and the grub installation process went smoothly!

1
  • I am adding the latest Ubuntu 22 Server to a UTM virtual machine and I was having the same issue. Thanks for this solution. Jul 12 at 16:59
0

While trying to install Ubuntu Server 21.10 on a Dell Wyse 7020 (several times), installation would always end in an error at the 'configuring grub' stage, whatever I tried to vary during the installation.

Adding the directive efi_no_storage_paranoia at the boot screen (following glorange's hints), allowed me to complete the installation normally.

Note: I had made sure that the partition table was in MBR format. There didn't seem to be any 'secure boot' related options in the device's BIOS/UEFI-screen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .