Modifying Kernel Arguments

There are multiple ways to configure kernel arguments.

Via /usr/lib/bootc/kargs.d

In most cases you should use /usr/lib/bootc/kargs.d/ method of configuring kernel arguments.

For details, please refer to the upstream documentation.

Via this method, kernel arguments can be applied at install time as well as updated "day 2" via bootc upgrade/switch.

The remainder below covers special cases; by using Anaconda or bootc-image-builder config, kernel arguments can be defined per-install/per-machine or to be embedded in a disk image.

Kernel arguments defined below are carried forward across bootc upgrade, but are otherwise unmanaged state - bootc will not change them.

Install time kernel arguments with Anaconda

The Anaconda bootloader kickstart verb can be used to configure kernel arguments.

Note that like everything else written via Anaconda, once set these arguments become "unmanaged" machine-specific state.

Install time kernel arguments with bootc-image-builder

The bootc-image-builder configuration file supports customizations.kernel.append. See the upstream documentation.

Note that like everything else set via the bootc-image-builder install config, once set these arguments become "unmanaged" machine-specific state.

Modifying Kernel Arguments via direct bootc install

When invoking bootc install directly, there is also support for passing --karg. These kernel arguments also become unmanaged state.

Finally, there is also support for kernel arguments in bootc install config. However, this logic predates the "day 2 updatable" kernel argument support in /usr/lib/bootc/kargs.d and the use cases for install-time only kernel arguments defined in the container image are rare.

Embedding kernel arguments in custom kernels

If you are using a custom kernel, you can embed custom arguments into the kernel binary.

Modifying Kernel Arguments on Existing Systems

The canonical kernel arguments are maintained in /boot/loader/entries. While the /boot filesystem is expected to be mounted read-only by default, it is supported to edit these files directly:

$ unshare -m /bin/bash -c 'mount -o remount,rw /boot; bash'
$ $editor /boot/loader/entries/...

Note that doing so will currently change the existing bootloader entry.

The current base images do include rpm-ostree which has rpm-ostree kargs; however, it is likely that rpm-ostree will be dropped from the default base image.