From: Michael Vogt <mvo@ubuntu.com>
To: grub-devel@gnu.org
Subject: support for crashkernel= in 10_linux.in
Date: Wed, 24 Jun 2009 13:20:49 +0200 [thread overview]
Message-ID: <20090624112049.GU11691@tas> (raw)
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
Hello,
in ubuntu we are working on making it easier to capture kernel
crashes. The system we use is based around kdump and it works by
triggering a kexec of a special crashdump kernel if the regular
kernels crashes. In order for this to work the normal kernel needs a
additional commandline option "crashkernel=".
Attached is a very simple patch that adds this option automatically if
kexec and makedumpfile are available.
If its not general enough for inclusion into the default grub2, may a
mechanism to pass additional kernel commandline paramters via some
sort of defaults.d/ directory would be the right apporoach? Then I
could just ship a config file in kexec-tools that looks like this:
GRUB_LINUX_CMDLINE_EXTRA="$GRUB_LINUX_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
Thanks,
Michael
P.S. I also put the patch in the bugtracker at
https://savannah.gnu.org/bugs/?26874
[-- Attachment #2: 10_crashkernel.patch --]
[-- Type: text/x-diff, Size: 919 bytes --]
diff -Nur -x '*.orig' -x '*~' grub2-1.96+20090611/util/grub.d/10_linux.in grub2-1.96+20090611.new/util/grub.d/10_linux.in
--- grub2-1.96+20090611/util/grub.d/10_linux.in 2009-06-24 10:17:45.202761012 +0200
+++ grub2-1.96+20090611.new/util/grub.d/10_linux.in 2009-06-24 10:19:11.198757708 +0200
@@ -43,6 +43,11 @@
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
+# add crashkernel option if we have the requierd tools
+if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
+ GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
+fi
+
test_numeric ()
{
local a=$1
@@ -143,7 +148,7 @@
fi
linux_entry "${OS}, Linux ${version}" \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} ${GRUB_CMDLINE_EXTRA}"
linux_entry "${OS}, Linux ${version} (recovery mode)" \
"single ${GRUB_CMDLINE_LINUX}"
next reply other threads:[~2009-06-24 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 11:20 Michael Vogt [this message]
2009-06-24 12:11 ` support for crashkernel= in 10_linux.in Robert Millan
2009-06-24 13:11 ` Michael Vogt
2009-06-24 19:18 ` Pavel Roskin
2009-06-24 20:55 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090624112049.GU11691@tas \
--to=mvo@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.