Understanding nanddump /nandwrite

Hello,

I'm a little bit confused with the utilities nanddump and nandwrite and their various options. If I have understood well, NAND flash memory is divided in blocks, then pages and those are composed of three parts : the data, the oob and ecc bits. The data being generally a specific filesystem (jffs2, yaffs, ubifs). Right ?

So, when using dd or cat on a mtd device, the whole flash memory is copied, including the oob and ECC. Which is bad because of bad blocks and / or having ECC / oob data which can be specific a NAND chip. Right ?

So, if I want to use nanddump to get data the same way dd does for block devices / files, which options should I choose ? --noecc --omitoob ? Which bb method should I choose ?

Now assuming that I have my dump and that I want to restore it. As I understand, I should use nandwrite for the very same reasons to choose nanddump. Then which options should I use to:

  • restore it to the same mtd partition ?
  • restore it to another mtd partition on the same flash ?
  • restore it to another mtd partition on another flash ?

Than you in advance for your answers. I've been digging on the web for a while without finding a precise answer.

DO NOT USE CAT!!!

There are multiple threads on this forum where someone had a corrupt copy/image - or completely bricked their device using CAT.

The data, once copied will be an image of the partition - so yes.


  • On you're other questions, I'm not sure; because I use dd for these needs, even on a NAND device.