initramfs: Omit more dracut modules by default

The size of the initrd is becoming an issue on existing installations
that have a small /boot partition.

See: https://github.com/fedora-silverblue/issue-tracker/issues/676

So let's drop a few dracut modules that are not using from the initrd to
save on space in /boot:

- fips & fips-crypto-policies: FIPS is not supported on Fedora
  See: https://fedoraproject.org/wiki/Changes/RemoveFipsModeSetup
  See: https://docs.fedoraproject.org/en-US/bootc/fips-crypto-policies/
- lunmask: Do not include support from booting from a LUN SAS devices as this is
  not commonly used on laptops and desktops
- memstrack: memstrack is for debug and development
- modsign: We don't include kernel module keys in the initrd
- nss-softokn: NSS is not included in the initrd
This commit is contained in:
Timothée Ravier 2026-04-28 22:15:43 +02:00
parent 13a0d948a6
commit 657eb24789

View file

@ -35,3 +35,23 @@ postprocess:
# Add support for systemd-cryptsetup and tpm2-tss LUKS locking
add_dracutmodules+=" tpm2-tss systemd-pcrphase "
EOF
- |
#!/usr/bin/env bash
set -xeuo pipefail
cat > /usr/lib/dracut/dracut.conf.d/20-atomic-omit.conf << 'EOF'
# FIPS is not supported on Fedora
# See: https://fedoraproject.org/wiki/Changes/RemoveFipsModeSetup
# See: https://docs.fedoraproject.org/en-US/bootc/fips-crypto-policies/
omit_dracutmodules+=" fips fips-crypto-policies "
# Do not include support from booting from a LUN SAS devices as this is not
# commonly used on laptops and desktops
omit_dracutmodules+=" lunmask "
# memstrack is for debug and development
omit_dracutmodules+=" memstrack "
# We don't include kernel module keys in the initrd
omit_dracutmodules+=" modsign "
# NSS is not included in the initrd
omit_dracutmodules+=" nss-softokn "
EOF