Modificar Argumentos del Kernel

Modificar Argumentos del Kernel vía Ignition

Puede especificar argumentos del kernel en un config de Butane utilizando la sección kernel_arguments.

Ejemplo: desactivar todas las mitigaciones de vulnerabilidades de CPU

Aquí hay un ejemplo en la sección kernelArguments la cual intercambia mitigations=auto,nosmt a mitigations=off para desactivar todas las mitigaciones de vulnerabilidad de CPU:

variant: fcos
version: 1.6.0
kernel_arguments:
  should_exist:
    - mitigations=off
  should_not_exist:
    - mitigations=auto,nosmt

Modificar la Configuración de Consola Durante Instalación de Metal Desnudo

coreos-installer has special support for changing the console configuration when performing a bare-metal installation. This functionality can be used to add console arguments to the kernel command line and equivalent parameters to the GRUB bootloader configuration. For more information, see Emergency Console Access. For more information about bare metal installs, see Installing CoreOS on Bare Metal.

Modifying Kernel Arguments on Existing Systems

Kernel arguments changes are managed by rpm-ostree via the rpm-ostree kargs subcommand. Changes are applied to a new deployment and a reboot is necessary for those to take effect.

Añadiendo argumentos del kernel

You can append kernel arguments. An empty value for an argument is allowed:

$ sudo rpm-ostree kargs --append=KEY=VALUE
Ejemplo: Añadir memoria reservada para soporte Kdump
$ sudo rpm-ostree kargs --append='crashkernel=256M'

Eliminación de argumentos del kernel existentes

Puede eliminar un par clave/valor de argumento de kernel específico o un argumento completo con un solo par clave/valor:

$ sudo rpm-ostree kargs --append=KEY=VALUE
Example: Re-enable SMT on vulnerable CPUs
$ sudo rpm-ostree kargs --delete=mitigations=auto,nosmt
Example: Update an existing system from cgroupsv1 to cgroupsv2 and immediately reboot
$ sudo rpm-ostree kargs --delete=systemd.unified_cgroup_hierarchy --reboot

Replacing existing kernel arguments

You can replace an existing kernel argument with a new value. You can directly use KEY=VALUE if only one value exists for that argument. Otherwise, you can specify the new value using the following format:

$ sudo rpm-ostree kargs --replace=KEY=VALUE=NEWVALUE
Example: Disable all CPU vulnerability mitigations
$ sudo rpm-ostree kargs --replace=mitigations=auto,nosmt=off

This switches mitigations=auto,nosmt to mitigations=off to disable all CPU vulnerability mitigations.

Interactive editing

To use an editor to modify the kernel arguments:

$ sudo rpm-ostree kargs --editor