Bug 2323348

Summary: tuned has a kernel-install scriptlet that breaks initrd loading
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 41CC: gabriello.ramirez, gary.buhrmaster, hdegoede, ipilcher, jskarvad, lukasz.wojnilowicz, mjg, pzacik, tomek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-04 13:35:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zbigniew Jędrzejewski-Szmek 2024-11-02 11:58:47 UTC
/usr/lib/kernel/install.d/92-tuned.install appends "$tuned_initrd" to 'initrd' line in BLS entries. This breaks boot with systemd-boot, because the initrd line is taken literally as the initrd file name. The BLS has no concept of variable expansion (https://uapi-group.org/specifications/specs/boot_loader_specification/#type-1-boot-loader-entry-keys).

(Also, a package like tuned should never touch the initrd. Imagine what would happen if every service tried to do that. Mangling boot loader options is _very_ dangerous and likely to break boot for people, and doing that for tuned seems very misguided.)

92-tuned.install also appends "$tuned_params" to 'options' line. This is ugly, but probably will not cause problems because unknown keys are ignored. This obviously needs to be removed too.


Reproducible: Always

Comment 1 Jaroslav Škarvada 2024-11-04 13:35:22 UTC

*** This bug has been marked as a duplicate of bug 2323514 ***

Comment 2 Jaroslav Škarvada 2024-11-04 13:41:02 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #0)
> (Also, a package like tuned should never touch the initrd.
>
This is actively used for very long time to add initrd overlays in some TuneD profiles.

> Imagine what
> would happen if every service tried to do that.
>
TuneD bootloader plugin is intended to do that.

> Mangling boot loader options
> is _very_ dangerous and likely to break boot for people, and doing that for
> tuned seems very misguided.)
>
Yes and that's why it's done in one place, in the TuneD profile. For years of usage on RHEL we got no report that it broke boot for anybody.

Comment 3 Jaroslav Škarvada 2024-11-04 16:42:24 UTC
Sorry for marking this (the earlier one) as a dupe, due to some mistake I already started using the bug 2323514 as the reference and I didn't want to add more mess by changing the reference number :)