From 82612973247af7be802e846c8aaf0980abad485f Mon Sep 17 00:00:00 2001 From: David Cassany Date: Thu, 6 Jun 2024 12:58:20 +0200 Subject: [PATCH] Workaround to remove pre-existing elemental initrds For derived images already including an elemental generated initrd we should remove them specially if the kernel version changes, as the new one would not overwrite the previous one and leave two elemental initrds inside /boot. Signed-off-by: David Cassany --- .obs/dockerfile/micro-rt-os/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.obs/dockerfile/micro-rt-os/Dockerfile b/.obs/dockerfile/micro-rt-os/Dockerfile index 43bc33dd7..78219e9cd 100644 --- a/.obs/dockerfile/micro-rt-os/Dockerfile +++ b/.obs/dockerfile/micro-rt-os/Dockerfile @@ -58,5 +58,6 @@ RUN zypper clean --all && \ >/var/log/lastlog && \ rm -rf /boot/vmlinux* -# Rebuild initrd to setup dracut with the boot configurations +# Rebuild initrd to setup dracut with the boot configurations and remove pre-existing initrd from baremetal image +RUN rm -fv /boot/elemental.initrd* RUN elemental init --force elemental-rootfs,elemental-sysroot,grub-config,dracut-config,cloud-config-essentials,elemental-setup,boot-assessment