mirror of
https://gitlab.com/fedora/bootc/base-images.git
synced 2026-08-30 21:10:44 +00:00
kernel-install: Use drop-in config to preserve layout=ostree
When systemd is upgraded via `dnf upgrade`, the systemd-udev package overwrites /usr/lib/kernel/install.conf with its default template, removing the layout=ostree setting. This breaks rpm-ostree's kernel-install integration in bootc container builds, causing: - Initramfs to be generated in /boot/ instead of /lib/modules/<kver>/ - Old kernel directories to not be properly cleaned up - bootc container lint failures Per kernel-install(8), configuration in install.conf.d/ directories is merged with install.conf. By placing the layout=ostree setting in /usr/lib/kernel/install.conf.d/00-kernel-layout.conf, it will not be overwritten when systemd-udev updates install.conf. Closes: RHEL-128312 Assisted-by: OpenCode (Opus 4.5) Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
This commit is contained in:
parent
d6531df345
commit
3e1e61277e
1 changed files with 2 additions and 1 deletions
|
|
@ -4,10 +4,11 @@ postprocess:
|
|||
#!/usr/bin/env bash
|
||||
set -xeuo pipefail
|
||||
source /usr/lib/os-release
|
||||
mkdir -p /usr/lib/kernel/install.conf.d
|
||||
echo -e "# kernel-install will not try to run dracut and allow rpm-ostree to\n\
|
||||
# take over. Rpm-ostree will use this to know that it is responsible\n\
|
||||
# to run dracut and ensure that there is only one kernel in the image\n\
|
||||
layout=ostree" | tee /usr/lib/kernel/install.conf > /dev/null
|
||||
layout=ostree" | tee /usr/lib/kernel/install.conf.d/00-kernel-layout.conf > /dev/null
|
||||
# By default dnf keeps multiple versions of the kernel, with this
|
||||
# configuration we tell dnf to treat the kernel as everything else.
|
||||
# https://dnf.readthedocs.io/en/latest/conf_ref.html#main-options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue