MTD copy on JFFS2
Kenneth Johansson
kenneth.johansson at etx.ericsson.se
Wed Oct 2 08:37:01 EDT 2002
On Tue, 2002-10-01 at 15:12, Sriram Neelakandan Iyer wrote:
> hi list,
> i have 2 jffs2 partitions(over mtd) used for storing
> config files.
> I need to copy all the files from one partition to
> another, and the destination mtd partition is larger
> than the source mtd partition.(i cannot mount the
> second partition as jffs2 before the data is copied)
So what you want is to change the partition layout on a live system and
that is not possible as the same flash block would for a period end up
in two partitions.
> But mkfs.jffs2 needs libz and both of them occupy
> about 87K of space.
>
> So i plan to do a plain mtd-copy ,i.e
> 1. first unmount source jffs2,
> 2. read over the source mtd-char-device and
> 3. dump it back to the second mtd-partition.
>
> Will jffs2 be able to mount the second partition
> without trouble? (or) must i do a mkfs.jffs2 always
> to have a jffs2 mountable partition.
>
> regards
> sriram.
Could work. but why not.
1. copy from old partition to ramdisk
2. change to new partition layout
3. erase and mount new partition
4. copy files from ramdisk to new partition.
--
Kenneth Johansson
Ericsson AB Tel: +46 8 404 71 83
Borgafjordsgatan 9 Fax: +46 8 404 72 72
164 80 Stockholm kenneth.johansson at etx.ericsson.se
More information about the linux-mtd
mailing list