kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Debug Kernel Crash
@ 2011-03-31  4:05 swathi suresh
  2011-03-31  7:34 ` swathi suresh
  0 siblings, 1 reply; 5+ messages in thread
From: swathi suresh @ 2011-03-31  4:05 UTC (permalink / raw)
  To: kernelnewbies

Hello All,

         I wanted to know what is the best way to generate the kernel crash
dump on kernel panic,
after doing some searching, i came to know we can use kexec to load a new
kernel on the kernel,
i followed the instruction from the following links
http://www.dedoimedo.com/computers/kdump.html
http://www.developertutorials.com/tutorials/linux/reboot-linux-faster-072204-1358/

I do found that the  kernel load properly with the, kexec -l option followed
by kexec -e option,
but when i set the kernel to be loaded on kernel panic using the option
kexec -p, i see that after
kernel crash, the system just hangs, it wont even try to load the new
kernel. following are the
commands am using. Can some one point, if there is any thing wrong with
this.

chkconfig kdump on
/etc/init.d/kdump start
kexec -l --append="`cat /proc/cmdline`"
--initrd=/boot/initrd.img-2.6.35.10-kdump /boot/vmlinuz-2.6.35.10-kdump
kexec -e

works fine and loads the kernel successfully, i will be able to see *starting
new kernel* in the shell
*
*
*
chkconfig kdump on
/etc/init.d/kdump start
*
kexec -p --append="`cat /proc/cmdline`" --initrd=/boot/initrd.img-2.6.35.10*
-kdump
**
 /boot/vmlinuz-2.6.35.10
-kdump
*
*

*
i simulate the panic by using
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

which just crash the kernel and system hangs, and it does not show any
message *starting new kernel.*
*
*
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110331/dc7bcc18/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Debug Kernel Crash
  2011-03-31  4:05 Debug Kernel Crash swathi suresh
@ 2011-03-31  7:34 ` swathi suresh
  2011-03-31 15:28   ` Thayumanavar S
  0 siblings, 1 reply; 5+ messages in thread
From: swathi suresh @ 2011-03-31  7:34 UTC (permalink / raw)
  To: kernelnewbies

Hello All,

         I wanted to know what is the best way to generate the kernel crash
dump on kernel panic,
after doing some searching, i came to know we can use kexec to load a new
kernel on the kernel,
i followed the instruction from the following links
http://www.dedoimedo.com/computers/kdump.html
http://www.developertutorials.com/tutorials/linux/reboot-linux-faster-072204-1358/

I do found that the  kernel load properly with the, kexec -l option followed
by kexec -e option,
but when i set the kernel to be loaded on kernel panic using the option
kexec -p, i see that after
kernel crash, the system just hangs, it wont even try to load the new
kernel. following are the
commands am using. Can some one point, if there is any thing wrong with
this.

chkconfig kdump on
/etc/init.d/kdump start
kexec -l --append="`cat /proc/cmdline`"
--initrd=/boot/initrd.img-2.6.35.10-kdump /boot/vmlinuz-2.6.35.10-kdump
kexec -e

works fine and loads the kernel successfully, i will be able to see *starting
new kernel* in the shell
*
*
*
chkconfig kdump on
/etc/init.d/kdump start
*
kexec -p --append="`cat /proc/cmdline`" --initrd=/boot/initrd.img-2.6.35.10*
-kdump
**
 /boot/vmlinuz-2.6.35.10
-kdump
*
*

*
i simulate the panic by using
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

which just crash the kernel and system hangs, and it does not show any
message *starting new kernel.*
*
*
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110331/86680b09/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Debug Kernel Crash
  2011-03-31  7:34 ` swathi suresh
@ 2011-03-31 15:28   ` Thayumanavar S
  2011-04-01  3:37     ` swathi suresh
  0 siblings, 1 reply; 5+ messages in thread
From: Thayumanavar S @ 2011-03-31 15:28 UTC (permalink / raw)
  To: kernelnewbies

> kernel. following are the
> commands am using. Can some one point, if there is any thing wrong with
> this.
> chkconfig kdump on
> /etc/init.d/kdump start
> kexec -l --append="`cat /proc/cmdline`"
> --initrd=/boot/initrd.img-2.6.35.10-kdump /boot/vmlinuz-2.6.35.10-kdump
> kexec -e
> works fine and loads the kernel successfully, i will be able to see starting
> new kernel in the shell
> chkconfig kdump on
> /etc/init.d/kdump start
> kexec -p --append="`cat /proc/cmdline`" --initrd=/boot/initrd.img-2.6.35.10
> -kdump
> ?/boot/vmlinuz-2.6.35.10
> -kdump
> i simulate the panic by using
> echo 1 > /proc/sys/kernel/sysrq
> echo c > /proc/sysrq-trigger
> which just crash the kernel and system hangs, and it does not show any
> message?starting new kernel.
does /var/crash or kdump target directory as mentioned in
/etc/kdump.conf exists?
sometime it may be a while before it starts to dump if memory on
machine is huge and
you have set kdump level to dump everything.

thx,thayumanavar s.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Debug Kernel Crash
  2011-03-31 15:28   ` Thayumanavar S
@ 2011-04-01  3:37     ` swathi suresh
  2011-04-01  7:17       ` Thayumanavar S
  0 siblings, 1 reply; 5+ messages in thread
From: swathi suresh @ 2011-04-01  3:37 UTC (permalink / raw)
  To: kernelnewbies

Hi,

does /var/crash or kdump target directory as mentioned in
> /etc/kdump.conf exists?
>

One thing i forgot to mention is in my root there is not configuration file
/etc/sysconfig/kdump or
/etc/kdump.conf, is this anything to do with this and not even /var/crash, i
got the latest kexec-tool
source from the git and build it.


> sometime it may be a while before it starts to dump if memory on
> machine is huge and
>

i almost left my system for an hour, but it was in the same hang state.


> you have set kdump level to dump everything.


Where else can be the configuration file other then /etc/sysconfig/kdump or
/etc/kdump.conf.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110401/45854696/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Debug Kernel Crash
  2011-04-01  3:37     ` swathi suresh
@ 2011-04-01  7:17       ` Thayumanavar S
  0 siblings, 0 replies; 5+ messages in thread
From: Thayumanavar S @ 2011-04-01  7:17 UTC (permalink / raw)
  To: kernelnewbies

>> does /var/crash or kdump target directory as mentioned in
>> /etc/kdump.conf exists?
>
>
> One thing i forgot to mention is in my root there is not configuration file
> /etc/sysconfig/kdump or
> /etc/kdump.conf, is this anything to do with this and not even /var/crash, i
> got the latest kexec-tool
> source from the git and build it.
This file will be provided the kexec-tools rpm of any distribution. I
am not sure whether the git repo has it or not.
It would be easier (say if you are on redhat, you can yum install
kexec-tools, yum install kernel-kdump, boot it in kdump kernel) if
your distribution rpms to set it up.
You need to append crashkernel=128M at 16M on kernel command line and
boot it into the kdump kernel ( that you might have built with certain
kexec related options enabled). Also you create directory /var/crash
if it does not exist  and you need to regenerate or create a new
initrd for the second kernel( that will boot when crash happens).
thx,thayumanavar s.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-01  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31  4:05 Debug Kernel Crash swathi suresh
2011-03-31  7:34 ` swathi suresh
2011-03-31 15:28   ` Thayumanavar S
2011-04-01  3:37     ` swathi suresh
2011-04-01  7:17       ` Thayumanavar S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).