kexec-tools/kdump_dracut_modules/99kdumpbase/kdump_localfs.sh
2011-07-21 18:48:58 +08:00

15 lines
331 B
Bash
Executable File

#!/bin/sh
set -x
# We have the root file system mounted under $NEWROOT, so copy
# the vmcore there and call it a day
#
DATEDIR=`date +%d.%m.%y-%T`
mount -o remount,rw $NEWROOT/
mkdir -p $NEWROOT/var/crash/$DATEDIR
cp /proc/vmcore $NEWROOT/var/crash/$DATEDIR/vmcore
sync
# Once the copy is done, just reboot the system
reboot -f