efivarfs_set_variable: writing to fd 7 failed: Invalid argument.

Bug #1921143 reported by Cliff Carson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

With the 3/24/2021 update grub failed to install. Getting messages;

grub-install: warning: Cannot set EFI variable Boot000B.
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.

when doing sudo grub-install /dev/sda. Reinstalled grub-efi-amd64-bin successfully but get the same error on the grub-install command.

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: grub-efi-amd64-bin 2.04-1ubuntu44
ProcVersionSignature: Ubuntu 5.11.0-11.12-generic 5.11.0
Uname: Linux 5.11.0-11-generic x86_64
ApportVersion: 2.20.11-0ubuntu60
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 24 11:42:52 2021
InstallationDate: Installed on 2020-11-17 (126 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Alpha amd64 (20201117)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2-unsigned
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Cliff Carson (ccarson1) wrote :
Revision history for this message
Cliff Carson (ccarson1) wrote :

Got a grub error after installing grub-efi-amd64-bin 2.04-1ubuntu44 during daily update/upgrade on 3/24. The message indicated the boot process may fail. Attempted to re-install grub on two different devices both failed with the error noted above. Thought my only option was to re-install 21.04 so was prepared to do that but when attempting to re-boot the system every thing worked as expected. Still get the error message when doing grub-install. Will put off re-installing the system until 21.04 distribution or some error on boot.

Revision history for this message
Cliff Carson (ccarson1) wrote :

Don't know what I'm looking at but the out put of efibootmgr -v shows a Boot000B set and it is current.

cliff@Desktopps:~$ efibootmgr -v
BootCurrent: 000B
Timeout: 1 seconds
BootOrder: 000B,0016,0014,0013,000C,000E,0012,0018,001A,001E,001F
Boot000B* ubuntu HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot000C* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot000E* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot0012* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot0013* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........O.A.S.U.S. . . . .D.R.W.-.2.4.F.1.S.T. . . .b.................>..Gd-.;.A..MQ..L.6.E.0.D.L.C.4.0.1.1.7.8. . . . . . . . ........BO
Boot0014* Hard Drive BBS(HD,,0x0)..GO..NO........O.S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .2.5.0.G.B.................>..Gd-.;.A..MQ..L.2.S.N.1.S.N.F.A.2.C.6.3.2.1. .B. . . . ........BO..NO........O.S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .2.5.0.G.B.................>..Gd-.;.A..MQ..L.2.S.6.R.B.N.H.0.5.B.1.5.9.5. .F. . . . ........BO..NO........Y.S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .5.0.0.G.B.................H..Gd-.;.A..MQ..L.S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .5.0.0.G.B........BO
Boot0016* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot0018* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot001A* UEFI OS PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)..BO
Boot001E* UEFI OS HD(1,GPT,f3c85e85-56e3-4154-bee2-3c14f6e140a9,0x800,0x64000)/File(\EFI\BOOT\BOOTX64.EFI)..BO

Revision history for this message
Cliff Carson (ccarson1) wrote :

Grub update 2021-04-02 grub-efi-amd64-signed (1.169+2.04-1ubuntu45) installation failed. Again doing an grub-install indicates that the process failed to set Boot000B.

Revision history for this message
Cliff Carson (ccarson1) wrote :

Problem has been corrected by some update between 2021-04-02 and 2021-04-20.

Steve Langasek (vorlon)
affects: grub2-unsigned (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :

Since the original reporter says that the problem has been corrected by some update between 2021-04-02 and 2021-04-20, I am setting this bug to Fix Released. If someone experiences a bug with similar error messages, please file a new bug report and include your motherboard information (because it could also be a problem of the EFI implementation there).

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.