On Fri, 28 Apr 2023 00:04:45 +0800
Kairui Song <ryncsn(a)gmail.com> wrote:
From: Kairui Song <kasong(a)tencent.com>
The new aggressive strip option was added in dracut 058, which tell
dracut to build the initramfs stripping more sections of the ELF
binaries (basically strip .symtab, .strtab).
These section are only useful for debugging runtime failures, but in
kdump kernel, neccessary tools for debug any runtime failure are
absent, there is no point keeping these sections.
Stripping these section can help save some memory with almost no side
effect. So let enable --aggressive-strip by default.
Comparison of unpacked initramfs before / after enabling aggressive strip:
du -hs image image.aggressive-strip
31M image
29M image.aggressive-strip
Signed-off-by: Kairui Song <kasong(a)tencent.com>
Makes sense
Thanks and nice to see you active on the list :-)
Reviewed-by: Philipp Rudo <prudo(a)redhat.com>
---
kexec-tools.spec | 6 +++---
mkdumprd | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index d2a8aca..d55b163 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -61,9 +61,9 @@ Requires(post): servicelog
Recommends: keyutils
%endif
Requires(pre): coreutils sed zlib
-Requires: dracut >= 050
-Requires: dracut-network >= 050
-Requires: dracut-squash >= 050
+Requires: dracut >= 058
+Requires: dracut-network >= 058
+Requires: dracut-squash >= 058
Requires: ethtool
Requires: util-linux
Recommends: grubby
diff --git a/mkdumprd b/mkdumprd
index a3e5938..63a37a7 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -27,7 +27,7 @@ SAVE_PATH=$(get_save_path)
OVERRIDE_RESETTABLE=0
extra_modules=""
-dracut_args=(--add kdumpbase --quiet --hostonly --hostonly-cmdline --hostonly-i18n
--hostonly-mode strict --hostonly-nics '' -o "plymouth resume ifcfg
earlykdump")
+dracut_args=(--add kdumpbase --quiet --hostonly --hostonly-cmdline --hostonly-i18n
--hostonly-mode strict --hostonly-nics '' --aggressive-strip -o "plymouth
resume ifcfg earlykdump")
MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t
dracut.XXXXXX failed."