kernel-install: Write layout=ostree to /etc instead of /usr/lib
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//
- Old kernel directories to not be properly cleaned up
- bootc container lint failures
Per kernel-install(8), /etc/kernel/install.conf takes precedence over /usr/lib/kernel/install.conf. By placing the configuration in /etc/, the layout=ostree setting survives systemd package upgrades since /etc/kernel/install.conf is not owned by any package.
Pairs with: https://github.com/coreos/rpm-ostree/pull/5551 Closes: RHEL-128312 Assisted-by: OpenCode (Opus 4.5) Signed-off-by: Joseph Marrero Corchado jmarrero@redhat.com
Edited by Joseph Marrero Corchado