<div class="gmail_quote">Hello All,<div><br></div><div>         I wanted to know what is the best way to generate the kernel crash dump on kernel panic,</div><div>after doing some searching, i came to know we can use kexec to load a new kernel on the kernel,</div>

<div>i followed the instruction from the following links</div><div><a href="http://www.dedoimedo.com/computers/kdump.html" target="_blank">http://www.dedoimedo.com/computers/kdump.html</a></div>
<div><a href="http://www.developertutorials.com/tutorials/linux/reboot-linux-faster-072204-1358/" target="_blank">http://www.developertutorials.com/tutorials/linux/reboot-linux-faster-072204-1358/</a></div>
<div><br></div><div>I do found that the  kernel load properly with the, kexec -l option followed by kexec -e option,</div><div>but when i set the kernel to be loaded on kernel panic using the option kexec -p, i see that after</div>

<div>kernel crash, the system just hangs, it wont even try to load the new kernel. following are the</div><div>commands am using. Can some one point, if there is any thing wrong with this.</div><div><br></div><div>chkconfig kdump on</div>

<div>/etc/init.d/kdump start</div><div>kexec -l --append=&quot;`cat /proc/cmdline`&quot; --initrd=/boot/initrd.img-2.6.35.10-kdump /boot/vmlinuz-2.6.35.10-kdump</div><div>kexec -e</div><div><br></div><div>works fine and loads the kernel successfully, i will be able to see <b>starting new kernel</b> in the shell</div>

<div><b><br></b></div><div><b><span style="font-weight:normal"><div>chkconfig kdump on</div><div>/etc/init.d/kdump start</div>
</span></b></div><div><div style="font-weight:normal">kexec -p --append=&quot;`cat /proc/cmdline`&quot; --initrd=/boot/initrd.img-2.6.35.10<b><div style="font-weight:normal;display:inline !important">
-kdump</div></b><b><div style="font-weight:normal;display:inline !important"> /boot/vmlinuz-2.6.35.10<b><div style="font-weight:normal;display:inline !important"><b><div style="font-weight:normal;display:inline !important">

-kdump</div></b></div></b></div></b></div><div style="font-weight:normal"><b><div style="font-weight:normal;display:inline !important"><b><div style="font-weight:normal;display:inline !important"><br></div></b></div>
</b></div><div style="font-weight:normal">i simulate the panic by using </div><div style="font-weight:normal"><div>echo 1 &gt; /proc/sys/kernel/sysrq</div><div>echo c &gt; /proc/sysrq-trigger</div></div><div style="font-weight:normal">

<br></div><div style="font-weight:normal">which just crash the kernel and system hangs, and it does not show any message <b>starting new kernel.</b></div><div style="font-weight:normal"><b><br></b></div><div>Thanks,</div>

</div>
</div><br>