Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1014840 > unrolled thread

Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument"

Started by"Francesco Poli (wintermute)" <invernomuto@paranoici.org>
First post2020-06-22 09:00 +0200
Last post2020-07-29 22:50 +0200
Articles 9 — 5 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" "Francesco Poli (wintermute)" <invernomuto@paranoici.org> - 2020-06-22 09:00 +0200
    Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Francesco Poli <invernomuto@paranoici.org> - 2020-06-27 15:40 +0200
    Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Michel Le Bihan <michel@lebihan.pl> - 2020-07-26 22:10 +0200
    Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Michel Le Bihan <michel@lebihan.pl> - 2020-07-27 18:30 +0200
      Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Kevin Locke <kevin@kevinlocke.name> - 2020-07-27 21:00 +0200
    Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Michel Le Bihan <michel@lebihan.pl> - 2020-07-27 19:20 +0200
    Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument" Michel Le Bihan <michel@lebihan.pl> - 2020-07-27 20:10 +0200
    Bug#963475: Could not parse device path: Invalid argument Omer Ozarslan <omerfaruko@gmail.com> - 2020-07-28 03:20 +0200
    Bug#963475: Could not parse device path: Invalid argument Michel Le Bihan <michel@lebihan.pl> - 2020-07-29 22:50 +0200

#1014840 — Bug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument"

From"Francesco Poli (wintermute)" <invernomuto@paranoici.org>
Date2020-06-22 09:00 +0200
SubjectBug#963475: libefivar1: "efibootmgr -v" fails with "Could not parse device path: Invalid argument"
Message-ID<AkoAW-6xC-5@gated-at.bofh.it>
Package: libefivar1
Version: 37-2.1
Severity: important

Hello!

One week ago I had no issues in running:

  $ efibootmgr -v

but today, I get:

  $ efibootmgr -v
  BootCurrent: 0001
  Timeout: 1 seconds
  BootOrder: 0001,0000
  Boot0000* debianCould not parse device path: Invalid argument

Please note that (luckily!) the system is able to boot and reboot,
and that the non-verbose output is:

  $ efibootmgr
  BootCurrent: 0001
  Timeout: 1 seconds
  BootOrder: 0001,0000
  Boot0000* debian
  Boot0001* debian2

I searched the web and found a github [issue], that claims the
problem is in efivar, mentioning a [commit] that is supposed
to fix it.
But it seems to me that the [code] currently in Debian unstable
does not include this fix.

[issue]: <https://github.com/rhboot/efibootmgr/issues/133>
[commit]: <https://github.com/rhboot/efivar/commit/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e>
[code]: <https://sources.debian.org/src/efivar/37-2.1/src/ucs2.h/>

I hope I am not completely off-track...   :-p

Could you please investigate the issue and cherrypick the patch,
if appropriate?

Thanks for your time.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libefivar1 depends on:
ii  libc6  2.30-8

libefivar1 recommends no packages.

libefivar1 suggests no packages.

-- no debconf information

[toc] | [next] | [standalone]


#1015472

FromFrancesco Poli <invernomuto@paranoici.org>
Date2020-06-27 15:40 +0200
Message-ID<AmjdM-3em-11@gated-at.bofh.it>
In reply to#1014840

[Multipart message — attachments visible in raw view] — view raw

On Mon, 22 Jun 2020 08:46:14 +0200 Francesco Poli (wintermute) wrote:

[...]
> I searched the web and found a github [issue], that claims the
> problem is in efivar, mentioning a [commit] that is supposed
> to fix it.
> But it seems to me that the [code] currently in Debian unstable
> does not include this fix.
> 
> [issue]: <https://github.com/rhboot/efibootmgr/issues/133>
> [commit]: <https://github.com/rhboot/efivar/commit/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e>
> [code]: <https://sources.debian.org/src/efivar/37-2.1/src/ucs2.h/>
> 
> I hope I am not completely off-track...   :-p
> 
> Could you please investigate the issue and cherrypick the patch,
> if appropriate?

I tried to downgrade from libefiboot1/37-2.1 to libefiboot1/37-2 and I
can confirm that the problem vanishes after the downgrade.

Is there any news on your side?
Please let me know, thanks for your time!


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[toc] | [prev] | [next] | [standalone]


#1019396

FromMichel Le Bihan <michel@lebihan.pl>
Date2020-07-26 22:10 +0200
Message-ID<AwV86-58D-19@gated-at.bofh.it>
In reply to#1014840
Hello,

What's preventing the upstream fix from being applied to this package?

Michel Le Bihan

[toc] | [prev] | [next] | [standalone]


#1019498

FromMichel Le Bihan <michel@lebihan.pl>
Date2020-07-27 18:30 +0200
Message-ID<AxeaJ-8oC-5@gated-at.bofh.it>
In reply to#1014840
Hello,

I applied the fix and built the package. It didn't help. I also built
latest master and I still have this issue.

BTW, the computer is an OptiPlex 7040. Full hwinfo --bios: 
https://lebihan.pl/files/hwinfo-bios.txt

Error trace:
```
root@s217-lab00:~# /dev/shm/efibootmgr/src/efibootmgr -v
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0003,0004,0001,0005,000A,0007,0008,0009,0002
Boot0000* Windows Boot ManagerCould not parse device path: Invalid
argument
error trace:
 /build/efivar-yvRv8P/efivar-37/src/include/efivar/efivar-dp.h:1208
efidp_is_valid(): invalid device path node type: Invalid argument
```

Michel Le Bihan

Le lundi 27 juillet 2020 à 15:28 +0000, Limonciello, Mario a écrit :
> > -----Original Message-----
> > From: Michel Le Bihan <michel@lebihan.pl>
> > Sent: Sunday, July 26, 2020 2:58 PM
> > To: 963475@bugs.debian.org
> > Subject: Bug#963475: libefivar1: "efibootmgr -v" fails with "Could
> > not
> > parse device path: Invalid argument"
> > 
> > 
> > [EXTERNAL EMAIL]
> > 
> > Hello,
> > 
> > What's preventing the upstream fix from being applied to this
> > package?
> > 
> > Michel Le Bihan
> 
> I personally can't reproduce the failure on my system's firmware.
> Can you apply the fix locally and confirm it actually helps?

[toc] | [prev] | [next] | [standalone]


#1019514

FromKevin Locke <kevin@kevinlocke.name>
Date2020-07-27 21:00 +0200
Message-ID<AxgvU-1ee-5@gated-at.bofh.it>
In reply to#1019498
On Mon, 2020-07-27 at 18:24 +0200, Michel Le Bihan wrote:
> Le lundi 27 juillet 2020 à 15:28 +0000, Limonciello, Mario a écrit :
>>> On Sun, 2020-07-26 at 14:58, Michel Le Bihan wrote:
>>> What's preventing the upstream fix from being applied to this
>>> package?
>> 
>> I personally can't reproduce the failure on my system's firmware.
>> Can you apply the fix locally and confirm it actually helps?
> 
> I applied the fix and built the package. It didn't help. I also built
> latest master and I still have this issue.

FWIW, I'm also experiencing the issue that efibootmgr -v produces the
error "Could not parse device path: Invalid argument" with libefiboot1
37-2.1, but not 37-2.  Building libefiboot1 with fdb8034 and 4e04afc
added to debian/patches does solve the issue for me.

https://github.com/rhboot/efivar/commit/fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch
https://github.com/rhboot/efivar/commit/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch

Best,
Kevin

P.S. I had to build using GCC 9 due to
https://github.com/rhboot/efivar/issues/156

[toc] | [prev] | [next] | [standalone]


#1019504

FromMichel Le Bihan <michel@lebihan.pl>
Date2020-07-27 19:20 +0200
Message-ID<AxeX7-sR-3@gated-at.bofh.it>
In reply to#1014840
It was efibootmgr and efivar master.

Le lundi 27 juillet 2020 à 16:46 +0000, Limonciello, Mario a écrit :
> Was that just efibootmgr master?
> If possible, can you move up to *both* efivar master and efibootmgr
> master and try again?
> 
> > -----Original Message-----
> > From: Michel Le Bihan <michel@lebihan.pl>
> > Sent: Monday, July 27, 2020 11:25 AM
> > To: Limonciello, Mario; 963475@bugs.debian.org
> > Subject: Re: Bug#963475: libefivar1: "efibootmgr -v" fails with
> > "Could not
> > parse device path: Invalid argument"
> > 
> > 
> > [EXTERNAL EMAIL]
> > 
> > Hello,
> > 
> > I applied the fix and built the package. It didn't help. I also
> > built
> > latest master and I still have this issue.
> > 
> > BTW, the computer is an OptiPlex 7040. Full hwinfo --bios:
> > https://lebihan.pl/files/hwinfo-bios.txt
> > 
> > Error trace:
> > ```
> > root@s217-lab00:~# /dev/shm/efibootmgr/src/efibootmgr -v
> > BootCurrent: 0003
> > Timeout: 2 seconds
> > BootOrder: 0003,0004,0001,0005,000A,0007,0008,0009,0002
> > Boot0000* Windows Boot ManagerCould not parse device path: Invalid
> > argument
> > error trace:
> >  /build/efivar-yvRv8P/efivar-37/src/include/efivar/efivar-dp.h:1208
> > efidp_is_valid(): invalid device path node type: Invalid argument
> > ```
> > 
> > Michel Le Bihan
> > 
> > Le lundi 27 juillet 2020 à 15:28 +0000, Limonciello, Mario a écrit
> > :
> > > > -----Original Message-----
> > > > From: Michel Le Bihan <michel@lebihan.pl>
> > > > Sent: Sunday, July 26, 2020 2:58 PM
> > > > To: 963475@bugs.debian.org
> > > > Subject: Bug#963475: libefivar1: "efibootmgr -v" fails with
> > > > "Could
> > > > not
> > > > parse device path: Invalid argument"
> > > > 
> > > > 
> > > > [EXTERNAL EMAIL]
> > > > 
> > > > Hello,
> > > > 
> > > > What's preventing the upstream fix from being applied to this
> > > > package?
> > > > 
> > > > Michel Le Bihan
> > > 
> > > I personally can't reproduce the failure on my system's firmware.
> > > Can you apply the fix locally and confirm it actually helps?

[toc] | [prev] | [next] | [standalone]


#1019508

FromMichel Le Bihan <michel@lebihan.pl>
Date2020-07-27 20:10 +0200
Message-ID<AxfJw-Yh-3@gated-at.bofh.it>
In reply to#1014840
I added a comment under the existing closed issue: 
https://github.com/rhboot/efibootmgr/issues/133#issuecomment-664549236

Le lundi 27 juillet 2020 à 17:54 +0000, Limonciello, Mario a écrit :
> In that case, would you mind reporting a bug to upstream efibootmgr?
> It seems
> to me that your Boot0000 entry can't be properly parsed.  You may
> need to also
> attach it to your bug report.
> 
> > -----Original Message-----
> > From: Michel Le Bihan <michel@lebihan.pl>
> > Sent: Monday, July 27, 2020 12:16 PM
> > To: Limonciello, Mario; 963475@bugs.debian.org
> > Subject: Re: Bug#963475: libefivar1: "efibootmgr -v" fails with
> > "Could not
> > parse device path: Invalid argument"
> > 
> > 
> > [EXTERNAL EMAIL]
> > 
> > It was efibootmgr and efivar master.
> > 
> > Le lundi 27 juillet 2020 à 16:46 +0000, Limonciello, Mario a écrit
> > :
> > > Was that just efibootmgr master?
> > > If possible, can you move up to *both* efivar master and
> > > efibootmgr
> > > master and try again?
> > > 
> > > > -----Original Message-----
> > > > From: Michel Le Bihan <michel@lebihan.pl>
> > > > Sent: Monday, July 27, 2020 11:25 AM
> > > > To: Limonciello, Mario; 963475@bugs.debian.org
> > > > Subject: Re: Bug#963475: libefivar1: "efibootmgr -v" fails with
> > > > "Could not
> > > > parse device path: Invalid argument"
> > > > 
> > > > 
> > > > [EXTERNAL EMAIL]
> > > > 
> > > > Hello,
> > > > 
> > > > I applied the fix and built the package. It didn't help. I also
> > > > built
> > > > latest master and I still have this issue.
> > > > 
> > > > BTW, the computer is an OptiPlex 7040. Full hwinfo --bios:
> > > > https://lebihan.pl/files/hwinfo-bios.txt
> > > > 
> > > > Error trace:
> > > > ```
> > > > root@s217-lab00:~# /dev/shm/efibootmgr/src/efibootmgr -v
> > > > BootCurrent: 0003
> > > > Timeout: 2 seconds
> > > > BootOrder: 0003,0004,0001,0005,000A,0007,0008,0009,0002
> > > > Boot0000* Windows Boot ManagerCould not parse device path:
> > > > Invalid
> > > > argument
> > > > error trace:
> > > >  /build/efivar-yvRv8P/efivar-37/src/include/efivar/efivar-
> > > > dp.h:1208
> > > > efidp_is_valid(): invalid device path node type: Invalid
> > > > argument
> > > > ```
> > > > 
> > > > Michel Le Bihan
> > > > 
> > > > Le lundi 27 juillet 2020 à 15:28 +0000, Limonciello, Mario a
> > > > écrit
> > > > :
> > > > > > -----Original Message-----
> > > > > > From: Michel Le Bihan <michel@lebihan.pl>
> > > > > > Sent: Sunday, July 26, 2020 2:58 PM
> > > > > > To: 963475@bugs.debian.org
> > > > > > Subject: Bug#963475: libefivar1: "efibootmgr -v" fails with
> > > > > > "Could
> > > > > > not
> > > > > > parse device path: Invalid argument"
> > > > > > 
> > > > > > 
> > > > > > [EXTERNAL EMAIL]
> > > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > What's preventing the upstream fix from being applied to
> > > > > > this
> > > > > > package?
> > > > > > 
> > > > > > Michel Le Bihan
> > > > > 
> > > > > I personally can't reproduce the failure on my system's
> > > > > firmware.
> > > > > Can you apply the fix locally and confirm it actually helps?

[toc] | [prev] | [next] | [standalone]


#1019541 — Bug#963475: Could not parse device path: Invalid argument

FromOmer Ozarslan <omerfaruko@gmail.com>
Date2020-07-28 03:20 +0200
SubjectBug#963475: Could not parse device path: Invalid argument
Message-ID<AxmrD-4Yc-3@gated-at.bofh.it>
In reply to#1014840
Hello,

I was filing a new bug against efibootmgr, but my issue might belong
here as well.

When I invoke `efibootmgr -v`, it gives the error `Could not parse
device path: Invalid argument`

```
omer@omer:~$ efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0000,0003,0001,0002
Boot0000* Windows Boot Manager
Boot0001  Hard Drive
Boot0002  USB HDD
Boot0003* debian
omer@omer:~$ efibootmgr -v
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0000,0003,0001,0002
Boot0000* Windows Boot ManagerCould not parse device path: Invalid argument
```

A similar error was also reported against Ubuntu [1] and Fedora [2].

[1]: https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1844320
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1773175

I have dual boot with Windows 10 and Bullseye. I came across this
error while I was trying to figure out a way to edit Windows' GPT
entry (so that my PC boots to grub even after Windows 10 tampers GPT
entries to put its own boot manager in the first place).

Package versions:

ii  efibootmgr        17-1         amd64        Interact with the EFI
Boot Manager
ii  libc6:amd64       2.31-1       amd64        GNU C Library: Shared libraries
ii  libefiboot1:amd64 37-2.1       amd64        Library to manage UEFI variables
ii  libefivar1:amd64  37-2.1       amd64        Library to manage UEFI variables
ii  libpopt0:amd64    1.18-1       amd64        lib for parsing
cmdline parameter

In my case, when I compiled the latest efivar [3], `efibootmgr -v` ran
without any issues with the compiled shared objects libefivar.so.1 and
libefiboot.so.1 in its LD_LIBRARY_PATH.

[3]: https://github.com/rhboot/efivar/tree/36297adcb266f07bb06e725a0da377bc6e6aedd0

Best,
Omer

[toc] | [prev] | [next] | [standalone]


#1019731 — Bug#963475: Could not parse device path: Invalid argument

FromMichel Le Bihan <michel@lebihan.pl>
Date2020-07-29 22:50 +0200
SubjectBug#963475: Could not parse device path: Invalid argument
Message-ID<Ay1bs-4tK-15@gated-at.bofh.it>
In reply to#1014840
Hello,

I tested `efibootmgr -v` from Debian testing in QEMU and had the `Could
not parse device path: Invalid argument` error. Then I downloaded
Fedora 32 live, run `efibootmgr -v` and got a nice output:
```
[liveuser@localhost-live ~]$ sudo efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0005
Boot0000* UiApp	FvVol(7cb8bdc9-f8eb-4f34-aaea-
3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI QEMU DVD-ROM QM00001 	PciRoot(0x0)/Pci(0x1f,0x2)/Sata
(0,65535,0)N.....YM....R,Y.
Boot0005* EFI Internal Shell	FvVol(7cb8bdc9-f8eb-4f34-aaea-
3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
```

I think that the Debian package should have this patch applied.

Michel Le Bihan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web