[PATCH 00/11] crashkernel=auto: support fadump, reserve extra SWIOTLB memory and remove crashkernel.default
by Coiby Xu
The crashkernel=auto implementation in kernel space has been rejected
upstream [1]. The current user space implementation [2] [3] ships a
crashkernel.default but hasn't supported the swiotlb memory requirement,
custom crashkernel value from user and fadump.
The crashkernel.default implementation seems to be overly
complex,
- the default crashkernel value rarely changes. This is no need to ship
the same crashkernel.default default for every kernel package of a
architecture;
- when deciding the value of crashkernel for a new kernel, the
crashkernel.default of existing kernel is took into consideration
We can simply let the kexec-tools maintain the default crashkernel
values and provide an API for kdump-anacon-addon to query it. And for
a newly installed kernel, we can simply call "kdumpctl reset-crashkernel
KERNELPATH" to set its crashkernel value.
For the unfulfilled requirements,
- crashkernel is introduced to /etc/kdump.conf for the user can set
custom crashkernel value to tell kexec-tools to manage crashkernel
value automatically.
- "kdumpctl reset-crashkernel" has been written for the above
purpose.
- "kdumpctl fadump on/off" is added for supporting fadump.
[1] https://lore.kernel.org/linux-mm/20210507010432.IN24PudKT%25akpm@linux-fo...
[2] https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1171
[3] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...
Coiby Xu (11):
update default crashkernel value
factor out kdump_get_arch_recommend_crashkernel
provide get_default_crashkernel for kdump_anaconda_addon
introduce crashkernel option to kdump.conf
add a helper function to write a config value to kdump.conf
add a helper function to read kernel cmdline parameter from grubby
--info
rewrite reset_crashkernel to provide more features for the user and to
be called by kernel installation hook
allow to add extra memory to crashkernel string
Reserve extra memory when SME or SEV is active
provide kdumpctl fadump on/off
use "kdumpctl reset-crashkernel KERNELIMAGE" in kernel installation
hook
92-crashkernel.install | 135 +----------------------------
kdump-lib-initramfs.sh | 9 ++
kdump-lib.sh | 95 +++++++++++++++------
kdump.conf | 6 ++
kdump.conf.5 | 7 ++
kdumpctl | 188 ++++++++++++++++++++++++++++++++++++-----
kdumpctl.8 | 16 ++--
7 files changed, 271 insertions(+), 185 deletions(-)
--
2.31.1
11 months, 3 weeks
[PATCH] mkdumprd: allow spaces after 'path' config phrase when network dump
by Kazuhito Hagio
Without this patch, when there are two or more spaces after 'path'
configuration phrase with ssh or nfs setting, SAVE_PATH is set to
'/var/crash' in mkdumprd, and in most cases kdump service fails to
start.
ssh kdump(a)192.168.122.1
path /kdump
^^
This behavior would be too sensitive and different from the other
configurations. With this patch, mkdumprd allows such spaces.
Signed-off-by: Kazuhito Hagio <k-hagio(a)ab.jp.nec.com>
---
mkdumprd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index a6f7fe8..aa0abfd 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -13,7 +13,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf"
SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
-SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2)
+SAVE_PATH=$(awk '/^path/ {print $2}' $conf_file)
[ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH
# strip the duplicated "/"
SAVE_PATH=$(echo $SAVE_PATH | tr -s /)
--
2.18.0
1 year
[PATCH 1/2] selftest: run-test.sh: wait for subprocess instead of kill it
by Tao Liu
When run tests with 2 VMs, for example nfs/ssh kdump tests, client VM will do the
crash and dump, server VM will do vmcore saving and if-vmcore-exists
check.
Previously, when client VM finishes running, run-test.sh will kill the lead background
process, and then check if server VM has outputted "TEST PASSED" or "TEST FAILED" string.
However it didn't wait for server VM to finish. As a result, the server VM's final
outputs are not collected and checked, leaving the test result as "TEST RESULT NOT FOUND"
sometimes.
For example, the following is the pstree status of $(jobs -p) before it
gets killed. We can see the server VM is still running:
run-test.sh,172455 /root/kexec-tools/tests/scripts/run-test.sh --console nfs-early-kdump
└─run-test.sh,172457 /root/kexec-tools/tests/scripts/run-test.sh --console...
└─timeout,172480 --foreground 10m /root/kexec-tools/tests/scripts/run-qemu...
└─qemu-system-x86,172481 -enable-kvm -cpu host -nodefaults...
├─{qemu-system-x86},172489
├─{qemu-system-x86},172492
├─{qemu-system-x86},172493
├─{qemu-system-x86},172628
└─{qemu-system-x86},172629
In this patch, we will wait for $(jobs -p) to finish, in order to get
the complete output of test results.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
tests/scripts/run-test.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/scripts/run-test.sh b/tests/scripts/run-test.sh
index c3e94a3..1501db4 100755
--- a/tests/scripts/run-test.sh
+++ b/tests/scripts/run-test.sh
@@ -140,7 +140,7 @@ for test_case in $testcases; do
if [ $console -eq 1 ]; then
run_test_sync $script | tee $(get_test_console_file $script)
- [ -n "$(jobs -p)" ] && kill $(jobs -p)
+ [ -n "$(jobs -p)" ] && wait $(jobs -p)
else
$(run_test_sync $script > $(get_test_console_file $script)) &
watch_test_outputs $test_outputs
--
2.33.1
1 year, 4 months
[PATCH] Set zstd as the default compression method for dumping vmcore
by Tao Liu
Currently zstd has been supported both for makedumpfile and crash
utility. So let's use zstd as the default vmcore compression method
instead of lzo.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
kdump.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdump.conf b/kdump.conf
index dea2e94..502730e 100644
--- a/kdump.conf
+++ b/kdump.conf
@@ -171,7 +171,7 @@
#ssh user@2001:db8::1:2:3:4
#sshkey /root/.ssh/kdump_id_rsa
path /var/crash
-core_collector makedumpfile -l --message-level 7 -d 31
+core_collector makedumpfile -z --message-level 7 -d 31
#core_collector scp
#kdump_post /var/crash/scripts/kdump-post.sh
#kdump_pre /var/crash/scripts/kdump-pre.sh
--
2.33.1
1 year, 4 months
[PATCH v4 00/13] crashkernel=auto: support fadump and remove crashkernel.default
by Coiby Xu
v4:
- fixes suggested by Philipp
- fix the bug of always turning fadump off in "kdumpctl reset-crashkernel"
- no duplicate "echo -n"
- "&>/dev/null" replaced by "grep -q"
- wording improvements
- no longer check if the kernel path returned from "grubby --info"
physically exists so setting up crashkernel would work for osbuild
- fix the bug that couldn't switch between --fadump=on and
--fadump=nocma using "kdumpctl reset-crashkernel"
- add comments for "kdumpctl reset-crashkernel" to improve code
readability
v3:
- fixes suggested by Philipp
- fix incorrect usage of kdump_get_arch_recommend_crashkernel
- s/get_default_crashkernel/get-default-crashkernel
- no longer depends on grubby --update-kernel=ALL to update all
kernels' command line parameter and using a single loop to simplify
the code
- indentation issue fix
- commit message improvement
- update crashkernel-howto.txt as suggested by Dave
- CoreOS suppport
- makes "kdumpctl reset-crashkernel" work for CoreOS
- kdumpctl can't be run in RPM scriplet, disable it for
CoreOS
- set up kernel crashkernel for osbuild
v2:
- no longer address the swiotlb memory requirement when SME is enabled
- automatically reset crashkernel to default value only when the value
is set by kexec-tools before. So the crashkernel option to added to
kdump.conf is replaced auto_reset_crashkernel option instead
- multiple fixes suggested by Philipp including regex improvement, typo
fixes, grubby kernel path check and commit message improvements
- address the case where a kernel path is not
/boot/vmlinuz-{KERNEL_RELEASE}
- "kdumpctl fadump" dropped. Support fadump via
"kdumpctl reset-crashkernel [--fadump=[on|off|nocma]]" instead
The crashkernel=auto implementation in kernel space has been rejected
upstream [1]. The current user space implementation [2] [3] ships a
crashkernel.default but hasn't supported fadump. Meanwhile the
crashkernel.default implementation seems to be overly complex,
- the default kernel crashkernel value rarely changes. This is no
need to ship the same crashkernel.default default for every kernel
package of a architecture;
- when deciding the value of crashkernel for a new kernel, the
crashkernel.default of installed kernels and running kernel
is took into consideration (for the details, check
92-crashnernel.install).
According to Kairui [4], crashkernel.default per kernel package is to
accommodate kernel difference, for example, different kernels could be
built with different configurations thus different crashkernel values
are needed. But these should be minor cases and may not be sufficent to
justify the complexity of 92-crashkernel.install. Currently, we don't
know how a kernel debug/feature config would affect the crashkernel
value. Even if a kernel config may require much larger crashkernel, we
can address it in kexec-tools later.
There are are known cases that could lead to a larger crashkernel
including enabling SME, LUKS encryption and etc. But this patch set
would put them aside since they may be took care of in the kernel
space instead.
So this patch set would simply add support for fadump and move the
default kernel crashkernel from kernel package to kexec-tools,
- provide "kdumpctl get-default-crashkernel" for kdump-anaconda-addon
to get the default kernel crashkernel values for a specific
architecture (fadump is supported as well)
- re-write "kdumpctl reset-crashkernel" to support fadump
- introduce auto_reset_crashkernel which determines whether to reset
kernel crashkernel to new default value or not when kexec-tools updates
the default crashkernel value
Because the kernel hook /usr/lib/kernel/install.d/20-grub.install would
make the installed kernel inherit the kernel cmdline of current running
kernel i.e. /proc/cmdline, we only need to reset crashkernel when
kexec-tools increases the default crashkernel values.
[1] https://lore.kernel.org/linux-mm/20210507010432.IN24PudKT%25akpm@linux-fo...
[2] https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1171
[3] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...
[4] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...
Coiby Xu (13):
update default crashkernel value
factor out kdump_get_arch_recommend_crashkernel
provide kdumpctl get-default-crashkernel for kdump_anaconda_addon and
RPM scriptlet
add a helper function to read kernel cmdline parameter from grubby
--info
add helper functions to get dump mode
add helper functions to get kernel path by kernel release and the path
of current running kernel
fix incorrect usage of rpm-ostree to update kernel command line
parameters
rewrite reset_crashkernel to support fadump and to used by RPM
scriptlet
introduce the auto_reset_crashkernel option to kdump.conf
try to reset kernel crashkernel when kexec-tools updates the default
crashkernel value
reset kernel crashkernel for the special case where the kernel is
updated right after kexec-tools
set up kernel crashkernel for osbuild in kernel hook
update crashkernel-howto
92-crashkernel.install | 135 +---------------
crashkernel-howto.txt | 123 +++------------
kdump-lib.sh | 60 ++++---
kdump.conf | 7 +
kdump.conf.5 | 6 +
kdumpctl | 345 ++++++++++++++++++++++++++++++++++++++---
kdumpctl.8 | 19 ++-
kexec-tools.spec | 15 ++
8 files changed, 421 insertions(+), 289 deletions(-)
--
2.31.1
1 year, 5 months
[PATCH v4] Set zstd as the default compression method for kdump initrd
by Tao Liu
zstd has better compression ratio and time consumption balance than
zlib/lzo/snappy. When no customized compression method specified in
kdump.conf, we will use zstd as the default compression method.
**The test method:
I installed kexec-tools with and without the patch, executing the following
command for 4 times, and calculate the averange time:
$ rm -f /boot/initramfs-*kdump.img && time kdumpctl rebuild && \
ls -ail /boot/initramfs-*kdump.img
**The test result:
Bare metal x86_64 machine:
dracut with squash module | dracut without sqaush module
zlib zstd | zlib zstd
real 10.6282 10.1676 | 9.509 10.267
user 9.8932 8.6468 | 10.6028 9.0936
sys 3.523 3.4942 | 2.942 3.0662
|
size of |
kdump.img 30575616 29236224 | 19247949 17007764
PowerVM hosted ppc64le VM:
dracut with squash module | dracut without sqaush module
zlib zstd | zlib zstd
real 10.6742 10.7572 | 9.7676 10.5722
user 18.754 19.8338 | 20.7932 13.179
sys 1.8358 1.864 | 1.637 1.663
|
size of |
kdump.img 36917248 35467264 | 21441323 19007108
**discussion
As for the file size of kdump.img, zstd makes a smaller size, which is
benificial for kdump kernel limited memory.
As for the time consumption for compression when making kdump.img, zstd
doesn't show a clear advance than zlib.
v1 -> v2:
Use kdump_get_conf_val() to get dracut_args values of kdump.conf
v2 -> v3:
Attached testing benchmark
v3 -> v4:
Re-measured and re-attached the testing benchmark of x86_64 and ppc64le.
Changed regex '.*[[:space:]]' to '(^|[[:space:]])'
As for the time consumption differences between v3 and v4, I think it is
due to v3 was measured on a ppc64le VM. There were I/O performance
downgration when other VMs were accessing I/O device at the same time,
which I didn't get repetted in v4.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
kdump-lib.sh | 6 ++++++
mkdumprd | 4 ++++
mkfadumprd | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index e435498..6d668a5 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -443,6 +443,12 @@ is_wdt_active()
return 1
}
+have_compression_in_dracut_args()
+{
+ [[ "$(kdump_get_conf_val dracut_args)" =~ \
+ (^|[[:space:]])--(gzip|bzip2|lzma|xz|lzo|lz4|zstd|no-compress|compress)([[:space:]]|$) ]]
+}
+
# If "dracut_args" contains "--mount" information, use it
# directly without any check(users are expected to ensure
# its correctness).
diff --git a/mkdumprd b/mkdumprd
index d87d588..9c26ecc 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -431,6 +431,10 @@ done <<< "$(kdump_read_conf)"
handle_default_dump_target
+if ! have_compression_in_dracut_args; then
+ add_dracut_arg "--compress" "zstd"
+fi
+
if [[ -n $extra_modules ]]; then
add_dracut_arg "--add-drivers" "$extra_modules"
fi
diff --git a/mkfadumprd b/mkfadumprd
index b890f83..16fdacc 100644
--- a/mkfadumprd
+++ b/mkfadumprd
@@ -62,6 +62,10 @@ if is_squash_available; then
_dracut_isolate_args+=(--add squash)
fi
+if ! have_compression_in_dracut_args; then
+ _dracut_isolate_args+=(--compress zstd)
+fi
+
if ! dracut --force --quiet "${_dracut_isolate_args[@]}" "$@" "$TARGET_INITRD"; then
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
fi
--
2.33.1
1 year, 5 months
[PATCH] kdumpctl: remove some legacy code
by Kairui Song
From: Kairui Song <kasong(a)tencent.com>
It seems the save_core function and vmcore detection was used a long
time ago when kdump shares same userspace in first and second kernel.
It's now heavily deprecated (only support cp, hardcoded path, dumpoops
no longer exists) and not used.
Now vmcore will never show up in first kernel for both kdump and fadump
case, and kdumpctl is only used in first kernel, so just remove them.
Signed-off-by: Kairui Song <kasong(a)tencent.com>
---
kdumpctl | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index 59ec068..ed2b963 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -72,32 +72,6 @@ determine_dump_mode()
ddebug "DEFAULT_DUMP_MODE=$DEFAULT_DUMP_MODE"
}
-save_core()
-{
- coredir="/var/crash/$(date +"%Y-%m-%d-%H:%M")"
-
- mkdir -p "$coredir"
- ddebug "cp --sparse=always /proc/vmcore $coredir/vmcore-incomplete"
- if cp --sparse=always /proc/vmcore "$coredir/vmcore-incomplete"; then
- mv "$coredir/vmcore-incomplete" "$coredir/vmcore"
- dinfo "saved a vmcore to $coredir"
- else
- derror "failed to save a vmcore to $coredir"
- fi
-
- # pass the dmesg to Abrt tool if exists, in order
- # to collect the kernel oops message.
- # https://fedorahosted.org/abrt/
- if [[ -x /usr/bin/dumpoops ]]; then
- ddebug "makedumpfile --dump-dmesg $coredir/vmcore $coredir/dmesg"
- makedumpfile --dump-dmesg "$coredir/vmcore" "$coredir/dmesg" > /dev/null 2>&1
- ddebug "dumpoops -d $coredir/dmesg"
- if dumpoops -d "$coredir/dmesg" > /dev/null 2>&1; then
- dinfo "kernel oops has been collected by abrt tool"
- fi
- fi
-}
-
rebuild_fadump_initrd()
{
if ! $MKFADUMPRD "$DEFAULT_INITRD_BAK" "$TARGET_INITRD" --kver "$KDUMP_KERNELVER"; then
@@ -1346,12 +1320,7 @@ main()
case "$1" in
start)
- if [[ -s /proc/vmcore ]]; then
- save_core
- reboot
- else
- start
- fi
+ start
;;
stop)
stop
--
2.34.1
1 year, 5 months
[PATCH] dracut-early-kdump-module-setup.sh: install xargs and kdump-lib-initramfs.sh
by Tao Liu
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh,
however it is not installed in dracut-early-kdump-module-setup.sh. Same
as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report
file not found errors.
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh
kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib
And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs
kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
dracut-early-kdump-module-setup.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh
index 0e46823..0451118 100755
--- a/dracut-early-kdump-module-setup.sh
+++ b/dracut-early-kdump-module-setup.sh
@@ -50,7 +50,9 @@ install() {
inst_binary "/usr/bin/gawk" "/usr/bin/awk"
inst_binary "/usr/bin/logger" "/usr/bin/logger"
inst_binary "/usr/bin/printf" "/usr/bin/printf"
+ inst_binary "/usr/bin/xargs" "/usr/bin/xargs"
inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
+ inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh"
inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh"
inst_hook cmdline 00 "$moddir/early-kdump.sh"
inst_binary "$KDUMP_KERNEL"
--
2.33.1
1 year, 5 months
[PATCH v3] Set zstd as the default compression method for kdump initrd
by Tao Liu
zstd has better compression ratio and time consumption balance than
zlib/lzo/snappy. When no customized compression method specified in
kdump.conf, we will use zstd as the default compression method.
**The test method:
I installed kexec-tools with and without the patch, executing the following
command for 4 times, and calculate the averange time:
$ rm -f /boot/initramfs-*kdump.img && time kdumpctl rebuild && \
ls -ail /boot/initramfs-*kdump.img
**The test result:
dracut with squash module | dracut without sqaush module
zlib zstd | zlib zstd
real 19.981 23.5385 | 19.38475 23.5575
user 16.04475 16.84475 | 18.0245 9.28875
sys 1.61875 1.818 | 1.617 1.50475
|
size of |
kdump.img 38099968 35432448 | 21445168 19006000
**discussion
As for the file size of kdump.img, zstd makes a smaller size, which is
benificial for kdump kernel limited memory.
As for the time consumption of making kdump.img, in dracut with squash
module (squash-root.img included) case, zstd doesn't have a clear advance.
In dracut without sqaush module (no squash-root.img included), zstd have
a shorter user time than zlib.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
kdump-lib.sh | 6 ++++++
mkdumprd | 4 ++++
mkfadumprd | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index e435498..e374c71 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -443,6 +443,12 @@ is_wdt_active()
return 1
}
+have_compression_in_dracut_args()
+{
+ [[ " $(kdump_get_conf_val dracut_args)" =~ \
+ .*[[:space:]]--(gzip|bzip2|lzma|xz|lzo|lz4|zstd|no-compress|compress)([[:space:]]|$) ]]
+}
+
# If "dracut_args" contains "--mount" information, use it
# directly without any check(users are expected to ensure
# its correctness).
diff --git a/mkdumprd b/mkdumprd
index d87d588..9c26ecc 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -431,6 +431,10 @@ done <<< "$(kdump_read_conf)"
handle_default_dump_target
+if ! have_compression_in_dracut_args; then
+ add_dracut_arg "--compress" "zstd"
+fi
+
if [[ -n $extra_modules ]]; then
add_dracut_arg "--add-drivers" "$extra_modules"
fi
diff --git a/mkfadumprd b/mkfadumprd
index b890f83..16fdacc 100644
--- a/mkfadumprd
+++ b/mkfadumprd
@@ -62,6 +62,10 @@ if is_squash_available; then
_dracut_isolate_args+=(--add squash)
fi
+if ! have_compression_in_dracut_args; then
+ _dracut_isolate_args+=(--compress zstd)
+fi
+
if ! dracut --force --quiet "${_dracut_isolate_args[@]}" "$@" "$TARGET_INITRD"; then
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
fi
--
2.33.1
1 year, 5 months
[PATCH v2] Set zstd as the default compression method for kdump initrd
by Tao Liu
zstd has better compression ratio and time consumption balance than
zlib/lzo/snappy. When no customized compression method specified in
kdump.conf, we will use zstd as the default compression method.
v1 -> v2:
Use kdump_get_conf_val() to get dracut_args values of kdump.conf
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
kdump-lib.sh | 6 ++++++
mkdumprd | 4 ++++
mkfadumprd | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index e435498..e374c71 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -443,6 +443,12 @@ is_wdt_active()
return 1
}
+have_compression_in_dracut_args()
+{
+ [[ " $(kdump_get_conf_val dracut_args)" =~ \
+ .*[[:space:]]--(gzip|bzip2|lzma|xz|lzo|lz4|zstd|no-compress|compress)([[:space:]]|$) ]]
+}
+
# If "dracut_args" contains "--mount" information, use it
# directly without any check(users are expected to ensure
# its correctness).
diff --git a/mkdumprd b/mkdumprd
index d87d588..9c26ecc 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -431,6 +431,10 @@ done <<< "$(kdump_read_conf)"
handle_default_dump_target
+if ! have_compression_in_dracut_args; then
+ add_dracut_arg "--compress" "zstd"
+fi
+
if [[ -n $extra_modules ]]; then
add_dracut_arg "--add-drivers" "$extra_modules"
fi
diff --git a/mkfadumprd b/mkfadumprd
index b890f83..16fdacc 100644
--- a/mkfadumprd
+++ b/mkfadumprd
@@ -62,6 +62,10 @@ if is_squash_available; then
_dracut_isolate_args+=(--add squash)
fi
+if ! have_compression_in_dracut_args; then
+ _dracut_isolate_args+=(--compress zstd)
+fi
+
if ! dracut --force --quiet "${_dracut_isolate_args[@]}" "$@" "$TARGET_INITRD"; then
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
fi
--
2.33.1
1 year, 5 months