From 4ac97296408193bffc5c71e51340a042d00723f082756c3913196d48694e5df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Fri, 14 Mar 2014 07:13:36 +0000 Subject: [PATCH] Accepting request 224742 from home:juwolf:branches:Kernel:kdump dracut needs rd.neednet=1 commandline parameter to force network activation. Together with Request 224727 to dracut this should solve current kdump-via-network issues (bnc#866771) OBS-URL: https://build.opensuse.org/request/show/224742 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=64 --- initrd_network.patch | 29 +++++++++++++++++++++++++++++ kdump.changes | 12 ++++++++++++ kdump.spec | 4 ++++ ledblink_background.patch | 13 +++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 initrd_network.patch create mode 100644 ledblink_background.patch diff --git a/initrd_network.patch b/initrd_network.patch new file mode 100644 index 0000000..039ba21 --- /dev/null +++ b/initrd_network.patch @@ -0,0 +1,29 @@ +--- init/mkdumprd.old 2014-03-04 17:51:17.000000000 +0100 ++++ init/mkdumprd 2014-03-05 17:57:07.606638345 +0100 +@@ -123,6 +123,26 @@ + + DRACUT_ARGS="--force --hostonly --omit 'systemd plymouth resume usrmount'" + ++ # network configuration ++ if [ "$KDUMP_NETCONFIG" = "auto" ] ; then ++ status_message "Network: auto" ++ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1'" ++ elif [ -z "$KDUMP_NETCONFIG" ] ; then ++ status_message "Network: none" ++ else ++ interface=$(echo "$KDUMP_NETCONFIG" | cut -d ':' -f 1) ++ mode=$(echo "$KDUMP_NETCONFIG" | cut -d ':' -f 2) ++ ++ status_message "Network interface: $interface" ++ if [ "$mode" = "static" ] ; then ++ status_message "Network mode: Static IP" ++ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1'" ++ else ++ status_message "Network mode: Automatic IP (DHCP)" ++ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1 ip=${interface}:dhcp'" ++ fi ++ fi ++ + # add mount points + kdump_get_mountpoints || return 1 + i=0 diff --git a/kdump.changes b/kdump.changes index a6fa393..1000c6c 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Mar 5 16:58:02 UTC 2014 - juwolf@suse.com + +- Added dracut network activation in initrd to mkdumprd. + Patch added: initrd_network.patch + +------------------------------------------------------------------- +Tue Mar 4 12:19:24 UTC 2014 - juwolf@suse.com + +- Fixed wrong argument for ledblink + ledblink_background.patch: Added + ------------------------------------------------------------------- Sun Mar 2 15:35:11 UTC 2014 - ptesarik@suse.cz diff --git a/kdump.spec b/kdump.spec index afc6265..a24a88a 100644 --- a/kdump.spec +++ b/kdump.spec @@ -49,6 +49,8 @@ PreReq: %insserv_prereq %fillup_prereq mkinitrd Source: %{name}-%{version}.tar.bz2 Source2: %{name}-%{version}-rpmlintrc Source3: kdump.service +Patch1: ledblink_background.patch +Patch2: initrd_network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) Provides: kdump-helpers = %{version} @@ -86,6 +88,8 @@ Authors: %prep %setup +%patch1 -p0 +%patch2 -p0 %build export CFLAGS="%optflags" diff --git a/ledblink_background.patch b/ledblink_background.patch new file mode 100644 index 0000000..c7c672b --- /dev/null +++ b/ledblink_background.patch @@ -0,0 +1,13 @@ +--- init/save_dump.sh.old 2014-03-04 12:44:06.595720000 +0100 ++++ init/save_dump.sh 2014-03-04 12:44:19.444960000 +0100 +@@ -143,8 +143,8 @@ + FADUMP_RELEASE_MEM=/sys/kernel/fadump_release_mem + + # +-# start LED blinking in background +-kdumptool ledblink --background ++# start LED blinking ++kdumptool ledblink + + # + # create core dumps by default here for kdumptool debugging