Bug 1858921

Summary: Anaconda cannot make a hybrid BIOS+UEFI installation for producing disk images
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: anaconda-maint-list, bugzilla, ckellner, daltonminer, dustymabe, fedora, fedoraproject, javierm, jkonecny, johannbg, jonathan, kellin, mattdm, pjones, sricharan.ramanujam, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-20 02:32:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neal Gompa 2020-07-20 18:41:47 UTC
Description of problem:
It has been requested that we produce Fedora Cloud images that work natively in UEFI as well as BIOS. However, the tooling used to build Fedora Cloud images is powered by Anaconda, which gives no method to install both types of boot processes onto the same disk.

This is a huge problem for making portable cloud disk images.

Version-Release number of selected component (if applicable):
33.23-1.fc33


Additional info:
This is being requested because Microsoft Azure Gen 2 hypervisors are UEFI-only, and no Fedora Cloud image can boot with UEFI.

Comment 1 Matthew Miller 2020-07-21 00:31:05 UTC
Can osbuild do this?

Comment 2 Neal Gompa 2020-07-21 00:49:28 UTC
If the docstring in the grub2 stage code[0] isn't a lie, it seems it can.

I do know that kiwi[1] can do this, as I've made plenty of images with it that are hybrid bootable.

I have not tested to see if osbuild can do this. I do, however, have other concerns about it[2].

[0]: https://github.com/osbuild/osbuild/blob/be6358d73fc16ca875ee54e51c8164899f711273/stages/org.osbuild.grub2#L30-L37
[1]: https://osinside.github.io/kiwi/
[2]: https://github.com/osbuild/osbuild/issues/455

Comment 3 Christian Kellner 2020-07-21 15:23:55 UTC
(In reply to Matthew Miller from comment #1)
> Can osbuild do this?

Yes. There is a (somewhat outdated Fedora 30) example that show full hybrid boot support: https://github.com/osbuild/osbuild/blob/master/samples/f30-bootpart-hybrid.json#L860

Comment 4 Chris Murphy 2020-07-22 02:49:14 UTC
Which is easier and more robust: hybrid UEFI + BIOS media, or just produce separate images? Anaconda doesn't really have a concept of hybrid installs, nor does grub2-install which looks like its behavior now hings on whether UEFI or BIOS firmware is detected when it runs.

Comment 5 Neal Gompa 2020-07-26 23:47:20 UTC
(In reply to Chris Murphy from comment #4)
> Which is easier and more robust: hybrid UEFI + BIOS media, or just produce
> separate images? Anaconda doesn't really have a concept of hybrid installs,
> nor does grub2-install which looks like its behavior now hings on whether
> UEFI or BIOS firmware is detected when it runs.

We don't have a way to produce separate images because we cannot fake a UEFI environment for Anaconda to be tricked into producing a UEFI bootable image. Our servers do not boot via UEFI, and even if they did, it'd be very dangerous to mount the UEFI data into the mock chroot for this to happen.

Comment 6 Ben Cotton 2020-08-11 13:48:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 7 Chris Murphy 2021-06-20 02:32:42 UTC
I'm going to close this since it'll be fixed as part of https://fedoraproject.org/wiki/Changes/FedoraCloudHybridBoot

Any related bugs discovered should be set to block tracker bug 1972377