raspberry pi - RPi kernel panic with Raspbian

07
2014-07
  • Felix

    Some background: my RPi has been randomly shutting down since pretty much ever, I just reboot it (unplug / wait 1-2 minutes / plug) and it usually works again. I've never been able to trace the problem, the logs never say anything useful. So far I've chalked it off to RPi quirkiness, especially since I also have a USB HDD tied to it all the time (without a powered USB hub).

    However, last night it wouldn't boot after re-plugging it, so I went through the trouble of connecting an HDMI cable to it and I saw that the FS was corrupted. So I ran fsck, which fixed a lot of things, after which it booted. After a short while it said threw some FS errors, went into read-only mode and no commands were available (e.g. ls was not found). So I shut it down, plugged the SD card in my computer, ran fsck again there, which seemed to fix only some dirty bits. After plugging it back it it booted and seemed fine.

    This morning, however, it wouldn't respond. When I got home, this was on the screen:

    kernel panic

    I ran fsck on my computer and, apart from a dirty bit, it didn't find anything. I suspect that my SD card (Kingston 8GB Class 10 SDHC) is dying. Is there some way I can tell for sure? I just ran dd to back it up and that went just fine (apparently, at least). Other things I suspect:

    1. PSU. I'm currently using a Nexus 7 official charger, since it gives 2A, which I heard helps if running a USB HDD. Before I was using the RPi one (it had the RPi symbol on it), but I changed it hoping to get rid of the random shutting down...
    2. Temperature. Every morning the sun heats the area around where the RPi is (doesn't hit it directly, though). There are also other electronics that might get hot in that closed space (router, cable box).
  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    operating systems - What is a kernel panic?
  • RCIX

    I know that this sounds like a LMGTFY question but i thought i'd ask it so that google actually turns up (more) good results. What is it?


  • Related Answers
  • John T

    A kernel panic takes place when an Operating System detects a fatal error that it cannot recover from. This is a term specific to UNIX and UNIX-like Operating Systems (Linux, OSX, etc). The Windows term is a "STOP Error", and the OS will make a memory crash dump and write to the system log files, you may even get the well known "Blue screen of death".

    The wikipedia article covers it better than I can: http://en.wikipedia.org/wiki/Kernel_panic

  • Dan Walker

    A kernel panic is when the kernel (the very base of your operating system that talks to the hardware) has a problem that it can't recover from without being restarted. Because the kernel is at such a low level, the only way to restart the kernel is to restart the entire computer.

  • hasenj

    It's the Linux (and UNIX) equivalent of the infamous BSoD (Blue Screen of Death).

    From wikipedia's Kernel Panic page:

    A kernel panic is an action taken by an operating system upon detecting an internal fatal error from which it cannot safely recover. The term is largely specific to Unix and Unix-like systems; for Microsoft Windows operating systems the equivalent term is ‘Stop error’ (or, colloquially, ‘Blue Screen of Death’).

  • nik

    Google does turn up good results -- Wikipedia Kernel Panic page