From 878faf6ab86f454fe8c97f5110b85160b0ce99ff Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Thu, 22 Dec 2022 13:28:00 +0800 Subject: [PATCH] fadump: do not use squash to reduce image size Resolves: bz2139000 Upstream: Fedora Conflict: None commit 55b0dd03b36556b40e1f0d660b76bc5acb99b982 Author: Hari Bathini Date: Mon Oct 31 15:42:20 2022 +0530 fadump: do not use squash to reduce image size With commit fa9201b2 ("fadump: isolate fadump initramfs image within the default one"), initramfs image gets to hold two squash images, one for production kernel boot purpose and the other for capture kernel boot. Having separate images improved reliability for both production kernel and capture kernel boot scenarios, but the size of initramfs image became considerably larger. Instead of having squash images, compressing $initdir without using squash images reduced the size of initramfs image for fadump case by around 30%. So, avoid using squash for fadump case. Signed-off-by: Hari Bathini Reviewed-by: Philipp Rudo Signed-off-by: Lichen Liu --- mkfadumprd | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mkfadumprd b/mkfadumprd index f353f15..1e09ac2 100644 --- a/mkfadumprd +++ b/mkfadumprd @@ -38,7 +38,9 @@ FADUMP_INITRD="$MKFADUMPRD_TMPDIR/fadump.img" # this file tells the initrd is fadump enabled touch "$MKFADUMPRD_TMPDIR/fadump.initramfs" ddebug "rebuild fadump initrd: $FADUMP_INITRD $DEFAULT_INITRD $KDUMP_KERNELVER" -if ! $MKDUMPRD "$FADUMP_INITRD" -i "$MKFADUMPRD_TMPDIR/fadump.initramfs" /etc/fadump.initramfs; then +# Don't use squash for capture image or default image as it negatively impacts +# compression ratio and increases the size of the initramfs image. +if ! $MKDUMPRD "$FADUMP_INITRD" -i "$MKFADUMPRD_TMPDIR/fadump.initramfs" /etc/fadump.initramfs --omit squash; then perror_exit "mkfadumprd: failed to build image with dump capture support" fi @@ -58,10 +60,6 @@ _dracut_isolate_args=( /usr/lib/dracut/fadump-kernel-modules.txt ) -if is_squash_available; then - _dracut_isolate_args+=(--add squash) -fi - # Same as setting zstd in mkdumprd if ! have_compression_in_dracut_args; then if is_squash_available && dracut_have_option "--squash-compressor"; then