[Question] cp result.txt /dev/mtd0 problem

Vipin Malik vipin at embeddedlinuxworks.com
Mon Jul 16 09:41:17 EDT 2001


At 08:44 AM 7/16/2001 -0400, Andrew Dixon wrote:

> >  when I followed the step in FAQ manual.
> >  I tried
> >
> >  cp /tmp/jffs.image  /dev/mtd0
> >
> >  I got
> >
> >  cp: /dev/mtd0  Read only file system.
> >
>
>Have you mounted /dev/mtd0 onto a file system?  You probably need to do
>something like:
>
>         #mount -t mtd /dev/mtd0 /flash
>                ^^^^^^

/dev/mtd is not a filesystem- it is a char device. You cannot mount it. 
(though you can mount a *filesystem* on top of it (via its cousin- mtdblockn)).

try the following:
# strace cp /tmp/jffs.image  /dev/mtd0

See where it fails. It may give you a clue.

Vipin





More information about the linux-mtd mailing list