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

Installation image doesn't boot in legacy mode on some systems #8058

Closed
marmarek opened this issue Feb 22, 2023 · 8 comments · Fixed by QubesOS/qubes-builderv2#34 or QubesOS/qubes-installer-qubes-os#55
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: installer diagnosed Technical diagnosis has been performed (see issue comments). P: major Priority: major. Between "default" and "critical" in severity. pr submitted A pull request has been submitted for this issue. 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

Qubes OS release

R4.2

Brief summary

Weekly build doesn't boot in legacy mode on some systems, it does work in UEFI mode on the same system.

Steps to reproduce

  1. Get weekly ISO
  2. Switch boot mode to legacy (only)
  3. Try to boot installer

Expected behavior

Installer starts

Actual behavior

System reset before showing grub menu.
It affects only some systems. SeaBIOS (either in openqa, or as a coreboot payload) works fine, but Thinkpad P52 or HP EliteBook 840 G4 does not.

Additional context

There are several changes in the installation image compared to R4.1:

  • gpt partition table
  • grub2 instead of isolinux

(both inherited from Fedora 37)

Reported by @GWeck at https://forum.qubes-os.org/t/qubes-os-4-2-signed-weekly-builds/16929/4

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: installer P: major Priority: major. Between "default" and "critical" in severity. labels Feb 22, 2023
@marmarek marmarek added this to the Release 4.2 milestone Feb 22, 2023
@marmarek
Copy link
Member Author

The same issue affects Fedora Workstation Live 37, at least on that Thinkpad.

@marmarek
Copy link
Member Author

Installation ISO with MBR partition table (but still using grub2 for legacy, nothing else changed) works just fine. And then installed system does not boot, I guess that's also because of GPT. A this point, it's pretty clear it's indeed GPT to blame, even though in theory it should work (the boot sector is populated with legacy boot code).
It's this change in Fedora: https://www.fedoraproject.org/wiki/Changes/GPTforBIOSbyDefault
I'm going to revert the whole thing.

@andrewdavidwong andrewdavidwong added the diagnosed Technical diagnosis has been performed (see issue comments). label Feb 23, 2023
@marmarek
Copy link
Member Author

The closest upstream issue about the same thing: https://bugzilla.redhat.com/show_bug.cgi?id=2140385

marmarek added a commit to marmarek/qubes-anaconda that referenced this issue Feb 24, 2023
This confuses some firmware that refuse to boot in legacy mode from such
disk. See referenced issue for details.

This effectively reverts
https://www.fedoraproject.org/wiki/Changes/GPTforBIOSbyDefault

QubesOS/qubes-issues#8058
marmarek added a commit to marmarek/qubes-installer-qubes-os that referenced this issue Feb 24, 2023
Some firmware refuse to boot in legacy mode if they find GPT on the
disk. See referenced issue for details.

This is related to reverting
https://www.fedoraproject.org/wiki/Changes/GPTforBIOSbyDefault
but in fact upstream changed this as a side effect of migrating to grub:
https://www.fedoraproject.org/wiki/Changes/BIOSBootISOWithGrub2

Fixes QubesOS/qubes-issues#8058
@andrewdavidwong andrewdavidwong added the pr submitted A pull request has been submitted for this issue. label Feb 24, 2023
@marmarek
Copy link
Member Author

Additionally, GPT on legacy is incompatible with some versions of Heads. Not because of GPT itself, but because anaconda creates "BIOS boot" as the first partition (which is correct thing to do to boot legacy with GPT), but Heads expects the first partition to be /boot.

@rustybird
Copy link

That must also make Heads incompatible with > 2 TiB drives: Even the R4.1.0 installer automatically uses GPT in this case, and creates the BIOS Boot partition.

@marmarek
Copy link
Member Author

That must also make Heads incompatible with > 2 TiB drives: Even the R4.1.0 installer automatically uses GPT in this case, and creates the BIOS Boot partition.

This only means you need newer Heads, the issue applies only to older versions.

@GWeck
Copy link

GWeck commented Mar 1, 2023

I checked now with the installation file Qubes-4.2.202303010603-x86_64.iso. Installation could be started and configured from legacy BIOS on my HP EliteBook 840 G4. So it works now. Thanks a lot! (I did not really start the installation, because then I would have lost my current test system.)

@GWeck
Copy link

GWeck commented Mar 11, 2023

Installation media for R4.1.2-rc2 is o.k., too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: installer diagnosed Technical diagnosis has been performed (see issue comments). P: major Priority: major. Between "default" and "critical" in severity. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
4 participants