incorrect efibootmgr command is set by update-grub under OVMF

Bug #1275162 reported by Dimitri John Ledkov on 2014-02-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
efibootmgr (Ubuntu)
High
Dimitri John Ledkov
Trusty
Wishlist
Dimitri John Ledkov
grub2 (Debian)
Fix Released
Unknown
grub2 (Ubuntu)
High
Dimitri John Ledkov
Trusty
High
Dimitri John Ledkov

Bug Description

I'm running OVMF from trusty, under qemu started like this:

$ qemu-system-x86_64 -pflash OVMF.fd -m 1024 -drive file=nvme.img,if=none,id=D22 -device nvme,drive=D22,serial=1234 --enable-kvm

where nvme.img is my disk drive.

After the installation & secure-boot key enrollment, the added "ubuntu" boot entry fails to boot. I've added one manually using EFI shell and the correct enumerated device drive (fs0:) and made it top priority. That one worked. Comparing the output of the two using efibootmgr I get the following output:

BootCurrent: 0006
BootOrder: 0006,0005,0000,0001,0002,0003,0004
Boot0000* EFI Floppy ACPI(a0341d0,0)PCI(1,0)ACPI(60441d0,0)
Boot0001* EFI Floppy 1 ACPI(a0341d0,0)PCI(1,0)ACPI(60441d0,1)
Boot0002* EFI DVD/CDROM ACPI(a0341d0,0)PCI(1,1)ATAPI(1,0,0)
Boot0003* EFI Misc Device ACPI(a0341d0,0)PCI(4,0)03171000010000000000000000000000
Boot0004* EFI Internal Shell MM(b,3fafd000,3ffbcfff)
Boot0005* ubuntu HD(1,0,0,1ca5fb01)File(\EFI\ubuntu\shimx64.efi)
Boot0006* 'ubuntu-custom' ACPI(a0341d0,0)PCI(4,0)03171000010000000000000000000000HD(1,800,f3800,075e987d-5ca9-4c04-82f1-7967bc2dca5f)File(\EFI\ubuntu\shimx64.efi)

It appears as if an efi boot entry was added for an HD/MBR like partition, instead of one address by ACPI/PCI and the full partition UUID.

Dimitri John Ledkov (xnox) wrote :

Here is a bootentry that does work for a regular qemu hard-drive:

Boot0007* 'ubuntu-custom-normal' ACPI(a0341d0,0)PCI(1,1)ATAPI(0,0,0)HD(1,800,f3800,075e987d-5ca9-4c04-82f1-7967bc2dca5f)File(\EFI\ubuntu\shimx64.efi)

Which is also addressing by partuuid.

affects: grub (Ubuntu) → grub2 (Ubuntu)
Steve Langasek (vorlon) on 2014-02-01
Changed in grub2 (Ubuntu):
status: New → Triaged
Changed in efibootmgr (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → High
Changed in grub2 (Ubuntu Trusty):
importance: Undecided → High
tags: added: efibugs
Changed in grub2 (Ubuntu Trusty):
status: Triaged → Invalid
Changed in efibootmgr (Ubuntu):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in efibootmgr (Ubuntu Trusty):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in efibootmgr (Ubuntu Trusty):
importance: High → Wishlist
Dimitri John Ledkov (xnox) wrote :

efibootmgr generates correct entries for "-d /dev/nvmen0" however /dev/nvmen0 is not picked as default target to install grub on to because grub-mkdevicemap doesn't know about nvme devices.

Changed in efibootmgr (Ubuntu Trusty):
status: Confirmed → Invalid
Changed in grub2 (Ubuntu):
status: Invalid → Confirmed
Changed in grub2 (Ubuntu Trusty):
status: Invalid → Confirmed
Changed in efibootmgr (Ubuntu):
status: Confirmed → Invalid
Changed in grub2 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in grub2 (Ubuntu Trusty):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in grub2 (Ubuntu Trusty):
milestone: none → ubuntu-14.04.1
Changed in grub2 (Debian):
status: Unknown → New
Colin Watson (cjwatson) on 2014-05-08
Changed in grub2 (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in grub2 (Ubuntu):
status: In Progress → Fix Committed
Changed in grub2 (Debian):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-10

---------------
grub2 (2.02~beta2-10) unstable; urgency=medium

  [ Colin Watson ]
  * Add the true module to the signed image, since 05_debian_theme uses it.
    Thanks to Dimitri John Ledkov for the report.
  * Limit test suite parallelisation to 1; the test suite seems to have some
    isolation problems at higher levels at the moment (closes: #746856).
  * Simplify override_dh_install a bit.
  * Backport patches from upstream to make the network stack more responsive
    on busy networks (LP: #1314134).

  [ Dimitri John Ledkov ]
  * Add support for nvme device in grub-mkdevicemap (closes: #746396,
    LP: #1275162).

  [ Debconf translations ]
  * Korean (Changwoo Ryu, closes: #745559).

 -- Colin Watson <email address hidden> Thu, 08 May 2014 11:13:48 +0100

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released

Hello Dimitri, or anyone else affected,

Accepted grub2 into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/grub2/2.02~beta2-9ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in grub2 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Dimitri John Ledkov (xnox) wrote :

I cannot test this, as I need a trusty image build with -proposed enabled. And trusty daily builds have not been enabled yet.

Dimitri John Ledkov (xnox) wrote :

Verified with pending with 20140707 image that correct GTP lookup based EFI boot order variables are generated for "ubuntu" entry and no special interventions are required to install / reboot / boot off an NVMe device.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-9ubuntu1

---------------
grub2 (2.02~beta2-9ubuntu1) trusty; urgency=medium

  * Backport patches from upstream to make the network stack more responsive
    on busy networks (LP: #1314134).
  * Add support for nvme device in grub-mkdevicemap (thanks, Dimitri John
    Ledkov; closes: #746396, LP: #1275162).
 -- Colin Watson <email address hidden> Thu, 08 May 2014 13:09:46 +0100

Changed in grub2 (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for grub2 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Other bug subscribers

Remote bug watches

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