Skip to contentSkip to conversation

dd image without flash_eraseall

DISCUSSION Nikhil 1 participant 1 message Nov 24, 2005 1 message not in the archive Memory technology devices (MTD)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Nikhil

author
#1 lore raw

On Thu, Nov 24, 2005, Nikhil <[email protected]> said:

Hi all,

I just wanted some clarity on some of the results i am geting by 'dd'ing on compact flash without flash_eraseall

I did the following
1) Made an image of some directory with 40 odd files usking mkfs.jffs2
2) dd if=image of=/dev/mtdblock0
3) mount -t jffs2 /dev/mtdblock0 /mnt/cf
4) checked the contents by ls then removed around 19 files by rm.
5) unmounted
6) dd the same image again
7) mounted and checked by ls

i was expecting to get all the files but the files which were removed by rm were not present. i understand that doing flash_eraseall will overcome this problem but the following expt makes things confusing.

In this expt. i did the same step from the above 1-5. Now instead of dd'ing the same image, I dd some different image. Now this image is overwritten onto the flash (without me explicitly using flash_eraseall).

If dd'ing a new image overwrites the flash (without flash_eraseall), shouldn't the same be true when I dd the same image?

--
Thanks & Regards

Nikhil Shirodkar
Project Engineer
NISG, CDAC