Bug 2323348 - tuned has a kernel-install scriptlet that breaks initrd loading
Summary: tuned has a kernel-install scriptlet that breaks initrd loading
Keywords:
Status: CLOSED DUPLICATE of bug 2323514
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-02 11:58 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2024-11-04 16:47 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-04 13:35:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 :)


Note You need to log in before you can comment on or make changes to this bug.