Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qubes-dist-upgrade breaks when multiple “Qubes” boot menu entries are present #7004

Closed
marmarek opened this issue Oct 24, 2021 · 3 comments
Labels
C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Milestone

Comments

@marmarek
Copy link
Member

How to file a helpful issue
Reported at https://forum.qubes-os.org/t/qubes-dist-upgrade-breaks-when-multiple-qubes-boot-menu-entries-are-present/7203

Qubes OS release

R4.1

Brief summary

For reasons™ I currently have multiple EFI boot entries that contain the text “Qubes”:

Boot0000* Qubes
Boot0001* Qubes 4.0
[...]

During an in-place upgrade with qubes-dist-upgrade, the EFI menu is updated in stage 5 of the update process.
For me, this stage failed with error message “Invalid bootnum value0000\n0001”.

The reason is that the upgrade script searches for the correct boot entry by issuing the command efibootmgr -v | grep "Qubes" | awk '{print $1}'.

In case of multiple matching lines this returns more than one number, causing the error.

Steps to reproduce

See above.

Expected behavior

Handle multiple boot entries correctly (adjust only one)

Actual behavior

Broken setup.

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Oct 24, 2021
@marmarek marmarek added this to the Release 4.1 milestone Oct 24, 2021
@andrewdavidwong andrewdavidwong added C: other diagnosed Technical diagnosis has been performed (see issue comments). labels Oct 25, 2021
@marmarek
Copy link
Member Author

Regression test at https://openqa.qubes-os.org/tests/23378#step/release_upgrade/35 (fails currently, as no fix yet)

marmarek added a commit to marmarek/qubes-dist-upgrade that referenced this issue Oct 29, 2021
Prefer the currently boot entry in EFI variables, regardless of its
name. Only when not found, fallback to looking for anything with "Qubes"
in name. But then, take the first entry, not all of them.

This makes it work with multiple "Qubes" boot entries.

Fixes QubesOS/qubes-issues#7004
@marmarek
Copy link
Member Author

marmarek commented Nov 1, 2021

Fixed

@marmarek marmarek closed this as completed Nov 1, 2021
@qubesos-bot
Copy link

Automated announcement from builder-github

The component dist-upgrade (including package qubes-dist-upgrade-4.0.3-1.fc25) has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

marmarek added a commit to QubesOS/openqa-tests-qubesos that referenced this issue Nov 20, 2021
This especially test dealing with pre-existing EFI boot variables.
This is regression test for QubesOS/qubes-issues#7004
@andrewdavidwong andrewdavidwong added C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another and removed C: other labels Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. r4.0-dom0-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

3 participants