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.
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.
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).
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
https://src.fedoraproject.org/rpms/grub2/pull-request/25
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.
FEDORA-2023-ff81d363bf has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-ff81d363bf
FEDORA-2023-984a204558 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-984a204558
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.
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.
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.
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.
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.