Bug 1600414

Summary: GRUB_EARLY_INITRD_LINUX_CUSTOM in /etc/default/grub ignored by grubby
Product: [Fedora] Fedora Reporter: Rob Hicks <rob.hicks.wm>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 29CC: ajacocks, bernie+fedora, cavannaluca, degts, dominik, fhirtz, fmartine, jperrin, lkundrak, michele, mrdest, paul+rhbugz, pjones, pkrupa, rsandu, sdunne
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 22:29:24 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 Rob Hicks 2018-07-12 08:09:08 UTC
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):


How reproducible:
Never works

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_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
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"
GRUB_DISABLE_RECOVERY="false"
GRUB_EARLY_INITRD_LINUX_CUSTOM="acpi-override.img"
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
initrdefi /initramfs-4.17.3-200.fc28.x86_64.img

Actual results:
microcode is ignored and grub.cfg has to be hand edited which doesn't survive kernel upgrades

Expected results:
Maintenance free way of preloading microcode that will survive kernel upgrades

Additional info:

Comment 1 Luca Cavanna 2018-07-15 18:47:16 UTC
I can confirm this, running `4.17.4-200.fc28.x86_64` .

Comment 2 J. Alexander Jacocks 2018-08-01 20:05:36 UTC
I can also confirm this...this prevents applying a DSDT fix on the Lenovo ThinkPad X1 Carbon 6th generation.

Comment 3 Pawel Krupa 2018-08-11 21:21:03 UTC
I can confirm this. Script responsible for generating linux section in grub (10_linux) is lacking references to GRUB_EARLY_INITRD_LINUX_CUSTOM variable.

Environment:

$ grub2-mkconfig --version
grub2-mkconfig (GRUB) 2.03

dnf reports grub in version 2.02-38.fc28

Comment 4 Jim Perrin 2018-08-23 22:22:40 UTC
Confirmed here as well, for the same DSDT fix on the gen6 carbon.

Comment 5 Michal Rdest 2018-08-24 06:25:14 UTC
I'm also hitting this on 6th gen Carbon.
Kernel 4.17.14-202.fc28.x86_64

Comment 6 sdunne 2018-08-31 18:58:04 UTC
Confirmed on my Lenovo ThinkPad X1 Carbon g6.

Comment 7 Bernie Innocenti 2019-02-10 18:14:08 UTC
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).

Comment 8 Javier Martinez Canillas 2019-02-11 11:37:48 UTC
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.

Comment 9 Ben Cotton 2019-05-02 19:17:26 UTC
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.

Comment 10 Ben Cotton 2019-05-02 19:42:12 UTC
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.

Comment 11 Dominik 'Rathann' Mierzejewski 2019-05-07 12:19:11 UTC
Bumping to rawhide and reassigning to grubby as Bernie and Javier confirmed it.

Comment 12 Ben Cotton 2019-10-31 19:22:35 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
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 '29'.

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 29 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.

Comment 13 Ben Cotton 2019-11-27 22:29:24 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.