Description of problem:
Specifying GRUB_EARLY_INITRD_LINUX_CUSTOM entry in /etc/default/grub is ignored
by grub2-mkconfig. I have read that with grub 2.02 and later this can be specified for a clean way to load microcode without hand editing /boot/efi/EFI/fedora/grub.cfg
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Put acpi-override.img in /boot/ [this is a valid microcode file that will load properly by hand-editing grub.cfg as described above]
2. Add GRUB_EARLY_INITRD_LINUX_CUSTOM entry in /etc/default/grub as follows:
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb q
uiet resume=/dev/mapper/fedora-swap mem_sleep_default=deep"
3. Run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
4. Examine entries in /boot/efi/EFI/fedora/grub.cfg and see that acpi_override.img isn't preloaded in lines like this
microcode is ignored and grub.cfg has to be hand edited which doesn't survive kernel upgrades
Maintenance free way of preloading microcode that will survive kernel upgrades
I can confirm this, running `4.17.4-200.fc28.x86_64` .
I can also confirm this...this prevents applying a DSDT fix on the Lenovo ThinkPad X1 Carbon 6th generation.
I can confirm this. Script responsible for generating linux section in grub (10_linux) is lacking references to GRUB_EARLY_INITRD_LINUX_CUSTOM variable.
$ grub2-mkconfig --version
grub2-mkconfig (GRUB) 2.03
dnf reports grub in version 2.02-38.fc28
Confirmed here as well, for the same DSDT fix on the gen6 carbon.
I'm also hitting this on 6th gen Carbon.
Confirmed on my Lenovo ThinkPad X1 Carbon g6.
Still present on rawhide (but not bumping the bug version, not sure whether it should be set to the oldest or the latest affected release).
I've tried the following on the latest Fedora Rawhide with grub2-tools-2.02-68.fc30.x86_64:
$ touch /boot/acpi-override.img
$ echo GRUB_EARLY_INITRD_LINUX_CUSTOM="acpi-override.img" >> /etc/default/grub
$ grub2-mkconfig 2>/dev/null | grep acpi-override.img
initrd /acpi-override.img /initramfs-5.0.0-0.rc4.git3.1.fc30.x86_64.img
initrd /acpi-override.img /initramfs-5.0.0-0.rc2.git1.1.fc30.x86_64.img
initrd /acpi-override.img /initramfs-4.20.0-0.rc5.git3.1.fc30.x86_64.img
initrd /acpi-override.img /initramfs-0-rescue-036f3661be4047b6b678d491f76df6f4.img
So $SUBJECT is misleading in the sense that grub2-mkconfig doesn't ignore GRUB_EARLY_INITRD_LINUX_CUSTOM.
The issue though is that grubby doesn't support this, so new menu entries added by installing kernels won't have the initrds defined in GRUB_EARLY_INITRD_LINUX_CUSTOM. That means that grub2.cfg will have to be re-generated using grub2-mkconfig after each kernel install.
On Rawhide though the default is to use a BLS configuration now (GRUB_ENABLE_BLSCFG=true in /etc/default/grub) and the BLS support honours GRUB_EARLY_INITRD_LINUX_CUSTOM. The grub2-mkconfig sets the early_initrd variable in grubenv with the value set in GRUB_EARLY_INITRD_LINUX_CUSTOM, and the blscfg module pre-pends early_initrd to the initrd field in the BLS snippet. So there's no need to take any action after a kernel install on a BLS configuration to have all the kernel entries to pre-pend the early initrds.
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 28 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Bumping to rawhide and reassigning to grubby as Bernie and Javier confirmed it.