UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant jiangyuebing
Participant
7,643 Views
Registered: ‎02-24-2009

error on CF card root file system

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"

 

Any idea?

 

0 Kudos
9 Replies
Xilinx Employee
Xilinx Employee
7,636 Views
Registered: ‎09-10-2008

Re: error on CF card root file system

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.

0 Kudos
Participant jiangyuebing
Participant
7,632 Views
Registered: ‎02-24-2009

Re: error on CF card root file system

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?

 

yuebing

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,630 Views
Registered: ‎09-10-2008

Re: error on CF card root file system

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?

 

0 Kudos
Participant jiangyuebing
Participant
7,624 Views
Registered: ‎02-24-2009

Re: error on CF card root file system

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?

 

0 Kudos
Participant jiangyuebing
Participant
7,622 Views
Registered: ‎02-24-2009

Re: error on CF card root file system

and the demsg keeps telling me that I am unable to read the inode block.

 

any ideas?

 

 

0 Kudos
Participant jiangyuebing
Participant
7,600 Views
Registered: ‎02-24-2009

Re: error on CF card root file system

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.

Any ideas?

0 Kudos
Xilinx Employee
Xilinx Employee
7,596 Views
Registered: ‎09-10-2008

Re: error on CF card root file system

Not sure where to go.  Did you tell e2fsck to fix the problems as it doesn't by default I think?

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,594 Views
Registered: ‎09-10-2008

Re: error on CF card root file system

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.

 

0 Kudos
Visitor dbaird
Visitor
7,508 Views
Registered: ‎02-16-2009

Re: error on CF card root file system

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?

 

  • The kernel command line (with root=... console=..., etc.)
  • mount -t proc none /proc; cat /proc/mounts

-David
0 Kudos