Hi, I have always been using “mtd -r write <image_file_name>” on my venerable Linksys EA8500 and the TP-Link WR1043ND before that. I consider this to be the “cleanest” way. However, AI informs me that “mtd write” does not play nicely with NAND storage since it cannot handle bad blocks gracefully.
That is true. mtd write simply writes the blocks in order. It does not know to skip over bad blocks in NAND and will brick the router if there are any bad blocks in the area being written.
On a NOR flash such as the WR1043 that is not a problem since NOR flash is more robust and never has a bad block from the factory. Every block can take at least 100,000 write cycles until it could wear out, which is many more than expected in normal use. So NOR flash models do not have any bad block compensation in any case.