I'm using Linux in embedded systems, and want to configure the system to automatically reboot after a kernel panic. However, when the system comes back up, it's important for me to detect and log the fact that the kernel panicked (rather than, say, the user toggling the power switch).

I could configure a kernel core dump on panic, and check for the dump on restart, but that seems like it could cause trouble if the file system isn't A-OK (plus I've been trying to set up kernel core dumping and have yet to succeed).

Any suggestions?


If you run customized kernels for your embedded hw and have some hw register/bit available you may be able to customize the kernel crash code to set a flag in that hw location which you'd check after reboot.

If not AFAIK you're only chance is to configure your kernel core dumping facility. Indeed, it's risky to write to a 'live' filesystem, but you can use a swap partition or a small dedicated partition instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.