RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1290369 - [RFE] Add switch to enforce EFI bootloader installation
Summary: [RFE] Add switch to enforce EFI bootloader installation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.3
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: ovirt-node-ng
TreeView+ depends on / blocked
 
Reported: 2015-12-10 10:49 UTC by Fabian Deutsch
Modified: 2016-01-27 17:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-15 02:20:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Fabian Deutsch 2015-12-10 10:49:44 UTC
Description of problem:
anaconda will currently only install the EFI related bootloader bits if EFI is detected on the system.

This is an issue if anaconda is used to build images (liveimg compat squashfs image), where EFI is not present at build time, but can likely be present at installation time.

The currently solution is to add the necessary packages to the kickstart as described in [1] and [2].

To centralize the knowledge about what packages are required, it would be good if the bootloader directive of anaconda had a switch to enforece that the EFI bootloader bits get instaleld - even if no EFI system was dected.

i.e.:

bootloader --efi

[1] https://www.brianlane.com/creating-live-isos-with-livemedia-creator.html
[2] http://lorax.readthedocs.org/en/latest/livemedia-creator.html#kickstarts

Comment 1 Brian Lane 2015-12-12 01:38:41 UTC
This isn't really possible. I looked into doing this for lmc and ran into trouble with grub2 for a start. Various tools detect the system they are running on and change their behavior based on it. If you want to create UEFI disk images you need to create them on a UEFI system, or VM.

Comment 2 Fabian Deutsch 2015-12-14 06:49:37 UTC
Right. I can imagine that setting the EFI bootloader will fail, i.e. grub2-efi, because it can not write the relevant EFI variables.

But wouldn't it make sense to at least provide a switch for lmc or anaconda to package the necessary packages?

I'm thinking about the use case where lmc is used to generate an liveimg, and then EFI can be installed depending on the target system upon installation.

Anaconda will do the EFI installation, but this requires that the necessary packages are part of the liveimg.

Comment 3 Brian Lane 2015-12-15 02:20:20 UTC
If you are building an installer image this already works, you don't need any switches. Simply include the grub2-efi package in the %packages section of the kickstart. eg. https://github.com/rhinstaller/lorax/blob/master/docs/fedora-livemedia.ks

Comment 4 Fabian Deutsch 2015-12-15 06:08:48 UTC
Right, but does this also install support for SecureBoot?

And: It's not about adding this package or not to the kickstarts.
It is really more about keeping the responsibilities to add this high-level EFI functionality in lmc/anaconda.
By keeping this package based solution, the responsibility is on the side of the image builder, to make sure that the right (maybe in future changing) packages are included in the kickstart,
if there was a high-level efi switch, then the responsibility would stay in anaconda - like it already is anaconda's responsibility today to add the "right packages" (tm) if an EFI system is detected.

Comment 5 Brian Lane 2016-01-25 19:48:57 UTC
Good question, if you are making a live installer iso and include the @anaconda-tools group it will pull in shim, grub2-efi, etc. Otherwise you will need to add the correct packages for the type of iso you want to build.

UEFI disk images should add shim if they aren't including the group. But you have to build a UEFI disk image on a UEFI system (or VM) so shim will get added automatically.

Comment 6 Fabian Deutsch 2016-01-27 14:48:13 UTC
My assumption is that anaconda (and/or lmc) is intended for image builds as well - And under this assumption I don't understand why anaconda/lmc does not bring the features to allow building an image which can also be booted on UEFI machines.

Comment 7 Brian Lane 2016-01-27 17:39:55 UTC
The problem is that many of the tools used by anaconda assume they are running on the targeted platform so the disk image can't be setup for UEFI when built inside a BIOS vm. Creating isos that work on BIOS and UEFI is possible because the boot sequence is created by lmc, not anaconda and associated tools.


Note You need to log in before you can comment on or make changes to this bug.