UEFI BootOrder is not empty after I removed the last boot entry.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
High
|
Ivan Hu | ||
efibootmgr (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Mathieu Trudel-Lapierre |
Bug Description
[Impact]
Trusty users who attempt to reorganize EFI boot entries aggressively (deleting everything and creating a new Ubuntu entry, or deleting everything and leaving the installer create a new entry) may run into issues when a new BootOrder entry is created with an empty list: they will find a duplicate entry for the one added.
Upon the last deletion, users may also find that the command reports failure when the BootOrder entry was deleted successfully.
[Test case]
- Run the provided test_efi.sh on a system booted in EFI mode (that has EFI support). This test is destructive, only run it on a system if you know what you are doing and are able to recreate the appropriate Boot entries for starting the system.
This is runnable also on qemu, provided one uses the UEFI OVMF BIOS:
0) sudo apt install ovmf
1) qemu-img create -f qcow2 disks/efi-
2) qemu-system-x86_64 -name efi-test-x86_64 -enable-kvm -monitor stdio -serial pty -boot menu=on -m 1024 -m 1024 -bios /usr/share/
[Regression Potential]
A failure case following the application of this fix may be that BootOrder entries remain after deletion of a Boot entry when it should have been removed from the list. BIOSes should successfully recover from this if there are other valid BootOrder entries to boot from, but may fail to do so.
----
There is no such issue in Ubuntu 14.10 or 15.04.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
$ dpkg-query -W efibootmgr
efibootmgr 0.5.4-7ubuntu1.1
$ sudo efibootmgr -v || echo "*failed*"
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* ubuntu HD(1,800,
$ sudo efibootmgr -v -B -b 0 || echo "*failed*"
*failed*
$ sudo efibootmgr -v || echo "*failed*"
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
$ sudo efibootmgr -v -c -L ubuntu -l \\EFI\\
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0000
Boot0000* ubuntu HD(1,800,
You can see BootOrder having the duplicate 0000.
Related branches
Changed in efibootmgr (Ubuntu): | |
status: | New → Fix Released |
Changed in efibootmgr (Ubuntu Trusty): | |
status: | New → Triaged |
assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
Changed in hwe-next: | |
assignee: | nobody → Ivan Hu (ivan.hu) |
importance: | Undecided → High |
Changed in hwe-next: | |
status: | New → Triaged |
description: | updated |
Changed in efibootmgr (Ubuntu Trusty): | |
status: | Triaged → In Progress |
Changed in hwe-next: | |
status: | Triaged → Fix Released |
Please run this script for this issue.
It should be no "*failed*" and no duplicate number in BootOrder.
== Expected Result == 100000, b8d7d8e9- 4ac4-46cc- 8bd0-8d90d6df1d f4)File( \EFI\ubuntu\ shimx64. efi)
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* ubuntu HD(1,800,
== Actual Result == 100000, b8d7d8e9- 4ac4-46cc- 8bd0-8d90d6df1d f4)File( \EFI\ubuntu\ shimx64. efi)
*failed*
*failed*
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0000,0000
Boot0000* ubuntu HD(1,800,