installation fails in grub-install with: efivarfs_set_variable: writing to fd <N> failed: Invalid argument

Bug #1851955 reported by Ian Scott on 2019-11-09
64
This bug affects 8 people
Affects Status Importance Assigned to Milestone
efivar (Ubuntu)
Undecided
Unassigned
grub2 (Ubuntu)
Undecided
Unassigned
shim-signed (Ubuntu)
Undecided
Unassigned

Bug Description

Installed on an ENVY notebook, installation afiled at the end with no bootloader message

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: ubiquity 19.10.21
ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
Uname: Linux 5.3.0-18-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
CasperVersion: 1.427
Date: Sun Nov 10 08:32:41 2019
InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd quiet splash --- maybe-ubiquity
LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Ian Scott (arb-xfm) wrote :
affects: ubiquity (Ubuntu) → shim-signed (Ubuntu)
Steve Langasek (vorlon) wrote :

The error in your logs is:

Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning: Cannot set EFI variable Boot0000.
Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning: efivarfs_set_variable: writing to fd 7 failed: Invalid argument.
Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: Invalid argument.
Nov 9 19:25:47 ubuntu ubiquity: grub-install: error: failed to register the EFI boot entry: Invalid argument.

Do you know of a reason that Ubuntu would be unable to write to these firmware variables, such as a BIOS security setting?

Changed in shim-signed (Ubuntu):
status: New → Incomplete

Hi Jean-Baptiste and Steve

I admit I am baffled but I appreciate your replies. I had thought it might
be caused by a small hard drive error but that's just a guess.
Interestingly Mint 18 installs OK Mint 12.2 doesn't and any Ubuntu version
does not, although these used to.

More curious, I made a Zorin OS boot USB on another notebook and ran this
after the grub installer failed. This had a "repair boot" section so I ran
this and now Ubuntu 19.10 boots on its own. Very odd.

I checked Bios and it has EFI also I see an EFI partition from Ubuntu using
disks. I like Linux but am just a novice but overall this behaviour just
seems weird.

Anyway I'll report back later if this approach turns out to be stable, for
whatever reason.

Also, is there any way you could remotely inspect and modify this notebook,
even just as an experiment?

Ian

On Sun, Nov 10, 2019 at 4:35 PM Steve Langasek <email address hidden>
wrote:

> The error in your logs is:
>
> Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning: Cannot set EFI
> variable Boot0000.
> Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning:
> efivarfs_set_variable: writing to fd 7 failed: Invalid argument.
> Nov 9 19:25:47 ubuntu ubiquity: grub-install: warning:
> _efi_set_variable_mode: ops->set_variable() failed: Invalid argument.
> Nov 9 19:25:47 ubuntu ubiquity: grub-install: error: failed to register
> the EFI boot entry: Invalid argument.
>
> Do you know of a reason that Ubuntu would be unable to write to these
> firmware variables, such as a BIOS security setting?
>
> ** Changed in: shim-signed (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/shim-signed/+bug/1851955/+subscriptions
>

I started having this issue after I upgraded from Ubuntu 18.04 to 19.10 (through 18.10 and 19.04), everytime I try to run apt upgrade (or apt-get upgrade). Here is an excerpt:

(When I was trying to install a new package, while an update was pending):
Unpacking atlassian-plugin-sdk (8.0.16) ...
Setting up grub-efi-amd64-signed (1.128.1+2.04-1ubuntu12.1) ...
Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0000.
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.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Setting up atlassian-plugin-sdk (8.0.16) ...
If you previously installed a version prior to version 4.0, you will need to remove all references to the atlassian-plugin-sdk directory from your PATH environment variable.
dpkg: dependency problems prevent processing triggers for shim-signed:
 shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.
  Package grub-efi-arm64-signed is not installed.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any clue on where I should start looking?

On Mon, Jan 06, 2020 at 05:46:14PM -0000, Sri wrote:
> Setting up grub-efi-amd64-signed (1.128.1+2.04-1ubuntu12.1) ...
> Installing for x86_64-efi platform.
> grub-install: warning: Cannot set EFI variable Boot0000.
> 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.

> Any clue on where I should start looking?

Look into reports of problems with your specific firmware for your specific
device. See if an update is available. See if there are options in the
BIOS menu that control whether these variables are locked.

What is the output of 'efibootmgr -v' on this system?

If Ubuntu can't control the boot variables, then it can't reliably boot on
the system; so the package install failure is intentional.

However you also mention that this started happening to you on upgrade and
there has been a change in grub's implementation between 18.04 and 19.10,
where previously grub shelled out to efibootmgr and now it writes the
variables directly. So it's possible there is a bug in the grub
implementation.

Ian Scott (arb-xfm) wrote :
Download full text (4.9 KiB)

Hi Steve

Thanks for your reply. Here are the outputs for this Envy notebook - now
running Zorin OS as this installs and has a "Grub repair" feature on its
USB install stick - usually fixes all HP shenanigans.

BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,3000,0001,0002,2001,2002,2003
Boot0000* ubuntu
HD(1,GPT,ca9d4c6c-f90a-408b-9a27-1559c1619904,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0001* Network Adapter (IPv4 UEFI)
PciRoot(0x0)/Pci(0x1c,0x6)/Pci(0x0,0x0)/MAC(a0481cc2def7,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0002* Network Adapter (IPv6 UEFI)
PciRoot(0x0)/Pci(0x1c,0x6)/Pci(0x0,0x0)/MAC(a0481cc2def7,0)/IPv6([::]:<->[::]:,0,0)RC
Boot2001* USB Drive (UEFI) RC
Boot3000* Internal Hard Disk or Solid State Disk RC
Boot3001* Internal Hard Disk or Solid State Disk RC
Boot3002* Internal Hard Disk or Solid State Disk RC
Boot3003* Internal Hard Disk or Solid State Disk RC
Boot3004* Internal Hard Disk or Solid State Disk RC

I ran your command on another HP Pavilion dv6 that also has grub failure
using Ubuntu. It replied "EFI Variables are not installed on this system".

I checked BIOS in detail on both notebooks - no mention of anything unusual.

This second dv6 also had Grub install failure with Ubuntu and also Mint
19.3 - based on Ubuntu. It now dual boots Zorin OS and Mint 19.3. To
accomplish this I installed Zorin OS first, used its Grub repair feature,
installed Mint 19.3 for dual boot and Grub install failure occurred. I used
Zorin OS Grub repair on its USB install pen drive to get Grub to work, now
both OS are happy.

*I agree that this is definitely intentional by HP to motivate consumers to
buy another notebook - they hope one of theirs*. No way! Not Ever again
Steve!

Other anti-consumer behaviour - battery charge failures - proprietary 3-pin
connection on this Envy. It is impossible to wire in any other 19 V supply
- I tried this, it doesn't respond. I waited a week, it stopped playing
silly games.

I am quite certain given all this that HP Intentionally is motivating
consumers to ditch older notebook and buy another. They especially target
Ubuntu as I have described on several incidents, all based on Ubuntu.

Thanks for your assistance Steve. Although I have a workaround there may be
others who don't - If I can help others with HP shenanigans, no problem.

Lastly, on an older Acer 5920 notebook - never a problem. I use this one to
try lots of different OS, often. This behaviour is specific to HP.

Ian

On Tue, Jan 7, 2020 at 7:30 AM Steve Langasek <email address hidden>
wrote:

> On Mon, Jan 06, 2020 at 05:46:14PM -0000, Sri wrote:
> > Setting up grub-efi-amd64-signed (1.128.1+2.04-1ubuntu12.1) ...
> > Installing for x86_64-efi platform.
> > grub-install: warning: Cannot set EFI variable Boot0000.
> > 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.
>
> > Any clue on where I should start looking?
>
> Look into reports of problems with your specific firmware for your specific
> device. See if an ...

Read more...

@steve

Here is the output you asked for. I'll log into my system's bios to see if I find any locks (thought I don't expect any) and let you know.

[code]
$ efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0004,0001
Boot0000* ubuntu HD(1,GPT,03acfa6f-4e69-4d30-a032-166d2d1f8b34,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0001* Hard Drive BBS(HD,,0x0)..GO..NO........O.W.D.C. .W.D.1.0.E.A.R.S.-.0.0.Y.5.B.1.................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.V.A.6.5.0.9.3.3.0.3........BO..NO........O.S.a.m.s.u.n.g. .S.S.D. .8.4.0. .E.V.O. .2.5.0.G.B.................>..Gd-.;.A..MQ..L.1.S.B.D.S.N.F.A.1.4.9.5.4.6. .F. . . . ........BO
Boot0003* UEFI OS HD(1,GPT,03acfa6f-4e69-4d30-a032-166d2d1f8b34,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
[/code]

Steve Langasek (vorlon) wrote :

Ok. Ian, Sri, could you also both check whether running efibootmgr on Ubuntu 19.10 succeeds? Probably the easiest check is a no-op rewrite of the boot order variable. Ian, for you the command would be:

sudo efibootmgr -o 0000,3000,0001,0002,2001,2002,2003; echo $?

Sri, for you the command would be:

sudo efibootmgr -o 0000,0003,0004,0001; echo $?

Please post the complete output of this command.

This will help us determine whether there is a bug in the grub implementation of variable writing, or if there's a bug in the underlying libraries used by both grub and efibootmgr.

Changed in shim-signed (Ubuntu):
status: Incomplete → Triaged
status: Triaged → Incomplete

Hi Steve

Here's the output

Invalid BootOrder order entry value0000,3000,0001,0002,2001,2002
                                                              ^
efibootmgr: entry 2002 does not exist
8

Ian

On Wed, Jan 8, 2020 at 10:55 AM Steve Langasek <email address hidden>
wrote:

> Ok. Ian, Sri, could you also both check whether running efibootmgr on
> Ubuntu 19.10 succeeds? Probably the easiest check is a no-op rewrite of
> the boot order variable. Ian, for you the command would be:
>
> sudo efibootmgr -o 0000,3000,0001,0002,2001,2002,2003; echo $?
>
> Sri, for you the command would be:
>
> sudo efibootmgr -o 0000,0003,0004,0001; echo $?
>
> Please post the complete output of this command.
>
> This will help us determine whether there is a bug in the grub
> implementation of variable writing, or if there's a bug in the
> underlying libraries used by both grub and efibootmgr.
>
> ** Also affects: grub2 (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851955/+subscriptions
>

The error message appears to be correct, you have both 2002 and 2003 in your BootOrder but neither is present in your list of boot options. I don't think this is the cause of the grub failure. Could you try instead running the command:

sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?

and see if that works better? And then, could you try finishing the configuration of the grub package?

Interestingly, I notice that Sri also has a BootOrder variable which references a non-existent boot entry. So it's possible this is related.

Hi Steve

I'm at the library at the moment on another notebook but I'll be back in an
hour or so to try the new idea. However "nd then, could you try finishing
the
configuration of the grub package?"

Unfortunately I have no idea at all how to do this. Can you provide some
instructions Steve? I only use computers, mainly for math analysis and
simulations, but I have very little understanding of what goes on inside
the OS.

Ian

On Wed, Jan 8, 2020 at 11:50 AM Steve Langasek <email address hidden>
wrote:

> The error message appears to be correct, you have both 2002 and 2003 in
> your BootOrder but neither is present in your list of boot options. I
> don't think this is the cause of the grub failure. Could you try
> instead running the command:
>
> sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?
>
> and see if that works better? And then, could you try finishing the
> configuration of the grub package?
>
> Interestingly, I notice that Sri also has a BootOrder variable which
> references a non-existent boot entry. So it's possible this is related.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851955/+subscriptions
>

Steve Langasek (vorlon) wrote :
Download full text (3.2 KiB)

On Tue, Jan 07, 2020 at 11:40:05PM -0000, Ian Scott wrote:
> I'm at the library at the moment on another notebook but I'll be back in
> an hour or so to try the new idea. However "And then, could you try
> finishing the configuration of the grub package?"

> Unfortunately I have no idea at all how to do this. Can you provide some
> instructions Steve? I only use computers, mainly for math analysis and
> simulations, but I have very little understanding of what goes on inside
> the OS.

From a console, you should be able to run 'sudo dpkg --configure -a' and
watch it attempt to finish configuration of the grub packages that
previously failed to configure.

> On Wed, Jan 8, 2020 at 11:50 AM Steve Langasek <email address hidden>
> wrote:
>
> > The error message appears to be correct, you have both 2002 and 2003 in
> > your BootOrder but neither is present in your list of boot options. I
> > don't think this is the cause of the grub failure. Could you try
> > instead running the command:
> >
> > sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?
> >
> > and see if that works better? And then, could you try finishing the
> > configuration of the grub package?
> >
> > Interestingly, I notice that Sri also has a BootOrder variable which
> > references a non-existent boot entry. So it's possible this is related.
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1851955
> >
> > Title:
> > ubuntu 19.10 boot installer failed
> >
> > Status in grub2 package in Ubuntu:
> > New
> > Status in shim-signed package in Ubuntu:
> > Incomplete
> >
> > Bug description:
> > Installed on an ENVY notebook, installation afiled at the end with no
> > bootloader message
> >
> > ProblemType: Bug
> > DistroRelease: Ubuntu 19.10
> > Package: ubiquity 19.10.21
> > ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> > Uname: Linux 5.3.0-18-generic x86_64
> > NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> > ApportVersion: 2.20.11-0ubuntu8
> > Architecture: amd64
> > CasperVersion: 1.427
> > Date: Sun Nov 10 08:32:41 2019
> > InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> > quiet splash --- maybe-ubiquity
> > LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> > SourcePackage: ubiquity
> > UpgradeStatus: No upgrade log present (probably fresh install)
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851955/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to shim-
> signed in Ubuntu.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851955/+subscriptions

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
<email address hidden> ...

Read more...

Ian Scott (arb-xfm) wrote :
Download full text (4.8 KiB)

Hi Steve

Thanks - I remember the sudo dpkg --configure -a command and have had to
use it before - didn't know what it was called though. I ran it but the
terminal had no feedback to make. I then ran your new command and here is
the output

Could not set BootOrder: Invalid argument
8

Ian

On Wed, Jan 8, 2020 at 1:00 PM Steve Langasek <email address hidden>
wrote:

> On Tue, Jan 07, 2020 at 11:40:05PM -0000, Ian Scott wrote:
> > I'm at the library at the moment on another notebook but I'll be back in
> > an hour or so to try the new idea. However "And then, could you try
> > finishing the configuration of the grub package?"
>
> > Unfortunately I have no idea at all how to do this. Can you provide some
> > instructions Steve? I only use computers, mainly for math analysis and
> > simulations, but I have very little understanding of what goes on inside
> > the OS.
>
> >From a console, you should be able to run 'sudo dpkg --configure -a' and
> watch it attempt to finish configuration of the grub packages that
> previously failed to configure.
>
> > On Wed, Jan 8, 2020 at 11:50 AM Steve Langasek <
> <email address hidden>>
> > wrote:
> >
> > > The error message appears to be correct, you have both 2002 and 2003 in
> > > your BootOrder but neither is present in your list of boot options. I
> > > don't think this is the cause of the grub failure. Could you try
> > > instead running the command:
> > >
> > > sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?
> > >
> > > and see if that works better? And then, could you try finishing the
> > > configuration of the grub package?
> > >
> > > Interestingly, I notice that Sri also has a BootOrder variable which
> > > references a non-existent boot entry. So it's possible this is
> related.
> > >
> > > --
> > > You received this bug notification because you are subscribed to the
> bug
> > > report.
> > > https://bugs.launchpad.net/bugs/1851955
> > >
> > > Title:
> > > ubuntu 19.10 boot installer failed
> > >
> > > Status in grub2 package in Ubuntu:
> > > New
> > > Status in shim-signed package in Ubuntu:
> > > Incomplete
> > >
> > > Bug description:
> > > Installed on an ENVY notebook, installation afiled at the end with no
> > > bootloader message
> > >
> > > ProblemType: Bug
> > > DistroRelease: Ubuntu 19.10
> > > Package: ubiquity 19.10.21
> > > ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> > > Uname: Linux 5.3.0-18-generic x86_64
> > > NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> > > ApportVersion: 2.20.11-0ubuntu8
> > > Architecture: amd64
> > > CasperVersion: 1.427
> > > Date: Sun Nov 10 08:32:41 2019
> > > InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> > > quiet splash --- maybe-ubiquity
> > > LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> > > SourcePackage: ubiquity
> > > UpgradeStatus: No upgrade log present (probably fresh install)
> > >
> > > To manage notifications about this bug go to:
> > >
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851955/+subscriptions
> > >
> >
> > --
> > You received this bug notification because you are subscribed to shim...

Read more...

Thanks. Since this fails for you both with efibootmgr and with grub, that suggests there might be a bug in the underlying efivar library. Opening a task on that package.

Can you try installing the libefiboot1 and libefivar1 packages from https://launchpad.net/ubuntu/+source/efivar/34-1/+build/14347977 and running the efibootmgr command again, to see if that changes the behavior for you?

Sri (srived) wrote :

Sorry for the late reply Steve. Here are the commands you asked for (which are consistent with what Ian reported and you observed):

$ sudo efibootmgr -o 0000,0003,0004,0001; echo $?
Invalid BootOrder order entry value0000,0003,0004
                                               ^
efibootmgr: entry 0004 does not exist
8
$ sudo efibootmgr -o 0000,0003,0001; echo $?
Could not set BootOrder: Invalid argument
8
$

Running "sudo dpkg --configure -a" yeilded:

$ sudo dpkg --configure -a
Setting up grub-efi-amd64-signed (1.128.1+2.04-1ubuntu12.1) ...
Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0000.
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.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent processing triggers for shim-signed:
 shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.
  Package grub-efi-arm64-signed is not installed.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed
$

Hi Steve

I downloaded both .deb files and ran using gdebi - it reports "same version
already installed" so I reinstalled anyway and then ran

sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?

Output is

Invalid BootOrder order entry value0000,3000,0001,0002,2001,2002
                                                              ^
efibootmgr: entry 2002 does not exist
8

As a thought Steve, is it possible for you to remotely access this
notebook? If so it might speed things up. Also I don't mind wiping it and
trying new installs if that helps - currently it runs Zorin OS as this has
a boot repair utility and otherwise Ubuntu won't boot by itself - it will
with the Zorin repair but not perfectly as it appears to be optimised for
Zorin OS, that it has worked for Ubuntu (and Mint 19.3)is probably an
accident.

I can install Ubuntu 20.04 on this notebook as I have an ISO for this -
runs fine in Virtualbox.

Ian

On Thu, Jan 9, 2020 at 10:01 AM Steve Langasek <email address hidden>
wrote:

> Thanks. Since this fails for you both with efibootmgr and with grub,
> that suggests there might be a bug in the underlying efivar library.
> Opening a task on that package.
>
> Can you try installing the libefiboot1 and libefivar1 packages from
> https://launchpad.net/ubuntu/+source/efivar/34-1/+build/14347977 and
> running the efibootmgr command again, to see if that changes the
> behavior for you?
>
> ** Also affects: efivar (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in efivar package in Ubuntu:
> New
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1851955/+subscriptions
>

Ian Scott (arb-xfm) wrote :
Download full text (12.5 KiB)

Hi Steve

Some more information if it is of any help

I added another OS to dual boot with Zorin OS on this notebook. At first I
tried to dual boot with Ubuntu 20.04. It installed but with grub boot
failure. I tried several times to repair this using the Zorin USB repair
boot utility - all attempts consistently failed to repair and let this
notebook boot.

I then installed Mint 19.3 and this also reported grub boot failure. This
time the Zorin USB fix boot utility is working (so far). However Mint
consistently reports an error each time I install new software or use the
update manager. I installed Clementine, for example and here is the error
message output,

installArchives() failed: Selecting previously unselected package
libmng2:amd64.
(Reading database ...
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 289950 files and directories currently installed.)
Preparing to unpack .../00-libmng2_2.0.2-0ubuntu3_amd64.deb ...
Unpacking libmng2:amd64 (2.0.2-0ubuntu3) ...
Selecting previously unselected package qtcore4-l10n.
Preparing to unpack .../01-qtcore4-l10n_4%%3a4.8.7+dfsg-7ubuntu1_all.deb ...
Unpacking qtcore4-l10n (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package libqtcore4:amd64.
Preparing to unpack .../02-libqtcore4_4%%3a4.8.7+dfsg-7ubuntu1_amd64.deb ...
Unpacking libqtcore4:amd64 (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package libqjson0:amd64.
Preparing to unpack .../03-libqjson0_0.8.1-3_amd64.deb ...
Unpacking libqjson0:amd64 (0.8.1-3) ...
Selecting previously unselected package libcrypto++6.
Preparing to unpack .../04-libcrypto++6_5.6.4-8_amd64.deb ...
Unpacking libcrypto++6 (5.6.4-8) ...
Selecting previously unselected package libqt4-xml:amd64.
Preparing to unpack .../05-libqt4-xml_4%%3a4.8.7+dfsg-7ubuntu1_amd64.deb ...
Unpacking libqt4-xml:amd64 (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package libqtdbus4:amd64.
Preparing to unpack .../06-libqtdbus4_4%%3a4.8.7+dfsg-7ubuntu1_amd64.deb ...
Unpacking libqtdbus4:amd64 (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package qtchooser.
Preparing to unpack .../07-qtchooser_64-ga1b6736-5_amd64.deb ...
Unpacking qtchooser (64-ga1b6736-5) ...
Selecting previously unselected package qdbus.
Preparing to unpack .../08-qdbus_4%%3a4.8.7+dfsg-7ubuntu1_amd64.deb ...
Unpacking qdbus (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package libqt4-dbus:amd64.
Preparing to unpack .../09-libqt4-dbus_4%%3a4.8.7+dfsg-7ubuntu1_amd64.deb
...
Unpacking libqt4-dbus:amd64 (4:4.8.7+dfsg-7ubuntu1) ...
Selecting previously unselected package libqt4-network:amd64.
Preparing to unpack
.../10-libqt4-network_4%%3a4.8.7+dfsg-7ubuntu1_amd64...

Steve Langasek (vorlon) wrote :

On Wed, Jan 08, 2020 at 09:30:29PM -0000, Ian Scott wrote:
> I can install Ubuntu 20.04 on this notebook as I have an ISO for this -
> runs fine in Virtualbox.

I'm sorry, are you running these commands on Ubuntu, or not? I assumed it
was clear that I was looking for the output of these commands from Ubuntu.

In particular,

> I downloaded both .deb files and ran using gdebi - it reports "same
> version already installed" so I reinstalled anyway and then ran

efivar 34-1 is the version of this package in Ubuntu 18.04; so you should
not have seen this message if you were installing it on Ubuntu 19.10.

> sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?

> Output is

> Invalid BootOrder order entry value0000,3000,0001,0002,2001,2002

> efibootmgr: entry 2002 does not exist
> 8

The command you've quoted above doesn't list 2002 but your output does. Did
you run the right command?

> As a thought Steve, is it possible for you to remotely access this
> notebook?

We are not set up for secure remote access to arbitrary users' computers,
no.

Ian Scott (arb-xfm) wrote :

Hi Steve

I can of course only reply on a notebook running an OS *that works*. How
could I reply on a notebook that doesn't work? *I have been clear and exact
on all I have replied*. I have tried to assist. I cannot do the impossible
Steve. Ubuntu definitely has a problem here. Can you solve this problem or
not?

Whether you can acknowledge and address this Ubuntu problem that it
definitely is now or not matters to me neither. I have tried within what I
could possibly be able to do to help. Perhaps this isn't enough. In any
case, maybe Ubuntu is in sunset now, bootless.

Ian

On Fri, Jan 10, 2020 at 1:30 PM Steve Langasek <email address hidden>
wrote:

> On Wed, Jan 08, 2020 at 09:30:29PM -0000, Ian Scott wrote:
> > I can install Ubuntu 20.04 on this notebook as I have an ISO for this -
> > runs fine in Virtualbox.
>
> I'm sorry, are you running these commands on Ubuntu, or not? I assumed it
> was clear that I was looking for the output of these commands from Ubuntu.
>
> In particular,
>
> > I downloaded both .deb files and ran using gdebi - it reports "same
> > version already installed" so I reinstalled anyway and then ran
>
> efivar 34-1 is the version of this package in Ubuntu 18.04; so you should
> not have seen this message if you were installing it on Ubuntu 19.10.
>
> > sudo efibootmgr -o 0000,3000,0001,0002,2001; echo $?
>
> > Output is
>
> > Invalid BootOrder order entry value0000,3000,0001,0002,2001,2002
>
> > efibootmgr: entry 2002 does not exist
> > 8
>
> The command you've quoted above doesn't list 2002 but your output does.
> Did
> you run the right command?
>
> > As a thought Steve, is it possible for you to remotely access this
> > notebook?
>
> We are not set up for secure remote access to arbitrary users' computers,
> no.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in efivar package in Ubuntu:
> New
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1851955/+subscriptions
>

Steve,
 I downloaded (downgraded) libefiboot1 and libefivar1 per your suggestion in comment #14, and here is the output (no change from previous results).

$ sudo dpkg -i libefiboot1_34-1_amd64.deb
dpkg: warning: downgrading libefiboot1:amd64 from 37-2ubuntu2 to 34-1
(Reading database ... 398727 files and directories currently installed.)
Preparing to unpack libefiboot1_34-1_amd64.deb ...
Unpacking libefiboot1:amd64 (34-1) over (37-2ubuntu2) ...
Setting up libefiboot1:amd64 (34-1) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...
$
$ sudo dpkg -i libefivar1_34-1_amd64.deb
dpkg: warning: downgrading libefivar1:amd64 from 37-2ubuntu2 to 34-1
(Reading database ... 398727 files and directories currently installed.)
Preparing to unpack libefivar1_34-1_amd64.deb ...
Unpacking libefivar1:amd64 (34-1) over (37-2ubuntu2) ...
Setting up libefivar1:amd64 (34-1) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...
$
$ sudo efibootmgr -o 0000,0003,0004,0001; echo $?
Invalid BootOrder order entry value0000,0003,0004
                                               ^
efibootmgr: entry 0004 does not exist
8
$
$ sudo efibootmgr -o 0000,0003,0001; echo $?
Could not set BootOrder: Invalid argument
8
$

Please let me know if you want me to run any more tests.

Regards,
Sri

Hi Steve, Sri

Of course I want to help. *My notebook is available as it is.* I have time
and intent.

Iaan

On Sat, Jan 11, 2020 at 4:41 AM Sri <email address hidden> wrote:

> Steve,
> I downloaded (downgraded) libefiboot1 and libefivar1 per your suggestion
> in comment #14, and here is the output (no change from previous results).
>
> $ sudo dpkg -i libefiboot1_34-1_amd64.deb
> dpkg: warning: downgrading libefiboot1:amd64 from 37-2ubuntu2 to 34-1
> (Reading database ... 398727 files and directories currently installed.)
> Preparing to unpack libefiboot1_34-1_amd64.deb ...
> Unpacking libefiboot1:amd64 (34-1) over (37-2ubuntu2) ...
> Setting up libefiboot1:amd64 (34-1) ...
> Processing triggers for libc-bin (2.30-0ubuntu2) ...
> $
> $ sudo dpkg -i libefivar1_34-1_amd64.deb
> dpkg: warning: downgrading libefivar1:amd64 from 37-2ubuntu2 to 34-1
> (Reading database ... 398727 files and directories currently installed.)
> Preparing to unpack libefivar1_34-1_amd64.deb ...
> Unpacking libefivar1:amd64 (34-1) over (37-2ubuntu2) ...
> Setting up libefivar1:amd64 (34-1) ...
> Processing triggers for libc-bin (2.30-0ubuntu2) ...
> $
> $ sudo efibootmgr -o 0000,0003,0004,0001; echo $?
> Invalid BootOrder order entry value0000,0003,0004
> ^
> efibootmgr: entry 0004 does not exist
> 8
> $
> $ sudo efibootmgr -o 0000,0003,0001; echo $?
> Could not set BootOrder: Invalid argument
> 8
> $
>
> Please let me know if you want me to run any more tests.
>
> Regards,
> Sri
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in efivar package in Ubuntu:
> New
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1851955/+subscriptions
>

Checking in to see if anything moved on this issue?

Sri (srived) wrote :

And, just to note an observation fwiw, in response to comment #10, the non-existant boot order variables probably corresponded to a USB drive and an optical drive that were set in the BIOS Boot Order, but are physically not present (the actual CD/DVD and a bootable USB stick). I do see them set in the BIOS.

Hi Sri

Thanks for the information. The HP Envy does not come with an optical drive
as with many notebooks these days, so therefore none should show in BIOS.
It does have 4 USB ports and all are working. I use one for a wireless
mouse, another for a WiFi dongle (its internal WiFi card is dodgy, as seems
to happen prematurely with HP notebooks). The other two I use for USB
drives, external USB HD, external USB optical drives and and external USB
16 bit sound card etc - no problems.

*The only issue is boot failure*.

Interestingly, the same boot failure always occurs on another HP Pavilion
notebook for any OS based on Ubuntu 18.04. On my HP Envy notebook I just
installed the Debian version LDME for Mint Cinnamon that is based on Debian
rather than Ubuntu - seems to be going fine, but dual boots Zorin OS, based
on Ubuntu 18.04 and had therefore, I guess, needed the boot repair utility.

Also of interest, Mint Cinnamon 18.3 now also comes shipped with a boot
repair utility in its installation ISO. *It seems odd that both Zorin OS
and Mint 18.3, both based on Ubuntu 18.04, would develop a boot repair
utility unless they were aware of a need for one*.

Further, I had attempted to install Ubuntu 20.04 previously - zero boot
repair success, but it runs fine as a virtual machine in VirtualBox on any
notebook with any OS installed.

Ian

On Wed, Jan 29, 2020 at 6:16 AM Sri <email address hidden> wrote:

> And, just to note an observation fwiw, in response to comment #10, the
> non-existant boot order variables probably corresponded to a USB drive
> and an optical drive that were set in the BIOS Boot Order, but are
> physically not present (the actual CD/DVD and a bootable USB stick). I
> do see them set in the BIOS.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851955
>
> Title:
> ubuntu 19.10 boot installer failed
>
> Status in efivar package in Ubuntu:
> New
> Status in grub2 package in Ubuntu:
> New
> Status in shim-signed package in Ubuntu:
> Incomplete
>
> Bug description:
> Installed on an ENVY notebook, installation afiled at the end with no
> bootloader message
>
> ProblemType: Bug
> DistroRelease: Ubuntu 19.10
> Package: ubiquity 19.10.21
> ProcVersionSignature: Ubuntu 5.3.0-18.19-generic 5.3.1
> Uname: Linux 5.3.0-18-generic x86_64
> NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
> ApportVersion: 2.20.11-0ubuntu8
> Architecture: amd64
> CasperVersion: 1.427
> Date: Sun Nov 10 08:32:41 2019
> InstallCmdLine: file=/cdrom/preseed/ubuntu.seed initrd=/casper/initrd
> quiet splash --- maybe-ubiquity
> LiveMediaBuild: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
> SourcePackage: ubiquity
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1851955/+subscriptions
>

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

Changed in efivar (Ubuntu):
status: New → Confirmed
Changed in grub2 (Ubuntu):
status: New → Confirmed
summary: - ubuntu 19.10 boot installer failed
+ installation fails in grub-install with: efivarfs_set_variable: writing
+ to fd <N> failed: Invalid argument
Timofey Vorobyov (t-vorobyov) wrote :

Appeared on kubuntu 20.10 today, after new gtub-efi-amd64-signed version appeared in the repository:

Setting up grub-efi-amd64-signed (1.155.4+2.04-1ubuntu35.4) ...
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0000.
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.

Timofey Vorobyov (t-vorobyov) wrote :

This is `apt upgrade` log.

Timofey Vorobyov (t-vorobyov) wrote :

Ad suggested here

https://askubuntu.com/questions/1302806/grub-install-fails-because-of-efibootmgr-could-not-prepare-boot-variable-inva

run manual grub install - this helped:

sudo grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --no-nvram --removable

Installing for x86_64-efi platform.
Installation finished. No error reported.

On Mon, Feb 22, 2021 at 06:22:27PM -0000, Timofey Vorobyov wrote:
> sudo grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-
> directory=/boot/efi --no-nvram --removable
>
> Installing for x86_64-efi platform.
> Installation finished. No error reported.

Running grub-install manually with --no-nvram doesn't solve the problem of
the package being unconfigured; nor should it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers