From 5efc60ae4538b5b9f5340363c4f6a123c84d2088 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Sat, 22 Dec 2012 12:01:50 -0500 Subject: [PATCH] Enable crashkernel settings override in /etc/default/grub Allow user to override or remove crashkernel settings by trivial edit in /etc/default/grub --- debian/default/grub | 1 + debian/patches/ubuntu_crashkernel.patch | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/default/grub b/debian/default/grub index 49b8f82..4da922c 100644 --- a/debian/default/grub +++ b/debian/default/grub @@ -10,6 +10,7 @@ GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" +export GRUB_CRASHKERNEL="crashkernel=384M-2G:64M,2G-:128M" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains diff --git a/debian/patches/ubuntu_crashkernel.patch b/debian/patches/ubuntu_crashkernel.patch index 919dbc0..2d9a74f 100644 --- a/debian/patches/ubuntu_crashkernel.patch +++ b/debian/patches/ubuntu_crashkernel.patch @@ -17,7 +17,7 @@ Index: b/util/grub.d/10_linux.in +# add crashkernel option if we have the required tools +if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then -+ GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M" ++ GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA $GRUB_CRASHKERNEL" +fi + linux_entry () -- 1.8.0.2