Linux should dump kernel panics to disk

Registered by Simon Law on 2006-05-08

When reporting kernel panics, submitters are often asked to take
a photograph of their screen or to transcribe the kernel panic into
a bug. This is tedious and introduces errors into the process.
Sometimes, reporters cannot even see the panic because they
are not on a console.

A kernel crash dump facility would handily solve these problems.

Blueprint information

Robbie Williamson
Michael Vogt
Series goal:
Accepted for karmic
Beta Available
Milestone target:
milestone icon karmic-alpha-3
Started by
Robbie Williamson on 2009-06-24

Related branches


BenC: Implementing this isn't as straight forward as I thought. For the first time ever we need a package that _IS NOT_ available in Debian :)

Once I get the new package in, I'll make the kdump kernels available. It will be a manual setup at first. Implementing auto-setup of this will be worked out over edgy development.

2006-08-31: <BenC> Kamion: now that I figured out why my kexec-tools upload wasn't getting accepted, all that's needed is that script for initramfs...should be rather simple

2006-11-23: Retarget remaining bits to feisty.

2007-05-23: All the parts are in gutsy, and if turned on, will dump a vmcore file in /var/crash/. However, we are still waiting for tools like crash-utils to work with 2.6.22 to make use of it.

2007-10-31: Finalize the last bits of this for hardy - BenC

2008-03-04: How can this be enabled on Gutsy? I couldn't find any useful docs. The linux-image-kdump package header says "Please read the information in /usr/share/doc/linux-image-kdump/ for how to setup this kernel." but I couldn't find any useful info in there - ChrisWilson

2008-05-22 There seems to be a useful shell script to set up kdump etc. on Hardy. It may get lost because it is in pastebin and it has a copyright notice that makes me hesitant to copy it: Even after using it, I didn't actually get dumps on my system. Not sure why. As an interim solution, some manual process like this is valuable and should be documented and advertised. D. Hugh Redelmeier

2008-06-20 - BenC - This is pretty much implemented in intrepid now. The only things waiting to occur is makedumpfile getting into main, and apport getting detection for vmcore existing. Bug was filed on apport, and Marting Pitt says he will get that part done. All one needs to do is install linux-crashdump-<flavour> and reboot.

2008-06-26 - ceeKay - With some advice from BenC, I got a kexec/kdump setup working on Feisty. Pulled the kexec-tools and makedumpfile source packages from intrepid, built binary .deb's without a problem, installed, and verified functionality (I did have to remove 'irqpoll' from /etc/init.d/kdump's append options or my system went into an infinite loop with ACPI errors). Presumably once these bits and scripts are finalized on Intrepid, this could be a good candidate for backporting so people can do crash dumps on older releases (or ones like Gusty that will be supported for longer).

2008-08-01 - amano - Maybe I am confusing some things. But: In another spec the introduction of an encryted "Private" Folder is targeted for Intrepid. Wouldn't it be a good idea if all kernel/apport/bug-buddy crash logs went to ~/Private/Logs/ by default? To have them all visibly in one space and encryted to keep all possibly sensible information hidden. Then just the swapfile would have to be encrypted for intrepid+x.

2009-06-17: The Ubuntu Foundations team has taken ownership of this feature

2009-06-19:mvo: I looked into the current state of affairs and it seems like the crashkernel feature is currently not working (tested on two machines, i386 and amd64). See bug #389449 and bug #364414.
2009-06-22:mvo: problems #389449 and bug #364414 should be fixed with the latest grub upload
2009-06-24:mvo:client bits mostly in place, linux-meta needs a update (#391026) but then the reporting should work once linux-crashdump is installed
2009-07-09:mvo:required apport changes in lp:~mvo/apport/kernel-crashdump
2009-07-16:mvo:new apport uploaded, should work now (after installing kernel-crashdump)
2009-07-21:robbie.w:retargeted to alpha 3 :)
2009-08-25:mvo:submitting to launchpad is currently blocking on (timeout on large uploads)


Work Items