diff -Naur dracut-050/dracut-init.sh dracut-050-p/dracut-init.sh --- dracut-050/dracut-init.sh 2020-03-04 11:43:22.000000000 +0100 +++ dracut-050-p/dracut-init.sh 2020-03-28 12:59:04.969056536 +0100 @@ -929,6 +929,16 @@ [[ -e $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" done + # we get better compression ratio if we don't compress files twice, while also + # saving ourself from the overhead of decompressing twice as well.. + for mod in $(find ${initdir}${srcmods} -type f); do + case ${mod} in + *.ko.gz) gunzip ${mod} ;; + *.ko.xz) unxz -T0 ${mod} ;; + *.ko.zst) unzstd ${mod} -q --rm -f ;; + esac + done + # generate module dependencies for the initrd if [[ -d $initdir/lib/modules/$kernel ]] && \ ! depmod -a -b "$initdir" $kernel; then