Kexec not working as expected from inside X

Mayank Kaushik mayank.utexas at
Sun Nov 29 19:40:45 EST 2009

Hi everyone,

I'm running Fedora 8, kernel I was experiencing
frequent kernel hangs, so to get to the bottom of it I setup kexec/
kdump with this kernel. I did it according to the documentation in
kdump/kdump.txt. I'm running Xorg with the
closed-source binary nvidia driver. I did the following:

1) Ensured that my running kernel supported kexec (as given in the
documentation above), obtained the vmlinux for it from the fedora
debug yum repos.
2) Built a new crash-dump kernel (linux-
3) Appended the following lines to my /etc/rc.sysinit:

921 echo "1" > /proc/sys/kernel/sysrq
922 savetextmode
923 # Tell kexec which kernel and ramdisk to use
924 kexec -p /usr/src/kernels/linux- --initrd=/boot/
initrd- --args-linux --append="root=LABEL=/ 1
irqpoll maxcpus=1"
926 DATE=`date +%Y-%m-%d-%T`
927 NAME=`uname -r`
928 if [ "$NAME" == "" ]; then
929   echo -e "Creating crash dump..\n"
930   mkdir -p /var/crash/$DATE
931   cp /proc/vmcore /var/crash/$DATE/vmcore-incomplete
932   if [ $? == 0 ]
933   then
934       mv /var/crash/$DATE/vmcore-incomplete /var/crash/$DATE/vmcore
935       echo -e "Done, rebooting..\n"
936       reboot -f
937   fi
938 fi

The above is supposed to dump the vmcore to my /var/crash/ directory
as soon as the kdump kernel boots after a hang. The motivation for
doing this was that I get kernel hangs while running X, and pressing
<Alt>+<Sysrq> causes the screen to get garbled when the kdump kernel
boots, so I don't have a chance of doing this manually.

I've tested the above while in runlevel 3 while I'm inside a VT,
everything works as expected (I see the kdump kernel boot up and copy
the kdump), and I can see the vmcore end up inside /var/crash/. But
when I try the same while X is running, the screen gets garbled while
the kdump kernel boots, but nothing happens! The kernel does not
reboot, and neither does it copy the vmcore to /var/crash. It is
responsive though, I can toggle the CapsLock key, but the screen is

Is it something in the nvidia driver that's causing this to not work?
Any clues on what's going wrong, or how I can debug this further?

(Please CC me in the reply, I'm not on this list)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kexec mailing list