"mtd write" on NAND

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.

Please help me understand if this is indeed true.

Many thanks.

Use sysupgrade as much as it pertains OpenWrt (and avoid chatbots messing your ways)

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.

Immediate reboot without verifying write will advance the damage quicker

@brada4 , @mk24 - thank you both for your comments. I am biting the bullet and switching to “sysupgrade” from now on.