From 5e4bb476c0cc46dedc020a802f045d479e483857 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 21 Mar 2017 15:58:13 -0600 Subject: kexec-tools: bump version and add support for crashdump kernel split kexec-tools into two packages, kexec and kdump. * kexec to simply execute a new kernel * kdump is for loading and collecting debris of a crashed kernel with support for kdump forensics. In order to properly support booting into a crashkernel, an init script as well as UCI configuration has been added. As modifying the kernel cmdline is required for this to work in x86 platforms use an uci-defaults script to modify /boot/grub/grub.cfg. To test collecting crash information, use the 'c' sysrq-trigger, ie. echo c > /proc/sysrq-trigger This should result in the crash kernel being executed and (depending on the configution) dmesg and/or vmcore getting saved. To check if the crash kernel was loaded properly, use the 'status' command of the kdump init script. Signed-off-by: Daniel Golle --- package/boot/kexec-tools/files/kdump.defaults | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 package/boot/kexec-tools/files/kdump.defaults (limited to 'package/boot/kexec-tools/files/kdump.defaults') diff --git a/package/boot/kexec-tools/files/kdump.defaults b/package/boot/kexec-tools/files/kdump.defaults new file mode 100644 index 0000000..2f15e75 --- /dev/null +++ b/package/boot/kexec-tools/files/kdump.defaults @@ -0,0 +1,11 @@ +#!/bin/sh + +case $(uname -m) in + i?86|x86_64) + if ! grep -q crashkernel /boot/grub/grub.cfg; then + mount /boot -o remount,rw + sed -i 's/linux.*/& crashkernel=32M@32M/' /boot/grub/grub.cfg + mount /boot -o remount,ro + fi + ;; +esac -- cgit v1.1