dd image without flash_eraseall

Nikhil nikhils at cdac.in
Thu Nov 24 01:44:04 EST 2005


On Thu, Nov 24, 2005, Nikhil <nikhils at cdac.in> 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




More information about the linux-mtd mailing list