diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl index 7d7a7c4c..0a6d9825 100644 --- a/share/templates.d/99-generic/runtime-cleanup.tmpl +++ b/share/templates.d/99-generic/runtime-cleanup.tmpl @@ -70,7 +70,7 @@ removepkg tigervnc-license ttmkfdir xml-common xorg-x11-font-utils removepkg xorg-x11-server-common yum-utils firewalld ## other removals -remove /boot /home /media /opt /srv /tmp/* +remove /home /media /opt /srv /tmp/* remove /usr/etc /usr/games /usr/local /usr/tmp remove /usr/share/doc /usr/share/info /usr/share/man /usr/share/gnome remove /usr/share/mime/application /usr/share/mime/audio /usr/share/mime/image @@ -333,6 +333,11 @@ removefrom ${product.name}-logos /usr/share/{firstboot,gnome-screensaver,kde4,pi runcmd find ${root} -name "*.pyo" -type f -delete runcmd find ${root} -name "*.pyc" -type f -exec ln -sf /dev/null {} \; +## cleanup /boot/ leaving vmlinuz, and .*hmac files +runcmd chroot ${root} find /boot \! -name "vmlinuz*" \ + -and \! -name ".vmlinuz*" \ + -and \! -name boot -delete + ## remove any broken links in /etc or /usr ## (broken systemd service links lead to confusing noise at boot) ## NOTE: not checking /var because we want to keep /var/run diff --git a/share/templates.d/99-generic/runtime-install.tmpl b/share/templates.d/99-generic/runtime-install.tmpl index f69ac17b..b4a689ac 100644 --- a/share/templates.d/99-generic/runtime-install.tmpl +++ b/share/templates.d/99-generic/runtime-install.tmpl @@ -60,7 +60,7 @@ installpkg glibc-all-langpacks installpkg plymouth ## extra dracut modules -installpkg anaconda-dracut dracut-network dracut-config-generic +installpkg anaconda-dracut dracut-network dracut-config-generic dracut-fips ## rescue needs this installpkg cryptsetup diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 04a32bc5..1f9ac6e4 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -340,7 +340,7 @@ class Lorax(BaseLoraxClass): workdir=self.workdir) logger.info("rebuilding initramfs images") - dracut_args = ["--xz", "--install", "/.buildstamp", "--no-early-microcode"] + dracut_args = ["--xz", "--install", "/.buildstamp", "--no-early-microcode", "--add", "fips"] anaconda_args = dracut_args + ["--add", "anaconda pollcdrom qemu qemu-net"] # ppc64 cannot boot an initrd > 32MiB so remove some drivers