SHA256
1
0
forked from pool/kdump
kdump/kdump-bind-mount-sysroot.patch

44 lines
1.6 KiB
Diff

From: Petr Tesarik <ptesarik@suse.com>
Subject: Convert sysroot to a bind mount in kdump initrd
References: bsc#976864
Upstream: v0.8.17
Git-commit: a532a27d0bb7f69fbf89527fb02e8434fdafa147
In SLES 12 SP2, systemd-fstab-generator no longer ignores non-device
root mounts, so it tries to run an actual mount command for root=kdump.
This fails, of course, because "kdump" is not mountable.
To solve this, pass "rootflags=bind" to the panic kernel, so systemd
can create a (bogus) bind mount and be happy.
See also kdump-root-parameter.patch.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
init/load.sh | 2 +-
init/module-setup.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/init/load.sh
+++ b/init/load.sh
@@ -71,7 +71,7 @@ function build_kdump_commandline()
# Use deadline for saving the memory footprint
commandline="$commandline elevator=deadline sysrq=yes reset_devices acpi_no_memhotplug cgroup_disable=memory"
commandline="$commandline irqpoll ${nr_cpus}=${KDUMP_CPUS:-1}"
- commandline="$commandline root=kdump rd.udev.children-max=8"
+ commandline="$commandline root=kdump rootflags=bind rd.udev.children-max=8"
case $(uname -i) in
i?86|x86_64)
local boot_apicid=$(
--- a/init/module-setup.sh
+++ b/init/module-setup.sh
@@ -123,7 +123,7 @@ kdump_gen_mount_units() {
echo "${line[@]}" >> "$fstab"
done
- echo "root=kdump" > "$initdir/proc/cmdline"
+ echo > "$initdir/proc/cmdline"
inst_binary -l \
"$systemdutildir/system-generators/systemd-fstab-generator" \
"/tmp/systemd-fstab-generator"