12-15-2009 11:23 AM
The CF card host the root file system which is ext2 format. When I copy file from the host system to the target system
"cp a.out /mnt/ext2/home/"
It gives an error that "cp: accessing 'home/a.out' Input/Output error"
12-15-2009 12:08 PM
Sounds like maybe you haven't got a formatted CF card, but I'm only guessing as I haven't seen that.
Can you run any other utilites that will check it.
12-15-2009 12:31 PM
When the system boots:
It has already said
"VFS: Mounted root (ext2 file system) on device 1:0"
As I have installed busy box, I can run most of Linux function.
So when I run "df" it comes as
Filesystem 1k-blocks used used% Mouted on
/dev/root.old 4027 2744 68% /
Does that looks like unformated?
12-15-2009 12:58 PM
If you're running the root file system on it then it must be fine. That was not clear to me in your 1st post.
I'm assuming that you're trying to copy more files onto the CF card from your linux host.
Are you mounting the right partition maybe on the host maybe as there can be a couple partitions, one is a dos partition if you're loading a bitstream on the board from it, and then the ext2 partitions?
12-15-2009 05:22 PM
It is the filesystem error for sure.
When I insert the cf card to host system. the kernel buffer ring print as
EXT2-fs warning: mounting fs with errors, running e2fsck is recommended
After that, I run the e2fsck.
/dev/sdg5 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdg5: 471/12192 files (0.6% non-contiguous), 7600/48768 blocks
That's it. But the file system will not get fixed after that, what should I do now?
12-16-2009 08:14 AM
More things to mention:
Here it the view I saw the lib directory from the host machine
And here is the view I saw it from the target system.
12-16-2009 08:27 AM
I use ext3 filesystems on CF as it has journalling to help deal with the flash better. I'm certainly no expert on this topic though.
12-30-2009 02:10 PM
I have a hunch that maybe you are using an initramfs as the root file system. When you did "df", it says you have 4MB of space total. But the e2fsck command printed out 48768 blocks which is much larger than 4MB regardless of the block size (e.g. 1024 byte block * 48768 = ~48 MB).
Can you post this information about your embedded system?