diff --git a/dracut/99kdumpbase/module-setup.sh b/dracut/99kdumpbase/module-setup.sh index 7be4ef76..50dd67cc 100755 --- a/dracut/99kdumpbase/module-setup.sh +++ b/dracut/99kdumpbase/module-setup.sh @@ -44,12 +44,6 @@ depends() { [[ " $omit_dracutmodules " != *\ $1\ * ]] && _dep="$_dep $1" } - if is_squash_available; then - add_opt_module squash - else - dwarning "Required modules to build a squashed kdump image is missing!" - fi - if is_wdt_active; then add_opt_module watchdog fi diff --git a/kdump-lib.sh b/kdump-lib.sh index ba853d94..c14e75e8 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -43,16 +43,6 @@ is_sme_or_sev_active() journalctl -q --dmesg --grep "^Memory Encryption Features active: AMD (SME|SEV)$" >/dev/null 2>&1 } -is_squash_available() -{ - local _version kmodule - - _version=$(_get_kdump_kernel_version) - for kmodule in squashfs overlay loop; do - modprobe -S "$_version" --dry-run $kmodule &> /dev/null || return 1 - done -} - has_command() { [[ -x $(command -v "$1") ]] diff --git a/mkdumprd b/mkdumprd index 517ce19d..366bcdb3 100644 --- a/mkdumprd +++ b/mkdumprd @@ -379,10 +379,9 @@ done <<< "$(kdump_read_conf)" handle_default_dump_target if ! have_compression_in_dracut_args; then - if is_squash_available; then - dracut_args+=("--squash-compressor" "zstd") - elif has_command zstd; then - dracut_args+=("--compress" "zstd") + if has_command mksquashfs; then + dracut_args+=(--add squash) + dracut_args+=(--squash-compressor zstd) fi fi