kexec-tools/kdump_dracut_modules/99kdumpbase/kdump_localfs.sh

15 lines
331 B
Bash
Raw Normal View History

2011-07-21 10:48:58 +00:00
#!/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