[Solved] Install when NAND has bad blocks

Hi

I am preparing to install OpenWrt on an Zyxel NAS, the NSA310 (https://openwrt.org/toh/zyxel/nsa310b).
Reading through the boot log of the original firmware, I saw that the NAND has 2 bad blocks. The installation instructions are to use the following U-Boot commands to write the OpenWrt image:

nand erase.part ubi
nand write 0x2000000 ubi 0x600000

I would like to know if these commands can handle the existing bad blocks. After searching a little, I could not find some definitive information on this.

Thanks in advance for any help!

If the blocks are marked bad, they system has already handled it.

1 Like

Hi,

Could you maybe clarify a bit more? Mainly because I am not familiar with U-Boot and I do not find these commands in the documentation on the U-Boot site.

I also understand that currently the system handles the bad blocks - I guess by the UBI layer in this case. Therefore, I suspect that the bad blocks information would be lost if the flash was deleted by a simple "erase" command.
So in the case of nand erase.part ubi, is the "ubi" part just the name of a partition, or does it also mean that the UBI layer is left in place and the bad blocks info with it?

Edit: I am updating this to confirm that the bad blocks are not a problem in this case, I did the install and the bootloader knows about them when erasing the memory. Not sure what would happen if they were inside the bootloader partition, but in my case they are not.