Invalid BootEntry while reordering boot entries on some UEFI implementations

Bug #2018280 reported by Olivier Gayot
204
This bug affects 23 people
Affects Status Importance Assigned to Milestone
curtin
Invalid
Undecided
Unassigned
subiquity
Fix Released
Undecided
Olivier Gayot

Bug Description

On some UEFI implementations, it is acceptable for the UEFI BootCurrent variable to have no associated BootXXXX variable when booting from removable media (e.g., USB sticks).

By default, after an install, curtin tries to set the install media as the default boot entry, i.e., BootOrder="$BootCurrent:$BootOrder"

However, when BootCurrent does not have an associated BootXXXX entry, setting the boot order results in an exception:

> Invalid BootOrder order entry value1004

^ where 1004 is the value of BootCurrent and Boot1004 does not exist.

We got multiple reports of this bug on Dell XPS hardware, but also some other brands and models.

For subiquity, it seems like an unwanted behavior to set the install media as the default boot entry, so disabling this behavior seems preferable.

We should think about fixing the issue in curtin too.

Revision history for this message
Olivier Gayot (ogayot) wrote :
Changed in subiquity:
status: New → Fix Committed
assignee: nobody → Olivier Gayot (ogayot)
Revision history for this message
Olivier Gayot (ogayot) wrote :

Hello,

If someone with affected hardware feels like helping with some testing, we would be interested to see if the issue is fixed after applying the committed change. Sadly we do not have new ISOs available at the moment so to test the fix, one would need to:

1. Boot the 23.04 desktop installer ISO
2. Open a terminal
3. Copy the source file to change to a writable location:
   $ cp /snap/ubuntu-desktop-installer/939/bin/subiquity/subiquity/models/subiquity.py /tmp

4. Edit the file /tmp/subiquity.py and apply the following change: https://github.com/canonical/subiquity/pull/1671/commits/0bf2d9d38db49569b134c4fc8dfd69966f317c02

5. Bind mount the edited file to its original location:
   $ sudo mount -o bind /tmp/subiquity.py /snap/ubuntu-desktop-installer/939/bin/subiquity/subiquity/models/subiquity.py

6. Restart the installer:
   $ sudo snap restart ubuntu-desktop-installer

7. Proceed with the installation (ideally using the same settings than used when the bug was encountered)

If the fix seems to work for you, please say so. Otherwise, I'd be happy to investigate.

Thanks,
Olivier

Revision history for this message
Minamoto Sewa (mnmtsw) wrote :

Hello,

I am one of the victims(?) of the bug, and sadly, the fix committed in PR 1671 only delays the issue. Subiquity is now crashing trying to de-duplicate UEFI entries. I have reported the situation to https://bugs.launchpad.net/subiquity/+bug/2025910 to not clog this report.

While my approach was to patch and inject Subiquity entirely, I did went back to the standard 23.04 Server setup and it was still the same trying to de-duplicate. You did ask for the Desktop ISO but I took (perhaps too much) liberty. My apologies.

With much love and hair-pulling,
Sewa

Revision history for this message
Minamoto Sewa (mnmtsw) wrote :

With some more faffing around, setting "remove_duplicate_entries" to False did it for me to go on with the install.

A band-aid solution is to have the UEFI-related curtin entries check for "invalid" BootCurrent to skip?

Revision history for this message
Benoît (bcatelin) wrote :

Success!
Making the changes suggested by Olivier worked for me. prior to that I had the same error as in https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/2017304 (or at least it looks the same to me)
thank you

Revision history for this message
Choy Boy (choyboy) wrote :

I had a very similar problem documented here (https://bugs.launchpad.net/subiquity/+bug/2033344), the recommendation of setting "remove_duplicate_entries" and "probe_additional_os" to False worked for me.

Olivier Gayot (ogayot)
Changed in subiquity:
status: Fix Committed → Fix Released
Changed in curtin:
status: New → Invalid
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.