Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm have a JFFS2 root filesystem running on a large NAND device. Every once in a while, when I restart the computer, I get error messages about invalid ELF headers when /sbin/init or /bin/login try to load dynamically linked shared libraries from the /lib folder

The errors cause a kernel panic and I'm stuck reflashing the NAND to get the computer up and running again.


/sbin/init: error while loading shared libraries: /lib/libc.so.6: invalid ELF header
Kernel panic - not syncing: Attempted to kill init!
Call Trace:
[dffc1d20] [c0007c74]  (unreliable)
[dffc1d60] [c0020d68] 
[dffc1db0] [c0025074] 
[dffc1e80] [c00250bc] 
[dffc1f40] [c000f340] 

It seems that somehow the dynamically linked libraries in the /lib folder are becoming corrupted. I don't think that dynamically linked libraries are even written to disk during normal operation (unless you're doing an update). So that rules out a partial write with a loss of power causing the corruption.

So the only other causes I can think of are that either JFFS2 has some sort of terrible bug that is corrupting files that aren't even being written to? Or the NAND itself is being corrupted?

Does anyone have any other ideas? Or am I way off base?

share|improve this question

migrated from stackoverflow.com May 9 '11 at 12:34

This question came from our site for professional and enthusiast programmers.

How old is your kernel? I've seen some very odd behaviours from JFFS2 on older kernels. – Marcin May 10 '11 at 11:52

Are you mounting the root partition, or whatever partition your libraries exist on with the "noatime" option? If not, every access is causing a write.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.