Halloween is approaching. It is apt I have a scary tale to tell.
I left my laptop on in the sun, on a surface with poor conductivity. As I opened it, I glimpsed it complaining of heat exhaustion before it powered off. (That’s happened to me before, too!) I let it cool off, but on booting Ubuntu, a terrifying message was all that appeared on the screen:
Error 16: Inconsistent filesystem structure
Uh oh. Did I lose everything? What haven’t I backed up lately? Indeed, what have I backed up lately?
I searched online for the error message, and took heart when others reported no data loss in various forums. Running fsck was suggested, though in at least one case they resorted to reinstalling the OS. No way I’m doing that!
My first instinct was to dust off my USB DVD writer and burn a Ubuntu rescue CD. This turned out to be unnecessary, but at least I was reassured when I used it to mount the Linux partition and found my files intact. Firing up fsck had no effect: I was still defeated by the same error message.
Playing with the GRUB command-line (by pressing “c” instead of selecting an kernel to boot) showed that the initrd image was corrupted, as selecting the newest image with the “initrd” command triggered the same error message.
The solution was easy. Boot up an older kernel, then download a fresh copy of the initrd image by running:
$ sudo apt-get install --reinstall linux-image-2.6.32-25-generic