mkdumprd: add --aggressive-strip as default dracut args
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@tencent.com> Reviewed-by: Philipp Rudo <prudo@redhat.com> Reviewed-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
parent
ea7be0608e
commit
c8643af270
@ -61,9 +61,9 @@ Requires(post): servicelog
|
|||||||
Recommends: keyutils
|
Recommends: keyutils
|
||||||
%endif
|
%endif
|
||||||
Requires(pre): coreutils sed zlib
|
Requires(pre): coreutils sed zlib
|
||||||
Requires: dracut >= 050
|
Requires: dracut >= 058
|
||||||
Requires: dracut-network >= 050
|
Requires: dracut-network >= 058
|
||||||
Requires: dracut-squash >= 050
|
Requires: dracut-squash >= 058
|
||||||
Requires: ethtool
|
Requires: ethtool
|
||||||
Requires: util-linux
|
Requires: util-linux
|
||||||
Requires: binutils
|
Requires: binutils
|
||||||
|
2
mkdumprd
2
mkdumprd
@ -27,7 +27,7 @@ SAVE_PATH=$(get_save_path)
|
|||||||
OVERRIDE_RESETTABLE=0
|
OVERRIDE_RESETTABLE=0
|
||||||
|
|
||||||
extra_modules=""
|
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)"
|
MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
|
||||||
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
|
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
|
||||||
|
Loading…
Reference in New Issue
Block a user