Save kernel panic logs between multiple reboots

Feb 16, '04 10:27:00AM

Contributed by: blb

While this may apply only to a very few people in rare circumstances, it is quite useful at those times. When a kernel panic occurs, the log information is stored in NVRAM for a reboot cycle, which means that if the information isn't saved after the first reboot, it's gone. For those like me who prefer to boot single-user to fsck manually after issues, and use reboot afteward, the panic information is lost. The way to save it is as follows:

  1. After fsck finishes with filesystem OK, mount / as writable:
     % /sbin/mount -uw /
    
  2. Run panicdump to save the information:
     % /usr/libexec/panicdump
    
  3. Finally, sync and reboot:
     % sync;sync;sync;reboot
    
This should get the panic information into the proper place (/Library/Logs/panic.log) before the information is lost.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2004020904090467