NAS326: bad blocks in NAND and two different firmware versions installed
mahowi
Posts: 6 Freshman Member
On my NAS326 I have two different firmware versions installed in NAND1 and NAND2. From fw_printenv:
Is there any chance to fix this?
#NAS_Mar_2020
fwversion_1=V5.21(AAZF.3) fwversion_2=V5.21(AAZF.7)Could this be related to bad blocks in NAND:
Bad block table found at page 131008, version 0x01 Bad block table found at page 130944, version 0x01 nand_read_bbt: bad block at 0x000002320000 nand_read_bbt: bad block at 0x000006b60000 nand_read_bbt: bad block at 0x00000cd60000 nand_read_bbt: bad block at 0x00000d920000 nand_read_bbt: bad block at 0x00000f500000 nand_read_bbt: bad block at 0x00000f940000
Apparently only Kernel-2 and RootFS-2 are updated but not Kernel-1 and RootFS-1. But sometimes the NAS boots with kernel-1 and asks me to upgrade the firmware. After reboot I get the message that the firmware update is done but Kernel-1 and RootFS-1 are still on version V5.21(AAZF.3).
Is there any chance to fix this?
#NAS_Mar_2020
0
Accepted Solution
-
Except for the 'sometimes the NAS boots with kernel-1' this is expected behavior. When you flash a new version, it is flashed to the other, currently inactive half of the flash. Only when flashing succeeded, a flag is set in the u-boot environment to switch to 'the other half'. This way you can never have a bad flash.Further it's normal to have 2 different versions of firmware in the flash, the current and the previous.When you box boots with kernel-1, and you flash it, the new firmware is written to kernel-2, where it already was.About the bad blocks, that can be normal. Most boxes have some bad blocks in nand, and the nand driver in the kernel can handle that. As long as the bad blocks are stable (as in always the same) this is no problem.'sometimes the NAS boots with kernel-1', this is worrying. As an extra protection against a bad flash the bootloader can detect when the linux kernel fails to boot (it doesn't reset a watchdog in time), and then the bootloader will revert to the previous flash half. This is not supposed to happen. Maybe you have a nand-block containing part of kernel-2 which is only sometimes bad?Anyway, it's relatively easy to get the latest firmware in kernel-1. Just flash it once again while you are running kernel-2. Maybe it will decline because it is no upgrade. In that case you'll have to enable the ssh server, login over ssh, and executesu
echo 1 > /firmware/mnt/info/revisionand retry the flash.
1
All Replies
-
Except for the 'sometimes the NAS boots with kernel-1' this is expected behavior. When you flash a new version, it is flashed to the other, currently inactive half of the flash. Only when flashing succeeded, a flag is set in the u-boot environment to switch to 'the other half'. This way you can never have a bad flash.Further it's normal to have 2 different versions of firmware in the flash, the current and the previous.When you box boots with kernel-1, and you flash it, the new firmware is written to kernel-2, where it already was.About the bad blocks, that can be normal. Most boxes have some bad blocks in nand, and the nand driver in the kernel can handle that. As long as the bad blocks are stable (as in always the same) this is no problem.'sometimes the NAS boots with kernel-1', this is worrying. As an extra protection against a bad flash the bootloader can detect when the linux kernel fails to boot (it doesn't reset a watchdog in time), and then the bootloader will revert to the previous flash half. This is not supposed to happen. Maybe you have a nand-block containing part of kernel-2 which is only sometimes bad?Anyway, it's relatively easy to get the latest firmware in kernel-1. Just flash it once again while you are running kernel-2. Maybe it will decline because it is no upgrade. In that case you'll have to enable the ssh server, login over ssh, and executesu
echo 1 > /firmware/mnt/info/revisionand retry the flash.
1
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 149 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 264 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 41 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight