Skip to content

/etc/bootc/kargs.d #899

Closed
Closed

Description

@kfox1111

It would be useful to have /etc/bootc/kargs.d in addition to /usr/lib/bootc/kargs.d get merged in.

Example use case: If you have a mixed hardware cluster, you often will have a different set of console args related to the serial console, but otherwise all the nodes are the same. You could make custom images for each hardware class, but if there was an /etc/bootc/kargs.d, you could just drop that arg in there and the same image would work everywhere.

Activity

  1. added
    enhancement
    area/client
    on Nov 15, 2024
  2. cgwalters commented on Nov 15, 2024

    @cgwalters
    Member

    Example use case: If you have a mixed hardware cluster,

    We support conditionalizing kargs on architecture right now https://containers.github.io/bootc/building/kernel-arguments.html#usrlibbootckargsd

    But yes per our discussion sometimes there are kargs that are dependent on (platform, arch) where "platform" is like "gcp", "aws", "metal" etc.

  3. kfox1111 commented on Nov 15, 2024

    @kfox1111
    Author

    Yeah, where I usually have been seeing it though, the arch is x86_64. Just different serial ports. So, not too much to conditional on.

  4. plnordquist-pnnl commented on Nov 26, 2024

    @plnordquist-pnnl

    I will say that when using Anaconda to kickstart and install a bootc image, I was surprised it did not preserve the console argument from Anaconda automatically. pyanaconda parses the kernel arguments passed in through PXE boot and preserves the console argument when writing the bootloader configuration for a normal kickstart. I'm able to add the console argument manually with the ostreecontainer install by using the bootloader command and the --append argument.

  5. champtar commented on Jun 6, 2025

    @champtar
    Contributor

    Currently tuned can set kargs on classic and rpm-ostree systems, so bootc really need a supported way to change kargs 'at runtime' instead of being forced to build another image, /etc/bootc/kargs.d would definitely be great

  6. cgwalters commented on Jun 6, 2025

    @cgwalters
    Member

    so bootc really need a supported way to change kargs 'at runtime'

    We have the same one we've always had to be clear:
    https://bootc-dev.github.io/bootc//building/kernel-arguments.html#kernel-arguments-injected-at-installation-time

    Should we have some sugar for it? Perhaps...

  7. kfox1111 commented on Jun 6, 2025

    @kfox1111
    Author

    @cgwalters can you change it after install time without a bootc image update though?

  8. champtar commented on Jun 6, 2025

    @champtar
    Contributor

    This is at install time only, no ? I need to change it after install, and ideally have tuned integration at some point.
    I know I can just edit config in loader/entries, but would prefer a bit of sugar to do it :)

    My use case is a software appliance video encoder deployed on baremetal, I want 1 ISO installer, not 2 or 3. Some "workflow" require strict(er) latency, so we put some extra kargs for that, but those kargs reduce performance a bit and or increase power consumption, so we can't just always put them.

  9. cgwalters commented on Jun 6, 2025

    @cgwalters
    Member

    @cgwalters can you change it after install time without a bootc image update though?

    Yes. The boot loader reads the arguments from that file.

    This is at install time only, no ? I need to change it after install, and ideally have tuned integration at some point.
    I know I can just edit config in loader/entries, but would prefer a bit of sugar to do it :)

    Your two statements contradict. Yes there is tuned integration (which has at least one bug we're fixing redhat-performance/tuned#690 ).

    That said bigger picture there's definitely work to do here. The thing that's not exciting about /etc/bootc/kargs.d is I was already not totally happy with introducing the /usr/lib version.

    The problem tuned has right now is that it was designed for a yum system with only one bootable root, and there it's usually expected to mutate the kargs live.

    But I think what we often really want is to only mutate the kargs for the next boot. Doing that would require generalized "pre-upgrade" support (a bit related to #640 ) so we fetch the tuned config from the new image, and have it basically "generate" something like /run/bootc/kargs.d during the update which we then apply. This would mean tuned wouldn't need to "reconcile" kargs itself.

    Also, it would fix the problem that today the first install necessarily implies a reconciliation.

  10. champtar commented on Jun 6, 2025

    @champtar
    Contributor

    I was thinking for a future without rpm-ostree on the target, but if tuned can still use rpm-ostree kargs today that's a good news !

    But I think what we often really want is to only mutate the kargs for the next boot. Doing that would require generalized "pre-upgrade" support (a bit related to #640 ) so we fetch the tuned config from the new image, and have it basically "generate" something like /run/bootc/kargs.d during the update which we then apply. This would mean tuned wouldn't need to "reconcile" kargs itself.

    Also need to know which profile to use from the current /etc, but I like the idea very much

  11. cgwalters commented on Jun 11, 2025

    @cgwalters
    Member

    #1363 also relates to this

  12. cgwalters commented on Jan 27, 2026

    @cgwalters
    Member

    cc redhat-performance/tuned#821 (comment)

    If we do do a bootc kargs type thing we should enforce the use of something like --source and handle reconciling

  13. 16 remaining items

  14. kfox1111 commented on Apr 24, 2026

    @kfox1111
    Author

    did the merged feature actually implement /etc/bootc/kargs.d? If not, I think this should be reopened.

  15. cgwalters commented on Apr 27, 2026

    @cgwalters
    Member

    did the merged feature actually implement /etc/bootc/kargs.d? If not, I think this should be reopened.

    It added a mechanism for per-machine changes, which is I believe what was desired here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clientdependenciesenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions