Bug 2090302

Summary: RFE: include PXE bootable core.0 image?
Product: [Fedora] Fedora Reporter: Chris Adams <linux>
Component: grub2Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: fmartine, lkundrak, pgnet.dev, pjones, rharwood
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.06-94.fc37 grub2-2.06-95.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-12 01:33:49 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:
Attachments:
Description Flags
sample patch to grub.macros none

Description Chris Adams 2022-05-25 13:43:34 UTC
I switched from syslinux to grub2 for BIOS PXE boot, but that requires running grub2-mknetdir any time I want to update to a newer version of grub2 (which requires running it on a compatible Linux system and grub2 version).  Would it be possible to include a pre-built core.0 (maybe called pxe-core.0 or something like that), so installing for basic PXE boot would just require copying the necessary files?

Ideally, it would be built with a few modules embedded.  I'm currently installing it like (run in my tftpboot directory):

        grub2-mknetdir \
            --directory /usr/lib/grub/i386-pc \
            --fonts="" \
            --locales="" \
            --themes="" \
            --modules="configfile gzio linux reboot test" \
            --net-directory . \
            --subdir .

And then I update the grub.cfg and configure DHCP to send i386-pc/core.0 for the bootfile.  If a pxe-core.0 was included, I could just extract the RPM into my tftpboot directory and point DHCP at it, which would be much easier (especially where my PXE server isn't Fedora).

For UEFI PXE boot, I can just extract RPMs and point at them, with no command needed to build a boot image (grubx64.efi is included).  It'd be nice to have the same for BIOS.

Comment 1 Chris Adams 2022-07-02 22:53:31 UTC
Is this something the grub2 maintainers have any interest in? I started looking at the grub2 SPEC to see about proposing a patch, but it is a lot to decode. If you would accept a patch, I'll keep working on it... just would like some feedback before I spend the time.

Comment 2 Chris Adams 2022-12-17 22:34:13 UTC
Created attachment 1933315 [details]
sample patch to grub.macros

Here's a sample patch to grub.macros to add the PXE core.0 to grub2-pc-modules. This means installing/extracting just that RPM and copying the /usr/lib/grub/i386-pc directory to the tftpboot directory, and adding a grub.cfg, gives a PXE-bootable setup (which makes it a lot easier to set up a legacy BIOS PXE boot environment using grub2 to replace syslinux).

Comment 3 Fedora Admin user for bugzilla script actions 2023-02-02 00:13:38 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Chris Adams 2023-04-04 17:32:34 UTC
I see this landed in rawhide's grub2 package, and tested that it works - thanks!

Any chance this might go into released Fedora versions as well? I know grub2 updates are not all that common, but figured I'd ask. If not, I think this BZ can be closed.

Comment 6 Fedora Update System 2023-04-10 17:21:24 UTC
FEDORA-2023-ff81d363bf has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-ff81d363bf

Comment 7 Fedora Update System 2023-04-10 17:21:25 UTC
FEDORA-2023-984a204558 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-984a204558

Comment 8 Fedora Update System 2023-04-11 02:26:45 UTC
FEDORA-2023-984a204558 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-984a204558

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-04-11 03:04:33 UTC
FEDORA-2023-ff81d363bf has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-ff81d363bf`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-ff81d363bf

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-04-12 01:33:49 UTC
FEDORA-2023-ff81d363bf has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2023-04-13 02:54:03 UTC
FEDORA-2023-49722a3067 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-49722a3067

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-04-18 01:39:14 UTC
FEDORA-2023-49722a3067 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.