From e05c55014492958af48c885fab8f06c5090839af Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Sun, 17 May 2020 22:38:22 +0800 Subject: [PATCH] Drop switch root capability for non fadump initramfs Switch root is never used for kdump image, and this will be helpful to reduce the initramfs size. Also increase dracut dependency version and the function is dracut_no_switch_root is new introduced. This commit is applied to RHEL some time ago, but missing in Fedora as Fedora's Dracut didn't backport this feature at that time. Now apply this missing commit. Signed-off-by: Kairui Song Acked-by: Pingfan Liu --- dracut-module-setup.sh | 3 +++ kexec-tools.spec | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index d3a674e..faa918a 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -846,5 +846,8 @@ install() { echo "[Journal]" > ${initdir}/etc/systemd/journald.conf.d/kdump.conf echo "Storage=none" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf echo "ForwardToConsole=yes" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf + + # Save more memory by dropping switch root capability + dracut_no_switch_root fi } diff --git a/kexec-tools.spec b/kexec-tools.spec index 8a470a5..c4b7c8d 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -55,13 +55,13 @@ Source109: dracut-early-kdump-module-setup.sh Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units -Requires(pre): coreutils sed zlib -Requires: dracut >= 047-34.git20180604 -Requires: dracut-network >= 044-117 -Requires: dracut-squash >= 049-4 +Requires(pre): coreutils sed zlib +Requires: dracut >= 050 +Requires: dracut-network >= 050 +Requires: dracut-squash >= 050 Requires: ethtool BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel -BuildRequires: pkgconfig intltool gettext +BuildRequires: pkgconfig intltool gettext BuildRequires: systemd-units BuildRequires: automake autoconf libtool %ifarch %{ix86} x86_64 ppc64 ppc s390x ppc64le