Click to See Complete Forum and Search --> : [SOLVED] Need to crash the kernel for testing.


Piko
06-16-2006, 12:13 AM
I was wondering if anyone knows were I can find a test driver for crashing the Linux kernel. I need to send it into a kernel panic, so I can test the LKCD. I want to see how the LKCD works.

I think I'm going to have to make a custom driver to test it.

GliderMike
06-16-2006, 12:23 AM
Hey, we found one thing Windows does better than Linux :-)

tucolino
06-16-2006, 05:33 AM
I think you get a panic if you dont have / when booting... i think that was the only time i was able to panic the kernel... dont remember well though.

phlipant
06-16-2006, 11:06 AM
I think you get a panic if you dont have / when booting... i think that was the only time i was able to panic the kernel... dont remember well though.


Hmmm, sounds like a job for rm -rf :D

Piko
06-16-2006, 03:10 PM
Yeah, but without a "/" mount I won't get the /var/dump made, and I kind of need that. So it looks like I'm going to have to try out the new Linux Driver Developer Kit.

tucolino
06-16-2006, 08:15 PM
Yeah, but without a "/" mount I won't get the /var/dump made, and I kind of need that. So it looks like I'm going to have to try out the new Linux Driver Developer Kit.

i think in that case you could just leave /var then

Piko
06-17-2006, 12:48 AM
Well I got it.

I made a simple module, that on int crash_init() calls the kernel to go into panic().

$ insmod crash.ko

.....Did it work? Well, oh, it's frozen.............. IT WORKED! :D

Now I just need to get the kernel built with LKCD activated.

All this work to get Linux to crash geeeeeeeez, I should just go back to Windows. :p