LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 04-06-2011, 04:08 PM   #1
cfnielse
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Problem on Linux NAND root filesystem


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 shared libraries like /lib/libpam.so.0

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

Does anyone have any idea what might be causing this? Is the NAND being corrupted when it's running and then unable to restart? Is JFFS2 unreliable?

Example:

/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]
 
Old 04-06-2011, 04:15 PM   #2
foottuns
Member
 
Registered: Nov 2009
Location: London
Distribution: Fedora 16
Posts: 92

Rep: Reputation: 17
follow this link, this might help you out...

http://www.linuxquestions.org/questi...raries-786638/
 
Old 04-06-2011, 05:29 PM   #3
cfnielse
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the response.

You're right, the library files are getting corrupted.

I tested it out by corrupting a couple myself using dd and the behaviour was identical to what I have been observing.

Now I've got to figure out the cause of the corruption. Dynamic library files in the /lib folder are there to be used by the kernel during startup. I can't imagine that they ever get written to during runtime. Which I guess exonerates JFFS2 failing a write.

So what is left as a cause? Either JFFS2 has a terrible bug that causes it to ruin innocent bystander files? Or the NAND itself is becoming corrupt?

Last edited by cfnielse; 04-06-2011 at 09:02 PM.
 
Old 04-07-2011, 05:51 AM   #4
foottuns
Member
 
Registered: Nov 2009
Location: London
Distribution: Fedora 16
Posts: 92

Rep: Reputation: 17
what distro are u using now?
 
Old 04-09-2011, 12:34 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Just to throw a bit at the wall...
What if the error messages about invalid ELF headers is caused by corruption in the filesystem itself? If the filesystem results in a read that contains data that isn't actually a file, or data belonging to some other file, then that could account for the corruption, since the filesystem in general is a read/write system. Is there any way you can run fsck against the borked flash? Maybe create a separate partition that can be restored in isolation in order to get a bootable system, but still usable for diagnostics?

--- rod.
 
Old 04-10-2011, 01:30 PM   #6
foottuns
Member
 
Registered: Nov 2009
Location: London
Distribution: Fedora 16
Posts: 92

Rep: Reputation: 17
you might try this...

http://www.mail-archive.com/linux-39.../msg57147.html


this week at work i had a problem with my xen server, the problem was on my filesystem, what i had to do is to restart xen and start a scanning to my filesystem. you might try to use fsck -A -v, try also fsck --help command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMDK2450 - Linux root file system mounting from NAND Flash aprajam Linux - Embedded & Single-board computer 10 10-19-2011 01:00 AM
Unable to mount root fs: s3c2410 based board, Nand flash swapnilborg Linux - Embedded & Single-board computer 4 10-07-2011 12:43 PM
Can not get my root file system booted from NAND priyadarshan Linux - Software 3 12-10-2010 04:18 AM
[SOLVED] 2.6.27 xfs root filesystem read only problem Linux.tar.gz Linux - Software 10 02-12-2009 03:50 AM
Red hat 7.2 root filesystem problem xpat Linux - Distributions 2 12-22-2002 06:41 PM


All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration