ECC errors in UBI RB2011UiAS-2HnD-IN (and solution)

I see that you have the correct kernel commandline.

You should boot from ethernet using openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf. If you boot this way, the mikrotik runs it's root filesystem from RAM. Then you do sysupgrade to install to flash memory. (during install, the ubi.mtd=6,2048 is also needed)

yes, i did boot from openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf
when i run sysupgrade

`

[   84.885391] Call Trace:
[   84.887927] [<8006b5a0>] show_stack+0x70/0x8c
[   84.892453] [<80295b58>] ubi_io_read+0x26c/0x310
[   84.897230] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   84.902556] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   84.907326] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   84.912743] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   84.917789] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   84.927406] __nand_correct_data: uncorrectable ECC error
[   84.932952] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 291:512, read only 64 bytes, retry
[   84.945768] __nand_correct_data: uncorrectable ECC error
[   84.951290] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 291:512, read only 64 bytes, retry
[   84.964110] __nand_correct_data: uncorrectable ECC error
[   84.969618] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 291:512, read only 64 bytes, retry
[   84.982992] __nand_correct_data: uncorrectable ECC error
[   84.988500] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 291:512, read 64 bytes
[   84.999125] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.005598] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.014297]         806737e0 02460200 00000200 00000000 87228000 800a982c 00000000 00000001
[   85.022998]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   85.031707]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.040398]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.049107]         ...
[   85.051654] Call Trace:
[   85.054189] [<8006b5a0>] show_stack+0x70/0x8c
[   85.058699] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.063490] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   85.068892] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   85.073683] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.079080] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.084147] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.093751] __nand_correct_data: uncorrectable ECC error
[   85.099265] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:0, read only 64 bytes, retry
[   85.112438] __nand_correct_data: uncorrectable ECC error
[   85.117943] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:0, read only 64 bytes, retry
[   85.130286] __nand_correct_data: uncorrectable ECC error
[   85.135809] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:0, read only 64 bytes, retry
[   85.148140] __nand_correct_data: uncorrectable ECC error
[   85.153665] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:0, read 64 bytes
[   85.164205] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.170678] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.179394]         806737e0 02480000 00000000 00000000 87228600 800a982c 00000000 00000001
[   85.188104]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   85.196804]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.205513]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.214213]         ...
[   85.216750] Call Trace:
[   85.219289] [<8006b5a0>] show_stack+0x70/0x8c
[   85.223816] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.228587] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   85.233914] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   85.238685] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.244102] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.249153] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.258775] __nand_correct_data: uncorrectable ECC error
[   85.264317] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:512, read only 64 bytes, retry
[   85.277137] __nand_correct_data: uncorrectable ECC error
[   85.282657] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:512, read only 64 bytes, retry
[   85.295478] __nand_correct_data: uncorrectable ECC error
[   85.301000] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:512, read only 64 bytes, retry
[   85.313819] __nand_correct_data: uncorrectable ECC error
[   85.319327] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 292:512, read 64 bytes
[   85.329943] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.336419] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.345119]         806737e0 02480200 00000200 00000000 87228000 800a982c 00000000 00000001
[   85.353819]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   85.362528]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.371237]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.379927]         ...
[   85.382474] Call Trace:
[   85.385011] [<8006b5a0>] show_stack+0x70/0x8c
[   85.389520] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.394310] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   85.399714] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   85.404504] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.409901] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.414968] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.424573] __nand_correct_data: uncorrectable ECC error
[   85.430086] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:0, read only 64 bytes, retry
[   85.442437] __nand_correct_data: uncorrectable ECC error
[   85.447938] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:0, read only 64 bytes, retry
[   85.460279] __nand_correct_data: uncorrectable ECC error
[   85.465811] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:0, read only 64 bytes, retry
[   85.478147] __nand_correct_data: uncorrectable ECC error
[   85.483672] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:0, read 64 bytes
[   85.494098] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.500567] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.509266]         806737e0 024a0000 00000000 00000000 87228600 800a982c 00000000 00000001
[   85.517966]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   85.526666]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.535375]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.544084]         ...
[   85.546622] Call Trace:
[   85.549158] [<8006b5a0>] show_stack+0x70/0x8c
[   85.553682] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.558459] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   85.563786] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   85.568557] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.573974] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.579029] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.588637] __nand_correct_data: uncorrectable ECC error
[   85.594178] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:512, read only 64 bytes, retry
[   85.606999] __nand_correct_data: uncorrectable ECC error
[   85.612520] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:512, read only 64 bytes, retry
[   85.626164] __nand_correct_data: uncorrectable ECC error
[   85.631690] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:512, read only 64 bytes, retry
[   85.644506] __nand_correct_data: uncorrectable ECC error
[   85.650014] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 293:512, read 64 bytes
[   85.660629] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.667107] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.675815]         806737e0 024a0200 00000200 00000000 87228000 800a982c 00000000 00000001
[   85.684514]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   85.693224]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.701924]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.710614]         ...
[   85.713161] Call Trace:
[   85.715698] [<8006b5a0>] show_stack+0x70/0x8c
[   85.720206] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.724998] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   85.730400] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   85.735192] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.740597] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.745663] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.755270] __nand_correct_data: uncorrectable ECC error
[   85.760808] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:0, read only 64 bytes, retry
[   85.773152] __nand_correct_data: uncorrectable ECC error
[   85.778661] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:0, read only 64 bytes, retry
[   85.791003] __nand_correct_data: uncorrectable ECC error
[   85.796510] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:0, read only 64 bytes, retry
[   85.808848] __nand_correct_data: uncorrectable ECC error
[   85.814376] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:0, read 64 bytes
[   85.824802] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.831277] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   85.839971]         806737e0 024c0000 00000000 00000000 87228600 800a982c 00000000 00000001
[   85.848671]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   85.857371]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.866079]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   85.874780]         ...
[   85.877317] Call Trace:
[   85.879853] [<8006b5a0>] show_stack+0x70/0x8c
[   85.884379] [<80295b58>] ubi_io_read+0x26c/0x310
[   85.889155] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   85.894481] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   85.899252] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   85.904675] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   85.909726] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   85.919393] __nand_correct_data: uncorrectable ECC error
[   85.924936] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:512, read only 64 bytes, retry
[   85.937757] __nand_correct_data: uncorrectable ECC error
[   85.943284] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:512, read only 64 bytes, retry
[   85.956098] __nand_correct_data: uncorrectable ECC error
[   85.961619] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:512, read only 64 bytes, retry
[   85.974440] __nand_correct_data: uncorrectable ECC error
[   85.979947] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 294:512, read 64 bytes
[   85.990562] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   85.997040] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.005739]         806737e0 024c0200 00000200 00000000 87228000 800a982c 00000000 00000001
[   86.014439]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   86.023149]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.031858]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.040549]         ...
[   86.043095] Call Trace:
[   86.045632] [<8006b5a0>] show_stack+0x70/0x8c
[   86.050140] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.054932] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   86.060335] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   86.065131] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.070531] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.075601] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.108838] __nand_correct_data: uncorrectable ECC error
[   86.114379] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:0, read only 64 bytes, retry
[   86.126718] __nand_correct_data: uncorrectable ECC error
[   86.132243] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:0, read only 64 bytes, retry
[   86.145396] __nand_correct_data: uncorrectable ECC error
[   86.150922] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:0, read only 64 bytes, retry
[   86.163258] __nand_correct_data: uncorrectable ECC error
[   86.168761] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:0, read 64 bytes
[   86.179199] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   86.185675] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.194383]         806737e0 024e0000 00000000 00000000 87228600 800a982c 00000000 00000001
[   86.203083]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   86.211792]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.220484]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.229183]         ...
[   86.231730] Call Trace:
[   86.234266] [<8006b5a0>] show_stack+0x70/0x8c
[   86.238775] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.243567] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   86.248880] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   86.253671] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.259076] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.264144] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.273752] __nand_correct_data: uncorrectable ECC error
[   86.279262] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:512, read only 64 bytes, retry
[   86.292093] __nand_correct_data: uncorrectable ECC error
[   86.297597] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:512, read only 64 bytes, retry
[   86.310419] __nand_correct_data: uncorrectable ECC error
[   86.315939] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:512, read only 64 bytes, retry
[   86.328757] __nand_correct_data: uncorrectable ECC error
[   86.334280] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 295:512, read 64 bytes
[   86.344885] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   86.351360] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.360053]         806737e0 024e0200 00000200 00000000 87228000 800a982c 00000000 00000001
[   86.368753]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   86.377453]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.386163]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.394863]         ...
[   86.397401] Call Trace:
[   86.399937] [<8006b5a0>] show_stack+0x70/0x8c
[   86.404463] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.409238] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   86.414655] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   86.419424] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.424842] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.429888] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.439497] __nand_correct_data: uncorrectable ECC error
[   86.445038] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:0, read only 64 bytes, retry
[   86.457378] __nand_correct_data: uncorrectable ECC error
[   86.462896] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:0, read only 64 bytes, retry
[   86.475236] __nand_correct_data: uncorrectable ECC error
[   86.480740] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:0, read only 64 bytes, retry
[   86.493081] __nand_correct_data: uncorrectable ECC error
[   86.498587] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:0, read 64 bytes
[   86.509024] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   86.515501] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.524201]         806737e0 02500000 00000000 00000000 87228600 800a982c 00000000 00000001
[   86.532901]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   86.541610]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.550301]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.559011]         ...
[   86.561556] Call Trace:
[   86.564093] [<8006b5a0>] show_stack+0x70/0x8c
[   86.568602] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.573395] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   86.578705] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   86.583497] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.588894] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.593961] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.603568] __nand_correct_data: uncorrectable ECC error
[   86.609079] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:512, read only 64 bytes, retry
[   86.621909] __nand_correct_data: uncorrectable ECC error
[   86.627416] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:512, read only 64 bytes, retry
[   86.640241] __nand_correct_data: uncorrectable ECC error
[   86.645767] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:512, read only 64 bytes, retry
[   86.659401] __nand_correct_data: uncorrectable ECC error
[   86.664926] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 296:512, read 64 bytes
[   86.675687] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   86.682176] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.690889]         806737e0 02500200 00000200 00000000 87228000 800a982c 00000000 00000001
[   86.699584]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   86.708284]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.716993]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.725702]         ...
[   86.728239] Call Trace:
[   86.730791] [<8006b5a0>] show_stack+0x70/0x8c
[   86.735306] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.740078] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   86.745494] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   86.750273] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.755688] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.760741] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.770362] __nand_correct_data: uncorrectable ECC error
[   86.775906] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:0, read only 64 bytes, retry
[   86.788244] __nand_correct_data: uncorrectable ECC error
[   86.793766] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:0, read only 64 bytes, retry
[   86.806098] __nand_correct_data: uncorrectable ECC error
[   86.811619] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:0, read only 64 bytes, retry
[   86.823958] __nand_correct_data: uncorrectable ECC error
[   86.829464] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:0, read 64 bytes
[   86.839900] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   86.846376] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   86.855076]         806737e0 02520000 00000000 00000000 87228600 800a982c 00000000 00000001
[   86.863776]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   86.872485]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.881185]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   86.889876]         ...
[   86.892423] Call Trace:
[   86.894959] [<8006b5a0>] show_stack+0x70/0x8c
[   86.899467] [<80295b58>] ubi_io_read+0x26c/0x310
[   86.904258] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   86.909572] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   86.914362] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   86.919760] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   86.924827] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   86.934434] __nand_correct_data: uncorrectable ECC error
[   86.939946] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:512, read only 64 bytes, retry
[   86.952782] __nand_correct_data: uncorrectable ECC error
[   86.958290] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:512, read only 64 bytes, retry
[   86.971120] __nand_correct_data: uncorrectable ECC error
[   86.976623] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:512, read only 64 bytes, retry
[   86.989442] __nand_correct_data: uncorrectable ECC error
[   86.994962] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 297:512, read 64 bytes
[   87.005570] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   87.012045] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   87.020737]         806737e0 02520200 00000200 00000000 87228000 800a982c 00000000 00000001
[   87.029438]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   87.038138]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.046847]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.055546]         ...
[   87.058083] Call Trace:
[   87.060621] [<8006b5a0>] show_stack+0x70/0x8c
[   87.065146] [<80295b58>] ubi_io_read+0x26c/0x310
[   87.069922] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   87.075338] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   87.080107] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   87.085525] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   87.090572] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   87.100182] __nand_correct_data: uncorrectable ECC error
[   87.105721] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:0, read only 64 bytes, retry
[   87.118061] __nand_correct_data: uncorrectable ECC error
[   87.123585] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:0, read only 64 bytes, retry
[   87.135916] __nand_correct_data: uncorrectable ECC error
[   87.141444] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:0, read only 64 bytes, retry
[   87.154334] __nand_correct_data: uncorrectable ECC error
[   87.159847] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:0, read 64 bytes
[   87.170292] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   87.176771] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   87.185476]         806737e0 02540000 00000000 00000000 87228600 800a982c 00000000 00000001
[   87.194176]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000000 00000000
[   87.202876]         87228600 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.211577]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.220267]         ...
[   87.222814] Call Trace:
[   87.225350] [<8006b5a0>] show_stack+0x70/0x8c
[   87.229859] [<80295b58>] ubi_io_read+0x26c/0x310
[   87.234649] [<80295ebc>] ubi_io_read_ec_hdr+0x8c/0x1f0
[   87.239962] [<8029adc8>] ubi_attach+0x2f4/0x12fc
[   87.244754] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   87.250151] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   87.255218] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   87.265631] __nand_correct_data: uncorrectable ECC error
[   87.271167] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:512, read only 64 bytes, retry
[   87.283990] __nand_correct_data: uncorrectable ECC error
[   87.289497] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:512, read only 64 bytes, retry
[   87.302319] __nand_correct_data: uncorrectable ECC error
[   87.307829] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:512, read only 64 bytes, retry
[   87.320650] __nand_correct_data: uncorrectable ECC error
[   87.326170] ubi0 error: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 298:512, read 64 bytes
[   87.336776] CPU: 0 PID: 1537 Comm: ubiattach Not tainted 4.9.152 #0
[   87.343253] Stack : 806776a2 00000037 00000000 00000001 87cfa1e4 8044abc7 803faac0 00000601
[   87.351953]         806737e0 02540200 00000200 00000000 87228000 800a982c 00000000 00000001
[   87.360644]         ffffffb3 86cf8000 803fe55c 86ec1c5c 00000000 800d79dc 00000200 00000000
[   87.369344]         87228000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.378052]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   87.386762]         ...
[   87.389299] Call Trace:
[   87.391848] [<8006b5a0>] show_stack+0x70/0x8c
[   87.396354] [<80295b58>] ubi_io_read+0x26c/0x310
[   87.401144] [<802960b4>] ubi_io_read_vid_hdr+0x94/0x1f8
[   87.406548] [<8029afc0>] ubi_attach+0x4ec/0x12fc
[   87.411337] [<80290240>] ubi_attach_mtd_dev+0x6ac/0xb10
[   87.416735] [<80290e70>] ctrl_cdev_ioctl+0xfc/0x1c4
[   87.421811] [<8012cbe4>] vfs_ioctl+0x28/0x40
[   88.598149] ubi0: scanning is finished
[   88.602316] ubi0 error: ubi_read_volume_table: the layout volume was not found
[   88.610042] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd6, error -22
ubiattach: error!: cannot attach mtd6
           error 22 (Invalid argument)
ubiformat: mtd6 (nand), size 130023424 bytes (124.0 MiB), 992 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseb[   89.535602] __nand_correct_data: uncorrectable ECC error
lock 189 -- 19 %[   89.542665] __nand_correct_data: uncorrectable ECC error
libs[   89.549552] __nand_correct_data: uncorrectable ECC error
can: scanning er[   89.556506] __nand_correct_data: uncorrectable ECC error
libscan: scanning eraseblock[   89.907400] __nand_correct_data: uncorrectable ECC error
 264 -- 26 % com[   89.914439] __nand_correct_data: uncorrectable ECC error
libscan:[   89.921330] __nand_correct_data: uncorrectable ECC error
 scanning eraseb[   89.928239] __nand_correct_data: uncorrectable ECC error
lock 265 -- 26 %[   89.935181] __nand_correct_data: uncorrectable ECC error
libs[   89.942103] __nand_correct_data: uncorrectable ECC error
can: scanning er[   89.948999] __nand_correct_data: uncorrectable ECC error
aseblock 266 -- [   89.955950] __nand_correct_data: uncorrectable ECC error
libscan: scanning eraseblock[   89.970259] __nand_correct_data: uncorrectable ECC error
 268 -- 27 % com[   89.976984] __nand_correct_data: uncorrectable ECC error
libscan:[   89.983913] __nand_correct_data: uncorrectable ECC error
 scanning eraseb[   89.990807] __nand_correct_data: uncorrectable ECC error
lock 269 -- 27 %[   89.997724] __nand_correct_data: uncorrectable ECC error
libs[   90.004665] __nand_correct_data: uncorrectable ECC error
can: scanning er[   90.011585] __nand_correct_data: uncorrectable ECC error
aseblock 270 -- [   90.018484] __nand_correct_data: uncorrectable ECC error
[   90.025468] __nand_correct_data: uncorrectable ECC error
libscan: scannin[   90.032360] __nand_correct_data: uncorrectable ECC error
g eraseblock 271[   90.039258] __nand_correct_data: uncorrectable ECC error
 -- 27 % complet[   90.046206] __nand_correct_data: uncorrectable ECC error
libscan: sca[   90.053125] __nand_correct_data: uncorrectable ECC error
nning eraseblock[   90.060022] __nand_correct_data: uncorrectable ECC error
 272 -- 27 % com[   90.066974] __nand_correct_data: uncorrectable ECC error
libs[   90.078456] __nand_correct_data: uncorrectable ECC error
can: scanning er[   90.085151] __nand_correct_data: uncorrectable ECC error
aseblock 274 -- [   90.092067] __nand_correct_data: uncorrectable ECC error
libscan: scanning eraseblock 991 -- 100 % complete  
ubiformat: 962 eraseblocks have valid erase counter, mean value is 1
ubiformat: warning!: 30 of 992 eraseblocks contain non-UBI data
ubiformat: forma[   98.350971] ubi0: attaching mtd6te  
ubiformat: formatting eraseblock 991 -- 100 % complete  
[  100.023427] ubi0: scanning is finished
[  100.044953] ubi0: attached mtd6 (name "ubi", size 124 MiB)
[  100.050627] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[  100.057766] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[  100.064694] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[  100.071706] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
[  100.077908] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[  100.085385] ubi0: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 2013996895
[  100.094831] ubi0: available PEBs: 968, total reserved PEBs: 24, PEBs reserved for bad PEB handling: 20
[  100.108973] ubi0: background thread "ubi_bgt0d" started, PID 1547
UBI device number 0, total 992 LEBs (127991808 bytes, 122.0 MiB), available 968 LEBs (124895232 bytes, 119.1 MiB), LEB size 129024 bytes (126.0 KiB)
Volume ID 0, size 12 LEBs (1548288 bytes, 1.4 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "none", alignment 1
Volume ID 1, size 16 LEBs (2064384 bytes, 1.9 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 121282560
Volume ID 2, size 940 LEBs (121282560 bytes, 115.6 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[  101.883748] reboot: Restarting system
`Preformatted text`

@PisemNet Please use "Preformatted text </>" for logs, scripts, configs and general console output.
grafik

Please edit your posting accordingly.

Thanks.

to: rsnel: mate I have same problem (lot of ECC errors):

ubi0 warning: 0x802a2c80: error -77 (ECC error) while reading 64 bytes from PEB 311:512, read only 64 bytes, retry

any chance you would you be so kind and share that image you compiled? I'm a bit low on skills with compiling :smile:

Hi,

I have some images available at:

https://penta.snel.it/~rsnel/mikrotik/

Greetings,

Rik.

1 Like

Sweet, its working :), now gonna add the rest packages...
Thanks much :slight_smile:

1 Like

Here is a patch to fix this issue in the current snapshots. Porting the patch was easy, since the snapshots are based on linux kernel 4.14.x.

https://penta.snel.it/~rsnel/mikrotik/0001-mtd-samsung-Disable-subpage-writes-on-E-die-NAND.patch

Note that, before I could sysupgrade, I had to change te contents of /tmp/sysinfo/boardname from unknown to rb-2011uias-2hnd.

fyi,
I pushed a fix today for Mikrotik board detection.

It think this issue will be addressed by it.

There is also a patch in 19.07 which addresses the NAND issue, but I didn't push it to master as it was flagged as source-only

Regards,

Koen

3 Likes

Hi Koen,

Thanks for your response. The patch from 19.07 disables subpage writes for all chips, while 'my' patch only disables subpage writes for affected chips (but the penalty for unaffected devices is very small). I'm looking forward to the new release.

Greetings,

Rik.

@rsnel, I've installed the openwrt 19 from your images here (the 18 version doesn't work here).
Everything is going fine so far, however I'm having a hard time here with OpenVPN (kmod-tun package).
The installed version of package *kernel* is not compatible, require 4.14.125-1-a97bc8b3… while 4.14.136-1-6111847d… is installed.

Any advice? I'm only running OpenWRT on this device because of some OpenVPN functionalities.

I've tried running sysupgrade -n inside it, to the 18.06.4 image, but it doesn't work, the router keeps getting kernel panic and rebooting.

Thanks,
Marcelo

Hi Marcelo,

Ik have added kmod-tun to my build. Please try to install:

https://penta.snel.it/~rsnel/mikrotik/pre-19.x-kernel-4.14/kmod-tun_4.14.136-1_mips_24kc.ipk

Note that current git master does not need additional patches anymore. The maintainer added the ECC fix! So you can build your own images following this guide:

https://openwrt.org/docs/guide-developer/quickstart-build-images

Greetings,

Rik.

@rsnel, thanks for sharing. If you don't mind, I wanted to ask a few more questions before proceeding as I think I need to decide wether to compile my own version or not.

1 - What is the difference between your pre-18 and your pre-19? I am trying to figure here, why your pre-19 works and why your pre-18 doesn't work. Objective here is to understand if a custom built one at home from git master will work on my device.

2 - The problem that I see in keeping using your pre-19, is that if I need more kernel drivers, I'm screewed and will need to keep bothering you to provide me the packages. If I build my own custom from the git master, will it be able to use packages for kernel drivers from OpenWRT archives/downloads, or will I have to maintain a local repository with those packages? By following the link you've pointed on building the image, will I have all the packages for the modules built? I don't see any mention on the ipks generated... only elf and sysupgrade-bin.

3 - Can you share your config file for pre-19 so that I can use it on git master to build my image? This way I am trying to prevent any possible issues with my configuration once I am sure your pre-19 works. Will this config work on the git master?

Thanks, and sorry for 2 thousand questions.
Marcelo

Hi Marcelo,

  1. pre-0.18 is git master from about a year ago (when I started this topic), it has kernel boot parameters to make it work on my router, I don't know why it wouldn't work on your device, I used it for a year

  2. yes, ipk's will also be generated, mine appear in /targets/ar71xx/mikrotik/packages

  3. I have published the configfile I used at https://penta.snel.it/~rsnel/mikrotik/pre-19.x-kernel-4.14/dotconfig

I hope openwrt will start publishing official images for our hardware again (the images from june dont have the ECC fix)

Greetings,

Rik.

I will try to build it here... will let you know... I think I got some ideas.

actually, I was on Breaking Barrier before, and it had to be custom built also, because of the 0x600000 patch...

@rsnel

Hi Rik,

At the core of this issue, you are absolutely correct.
The problem is that Mikrotik has the habit to use other chips suddenly withour prior notice or even detectable in a product version string or so.

So your fix is spot-on today .. but could cause issues on another identical device (but with another flash chip) tomorrow.

Hence the choice for the bazooka-fix. :slight_smile:

Regards,

Koen

1 Like

Hi Koen,

Good point. I'm happy this issue and other past issues (like the broken gigabit switch) are fixed in git. Keep up the good work!

Greetings,

Rik.

I have two RB2011, one RB2011il-RM, the other RB2011UiAS-RM. They both have the samsung flash mentioned in the first post, and yet neither of them work with the example images. I have watched the UART of one and it is identical to what @PisemNet is seeing.

Is there somewhere I should specify the ubi.mtd=6,2048 for these images?

@teppo

Do they work when compiling the latest Master tree or 19.07 branch?

Thanks

Worked Rik!
Got a bit confused because luci was missing, but I could download it from download.openwrt.org.
I've setup a local repository with packages on bin/target/.
I've noticed 2 strange things here:
1 - LuCi is not working on my Firefox Browser anymore. I enter login information and it comes back to login screen. Safari works fine, not sure if its something related to cache or cookies/offline content, will try those later.
2 - I've tried installing ddns-luci app and it broke my LuCi. I don't have the error right now, but it throws some LUA errors when opening LuCi, stating something about a missing package, however I haven't found it.

Thanks,
Marcelo

@xback I can confirm they both work with the Master tree. Thanks for the help. Now if only I could write to the TFT on one of these...