Installing OpenWrt on RB2011UiAS-2HnD-IN fails

So did you managed to restore the router os, or even did you get openwr to work?

Openwrt not working(probably bad NAND).
I didn't try restore mikrotik os.
I will try to send the router to the complaint.

1 Like

But is the performance good, did you tried qos on the router os?

I didn't test performance nor qos. I not intend use router os. This is the reason why I am on openwrt forum...

I'm planing to buy a mikrotek router to install openwrt on it, i don't like router os btw, also i'm not sure if
i can translate my qos script to mikrotek router os!

Is anybody have success on doing sysupgrade for RB2011UiAS-2HnD-IN for recent versions of OpenWRT? I have AR9344 v3 version, tried to build firmware from source and different stable and snapshot versions. Initframs loads well, Gbit ports works, but after sysupgrade router goes to loop reboot. I'm tried also this solution, but no luck.

yes,
It works on my rb2011's

Do you have serial access?
Can you provide a log?

Thanks

No, i don't have serial access. I'm using Tiny PXE, Putty and WinSCP

@Anantich

I notice you state that initramfs works.
Can you boot that and provide the bootlog? (dmesg)

I might have an idea .. some of these suffer from ECC read issues when accessing the nand flash.

Thanks,

Koen

yeap, you are right - ECC errors

Here is log

@Anantich

Ill add a patch in my staging tree tomorrow morning for this.
Can I ask you to test it then?

Just booting the initramfs should be enough again to see the result.

Regards,

Koen

Sure, i'll test it. Thanks, mate!

Pushed a potential fix to my staging tree.
Could you build and test it please?

Thanks,

Koen

built, but still have errors.

BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, unknown
 -----------------------------------------------------
root@OpenWrt:~# dmesg
[    0.000000] Linux version 4.14.108 (****) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 unknown)) #0 Wed Mar 27 09:36:41 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80541390, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: lcd_ctrl=84 parts=1 boot_part_size=4194304 gpio=151099 HZ=300000000 mem=128M kmac=E4:8D:8C:7C:46:8C board=2011r5 board=2011r5 hw_opt=00718004 boot=0 mlc=10 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 121612K/131072K available (3941K kernel code, 166K rwdata, 892K rodata, 2672K init, 205K bss, 9460K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:600.000MHz, DDR:400.000MHz, AHB:400.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000009] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008854] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.085997] pid_max: default: 32768 minimum: 301
[    0.091452] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.098963] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109360] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.120566] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.127969] NET: Registered protocol family 16
[    0.137659] MIPS: machine is Mikrotik RouterBOARD 2011UiAS-2HnD
[    0.645718] clocksource: Switched to clocksource MIPS
[    0.652472] NET: Registered protocol family 2
[    0.658226] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.666201] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.673424] TCP: Hash tables configured (established 1024 bind 1024)
[    0.680778] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.687457] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.694817] NET: Registered protocol family 1
[    0.699832] PCI: CLS 0 bytes, default 32
[    2.575729] random: fast init done
[    3.707810] Crashlog allocated RAM at address 0x3f00000
[    3.715163] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    3.727307] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.733927] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.887954] io scheduler noop registered
[    3.892403] io scheduler deadline registered (default)
[    3.898544] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.906173] console [ttyS0] disabled
[    3.930390] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    3.940195] console [ttyS0] enabled
[    3.947752] bootconsole [early0] disabled
[    3.960173] m25p80 spi0.0: found w25x05, expected m25p80
[    3.977274] m25p80 spi0.0: w25x05 (64 Kbytes)
[    4.026102] Creating 4 MTD partitions on "spi0.0":
[    4.031071] 0x000000000000-0x00000000c000 : "routerboot"
[    4.060276] 0x00000000c000-0x00000000d000 : "hard_config"
[    4.089548] 0x00000000d000-0x00000000e000 : "bios"
[    4.118527] 0x00000000e000-0x00000000f000 : "soft_config"
[    4.149089] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    4.155657] nand: Samsung NAND 128MiB 3,3V 8-bit
[    4.160466] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.168334] Scanning device for bad blocks
[    4.331532] Creating 3 MTD partitions on "ar934x-nfc":
[    4.336905] 0x000000000000-0x000000040000 : "booter"
[    4.365864] 0x000000040000-0x000000400000 : "kernel"
[    4.394755] 0x000000400000-0x000008000000 : "ubi"
[    4.426824] libphy: Fixed MDIO Bus: probed
[    4.556970] libphy: ag71xx_mdio: probed
[    4.592026] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    5.603347] libphy: ag71xx_mdio: probed
[    6.237184] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    6.248763] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    6.877498] ag71xx-mdio.1: Found an AR934X built-in switch
[    6.929756] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    6.937457] NET: Registered protocol family 10
[    6.945811] Segment Routing with IPv6
[    6.949719] NET: Registered protocol family 17
[    6.954361] 8021q: 802.1Q VLAN Support v1.8
[    6.962358] UBI: auto-attach mtd6
[    6.965852] ubi0: attaching mtd6
[    6.970066] ubi0 error: validate_ec_hdr: bad VID header offset 512, expected 2048
[    6.977835] ubi0 error: validate_ec_hdr: bad EC header
[    6.983141] Erase counter header dump:
[    6.987029]  magic          0x55424923
[    6.990901]  version        1
[    6.993966]  ec             5
[    6.997041]  vid_hdr_offset 512
[    7.000282]  data_offset    2048
[    7.003616]  image_seq      1777338326
[    7.007497]  hdr_crc        0xde82cd25
[    7.011365] erase counter header hexdump:
[    7.015515] 00000000: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 05 00 00 02 00 00 00 08 00 69 f0 07 d6 00 00 00 00  UBI#....................i.......
[    7.015525] 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 de 82 cd 25  ...............................%
[    7.015537] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.108 #0
[    7.021656] Stack : 80540000 804f99b0 00000000 00000000 804ccdd0 87c29c64 87c242dc 80521947
[    7.030319]         804c8f58 00000001 807e37d0 00000000 55424923 807e0000 87c29c18 b6a2f86f
[    7.038973]         00000000 00000000 807e0000 00001d98 00000000 00000000 00000007 00000000
[    7.047627]         0000006e 56673611 0000006d 00000000 00000000 87cac000 00000000 87cac000
[    7.056283]         55424923 00000000 55424923 86d78000 00000002 80293944 00000000 807e0000
[    7.064927]         ...
[    7.067467] Call Trace:
[    7.070003] [<8006c66c>] show_stack+0x58/0x100
[    7.074601] [<802d6f50>] validate_ec_hdr+0xf0/0x110
[    7.079657] [<802d7b98>] ubi_io_read_ec_hdr+0x180/0x228
[    7.085064] [<802dcc0c>] ubi_attach+0x1e4/0x1528
[    7.089852] [<802d15ac>] ubi_attach_mtd_dev+0x6a0/0xbc0
[    7.095256] [<8055d418>] ubi_init+0x344/0x3fc
[    7.099770] [<80060a50>] do_one_initcall+0xd0/0x1a0
[    7.104808] [<80544d30>] kernel_init_freeable+0x150/0x210
[    7.110409] [<804333e4>] kernel_init+0x10/0x104
[    7.115105] [<800672b8>] ret_from_kernel_thread+0x14/0x1c
[    7.120711] ubi0 error: ubi_io_read_ec_hdr: validation failed for PEB 0
[    7.127570] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd6, error -22
[    7.134903] UBI error: cannot attach mtd6
[    7.151935] Freeing unused kernel memory: 2672K
[    7.156643] This architecture does not have kernel memory protection.
[    7.177497] init: Console is alive
[    7.181263] init: - watchdog -
[    7.207200] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.225505] usbcore: registered new interface driver usbfs
[    7.231287] usbcore: registered new interface driver hub
[    7.236917] usbcore: registered new device driver usb
[    7.247516] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.255940] ehci-platform: EHCI generic platform driver
[    7.263950] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    7.271669] ohci-platform: OHCI generic platform driver
[    7.277887] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.295865] init: - preinit -
[    7.637474] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.657348] eth0: link up (1000Mbps/Full duplex)
[    8.662325] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.818110] eth0: link down
[   10.832615] procd: - early -
[   10.835757] procd: - watchdog -
[   11.392886] procd: - watchdog -
[   11.396471] procd: - ubus -
[   11.406281] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.449944] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.457022] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.464596] procd: - init -
[   11.656469] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.669624] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.685249] Loading modules backported from Linux version v4.19.23-0-g67d52fae61c1
[   11.693125] Backport generated by backports.git v4.19.23-1-0-g480a925a
[   11.702942] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.717363] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   11.783887] xt_time: kernel timezone is -0000
[   11.848756] PPP generic driver version 2.4.2
[   11.855837] NET: Registered protocol family 24
[   11.943799] ath: EEPROM regdomain: 0x0
[   11.943808] ath: EEPROM indicates default country code should be used
[   11.943812] ath: doing EEPROM country->regdmn map search
[   11.943827] ath: country maps to regdmn code: 0x3a
[   11.943833] ath: Country alpha2 being used: US
[   11.943837] ath: Regpair used: 0x3a
[   11.958008] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   11.960025] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47
[   12.056145] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.284721] urandom_read: 5 callbacks suppressed
[   13.284729] random: jshn: uninitialized urandom read (4 bytes read)
[   13.367991] random: jshn: uninitialized urandom read (4 bytes read)
[   44.273564] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   44.309698] br-lan: port 1(eth0.1) entered blocking state
[   44.315286] br-lan: port 1(eth0.1) entered disabled state
[   44.321241] device eth0.1 entered promiscuous mode
[   44.326227] device eth0 entered promiscuous mode
[   44.394159] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   44.653896] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   44.716098] br-lan: port 2(eth1.1) entered blocking state
[   44.721685] br-lan: port 2(eth1.1) entered disabled state
[   44.727641] device eth1.1 entered promiscuous mode
[   44.732601] device eth1 entered promiscuous mode
[   44.846108] IPv6: ADDRCONF(NETDEV_UP): eth0.3: link is not ready
[   44.881049] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   45.721933] eth0: link up (1000Mbps/Full duplex)
[   45.775393] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   45.840676] br-lan: port 1(eth0.1) entered blocking state
[   45.846321] br-lan: port 1(eth0.1) entered forwarding state
[   45.852410] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   45.859338] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.3: link becomes ready
[   46.045816] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   47.747616] eth1: link up (1000Mbps/Full duplex)
[   47.752420] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   47.775817] br-lan: port 2(eth1.1) entered blocking state
[   47.781409] br-lan: port 2(eth1.1) entered forwarding state
[   84.105767] random: crng init done

@Anantich

Ok, can you try to flash the sysupgrade image now?

Make sure you use sysupgrade -n

did it thru Luci and it works! :hugs: Thank you, Koen
here is log

BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, unknown
 -----------------------------------------------------
root@OpenWrt:~# dmesg
[    0.000000] Linux version 4.14.108 (***) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 unknown)) #0 Wed Mar 27 09:36:41 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80541390, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: lcd_ctrl=84 parts=1 boot_part_size=4194304 gpio=249387 HZ=300000000 mem=128M kmac=E4:8D:8C:7C:46:8C board=2011r5 board=2011r5 ver=6.44.1 bver=3.33 hw_opt=00718004 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 124044K/131072K available (3941K kernel code, 166K rwdata, 892K rodata, 240K init, 205K bss, 7028K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:600.000MHz, DDR:400.000MHz, AHB:400.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000009] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008854] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.085998] pid_max: default: 32768 minimum: 301
[    0.091451] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.098963] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109399] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.120612] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.128013] NET: Registered protocol family 16
[    0.137733] MIPS: machine is Mikrotik RouterBOARD 2011UiAS-2HnD
[    0.645895] clocksource: Switched to clocksource MIPS
[    0.652653] NET: Registered protocol family 2
[    0.658406] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.666380] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.673603] TCP: Hash tables configured (established 1024 bind 1024)
[    0.680958] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.687636] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.694997] NET: Registered protocol family 1
[    0.700012] PCI: CLS 0 bytes, default 32
[    0.704856] Crashlog allocated RAM at address 0x3f00000
[    0.712190] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.724315] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.730984] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.752170] io scheduler noop registered
[    0.756668] io scheduler deadline registered (default)
[    0.762776] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.770406] console [ttyS0] disabled
[    0.794620] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.804429] console [ttyS0] enabled
[    0.811986] bootconsole [early0] disabled
[    0.824419] m25p80 spi0.0: found w25x05, expected m25p80
[    0.841487] m25p80 spi0.0: w25x05 (64 Kbytes)
[    0.846533] Creating 4 MTD partitions on "spi0.0":
[    0.851500] 0x000000000000-0x00000000c000 : "routerboot"
[    0.858708] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.865639] 0x00000000d000-0x00000000e000 : "bios"
[    0.872692] 0x00000000e000-0x00000000f000 : "soft_config"
[    0.881267] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.887885] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.892652] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.900517] Scanning device for bad blocks
[    0.910287] random: fast init done
[    1.044966] Creating 3 MTD partitions on "ar934x-nfc":
[    1.050339] 0x000000000000-0x000000040000 : "booter"
[    1.057222] 0x000000040000-0x000000400000 : "kernel"
[    1.063772] 0x000000400000-0x000008000000 : "ubi"
[    1.074161] libphy: Fixed MDIO Bus: probed
[    1.093695] libphy: ag71xx_mdio: probed
[    1.106892] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    1.836727] libphy: ag71xx_mdio: probed
[    2.467361] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.478930] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    3.107675] ag71xx-mdio.1: Found an AR934X built-in switch
[    3.159938] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    3.167659] NET: Registered protocol family 10
[    3.176037] Segment Routing with IPv6
[    3.179939] NET: Registered protocol family 17
[    3.184578] 8021q: 802.1Q VLAN Support v1.8
[    3.192578] UBI: auto-attach mtd6
[    3.196079] ubi0: attaching mtd6
[    4.559880] ubi0: scanning is finished
[    4.581411] ubi0: attached mtd6 (name "ubi", size 124 MiB)
[    4.587134] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.594233] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.601253] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.608455] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
[    4.614661] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    4.622131] ubi0: max/mean erase counter: 7/2, WL threshold: 4096, image sequence number: 1539367043
[    4.631573] ubi0: available PEBs: 0, total reserved PEBs: 992, PEBs reserved for bad PEB handling: 20
[    4.641160] ubi0: background thread "ubi_bgt0d" started, PID 356
[    4.649059] block ubiblock0_1: created from ubi0:1(rootfs)
[    4.654733] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    4.670742] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.679290] Freeing unused kernel memory: 240K
[    4.683884] This architecture does not have kernel memory protection.
[    5.330164] init: Console is alive
[    5.333933] init: - watchdog -
[    5.470993] random: crng init done
[    6.502702] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.569039] usbcore: registered new interface driver usbfs
[    6.574784] usbcore: registered new interface driver hub
[    6.580424] usbcore: registered new device driver usb
[    6.591028] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.599416] ehci-platform: EHCI generic platform driver
[    6.607481] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.615143] ohci-platform: OHCI generic platform driver
[    6.621325] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.639272] init: - preinit -
[    7.304814] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.415868] eth0: link up (1000Mbps/Full duplex)
[    8.420880] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.696368] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 421
[   10.785990] UBIFS (ubi0:2): recovery needed
[   10.981773] UBIFS (ubi0:2): recovery completed
[   10.986511] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[   10.994606] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.004885] UBIFS (ubi0:2): FS size: 116944896 bytes (111 MiB, 921 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[   11.015853] UBIFS (ubi0:2): reserved for root: 4952683 bytes (4836 KiB)
[   11.022701] UBIFS (ubi0:2): media format: w4/r0 (latest is w5/r0), UUID 507B0ABA-EDFE-4B11-B0BA-86F7445D8AE3, small LPT model
[   11.046731] mount_root: switching to ubifs overlay
[   11.098444] urandom-seed: Seeding with /etc/urandom.seed
[   11.308718] eth0: link down
[   11.323346] procd: - early -
[   11.327177] procd: - watchdog -
[   11.947540] procd: - watchdog -
[   11.951084] procd: - ubus -
[   12.059569] procd: - init -
[   12.531714] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.545372] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.561813] Loading modules backported from Linux version v4.19.23-0-g67d52fae61c1
[   12.569687] Backport generated by backports.git v4.19.23-1-0-g480a925a
[   12.579545] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.594087] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.661703] xt_time: kernel timezone is -0000
[   12.726969] PPP generic driver version 2.4.2
[   12.734030] NET: Registered protocol family 24
[   12.820946] ath: EEPROM regdomain: 0x0
[   12.820956] ath: EEPROM indicates default country code should be used
[   12.820959] ath: doing EEPROM country->regdmn map search
[   12.820975] ath: country maps to regdmn code: 0x3a
[   12.820981] ath: Country alpha2 being used: US
[   12.820985] ath: Regpair used: 0x3a
[   12.835080] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.837180] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47
[   12.981450] kmodloader: done loading kernel modules from /etc/modules.d/*
[   26.028023] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   26.061414] br-lan: port 1(eth0.1) entered blocking state
[   26.067058] br-lan: port 1(eth0.1) entered disabled state
[   26.072958] device eth0.1 entered promiscuous mode
[   26.077958] device eth0 entered promiscuous mode
[   26.147211] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   26.473999] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   26.527991] br-lan: port 2(eth1.1) entered blocking state
[   26.533586] br-lan: port 2(eth1.1) entered disabled state
[   26.539545] device eth1.1 entered promiscuous mode
[   26.544502] device eth1 entered promiscuous mode
[   26.644997] IPv6: ADDRCONF(NETDEV_UP): eth0.3: link is not ready
[   26.716269] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   27.058835] eth0: link up (1000Mbps/Full duplex)
[   27.095974] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   27.140248] br-lan: port 1(eth0.1) entered blocking state
[   27.145841] br-lan: port 1(eth0.1) entered forwarding state
[   27.151993] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   27.159013] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.3: link becomes ready
[   27.366013] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
root@OpenWrt:~#

Great!

Thank you for testing.
Ill do some more check first before pushing it to master.

Enjoy your device :slight_smile:

Koen

I just signed in to this thread to get closer to this issue.

I have a 2011 too and suffers the ECC errors issue.

I was able to install it doing my own compiled version from this thread.

I am happy to see that this possibly is going to the main line kernel. So possibly my next upgrade will be easier.

Happy to test any nightly snapshot to see if can be upgraded automatically using Lucy/sysupgrade.

Hi,

The issue seems to be that some Nand support 512 byte subpages while others do not.

The gain from this is roughly 1% extra capacity, but at the cost of potential extra writes.

Above mentioned patch just disables the usage of subpages lower than the generic 2048 bytes, which is compatible with any nand chip used in these products.

I've got 2 identical rb2011 in the office.
1 likes the subpages, the other does not.

As soon as I have some time, Ill try to cook up a fix which covers all flavours.

The issue also occurs on other mikrotik devices carrying NAND.

This is the main reason why it takes time to fix it :slight_smile:

Regards,

Koen

Hi!

I’m also dealing with installing problem on a mikrotik RB2011UiAS-2HnD-IN.

Image metadata not found
Sysupgrade is not yet supported on unknown.
Image check 'platform_check_image' failed.

                   uptime: 1m43s
                  version: 6.44.1 (stable)
               build-time: Mar/13/2019 08:38:51
         factory-software: 6.39
              free-memory: 105.2MiB
             total-memory: 128.0MiB
                      cpu: MIPS 74Kc V4.12
                cpu-count: 1
            cpu-frequency: 600MHz
                 cpu-load: 2%
           free-hdd-space: 110.1MiB
          total-hdd-space: 128.0MiB
  write-sect-since-reboot: 199
         write-sect-total: 12013
               bad-blocks: 0%
        architecture-name: mipsbe
               board-name: RB2011UiAS-2HnD r2
                 platform: MikroTik
[    0.000000] Linux version 4.14.111 (***) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9850-2101002b3d)) #0 Tue Apr 9 20:25:11 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80541490, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: lcd_ctrl=84 parts=1 boot_part_size=4194304 gpio=249403 HZ=300000000 mem=128M kmac=B8:69:F4:A4:E4:D0 board=2011r5 board=2011r5 ver=3.41 hw_opt=00718004 boot=1 mlc=11 console=ttd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 122060K/131072K available (3941K kernel code, 166K rwdata, 892K rodata, 2224K init, 205K bss, 9012K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:600.000MHz, DDR:400.000MHz, AHB:400.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000009] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.008852] Calibrating delay loop... 299.82 BogoMIPS (lpj=1499136)
[    0.085989] pid_max: default: 32768 minimum: 301
[    0.091443] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.098955] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109359] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.120566] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.127965] NET: Registered protocol family 16
[    0.137650] MIPS: machine is Mikrotik RouterBOARD 2011UiAS-2HnD r2
[    0.645805] clocksource: Switched to clocksource MIPS
[    0.652536] NET: Registered protocol family 2
[    0.658283] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.666250] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.673468] TCP: Hash tables configured (established 1024 bind 1024)
[    0.680822] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.687499] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.694863] NET: Registered protocol family 1
[    0.699873] PCI: CLS 0 bytes, default 32
[    2.575817] random: fast init done
[    3.145927] Crashlog allocated RAM at address 0x3f00000
[    3.153220] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    3.165303] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.171963] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.326275] io scheduler noop registered
[    3.330727] io scheduler deadline registered (default)
[    3.336860] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.344449] console [ttyS0] disabled
[    3.368690] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    3.378489] console [ttyS0] enabled
[    3.386047] bootconsole [early0] disabled
[    3.398483] m25p80 spi0.0: found w25x05, expected m25p80
[    3.415063] m25p80 spi0.0: w25x05 (64 Kbytes)
[    3.463891] Creating 4 MTD partitions on "spi0.0":
[    3.468905] 0x000000000000-0x00000000c000 : "routerboot"
[    3.498276] 0x00000000c000-0x00000000d000 : "hard_config"
[    3.527560] 0x00000000d000-0x00000000e000 : "bios"
[    3.556325] 0x00000000e000-0x00000000f000 : "soft_config"
[    3.586927] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.593497] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.598300] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.606164] Scanning device for bad blocks
[    3.683927] Creating 3 MTD partitions on "ar934x-nfc":
[    3.689302] 0x000000000000-0x000000040000 : "booter"
[    3.718047] 0x000000040000-0x000000400000 : "kernel"
[    3.746862] 0x000000400000-0x000008000000 : "ubi"
[    3.779043] libphy: Fixed MDIO Bus: probed
[    3.908344] libphy: ag71xx_mdio: probed
[    3.943524] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    4.962465] libphy: ag71xx_mdio: probed
[    5.597271] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    5.608843] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    6.237586] ag71xx-mdio.1: Found an AR934X built-in switch
[    6.289841] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    6.297574] NET: Registered protocol family 10
[    6.305898] Segment Routing with IPv6
[    6.309806] NET: Registered protocol family 17
[    6.314447] 8021q: 802.1Q VLAN Support v1.8
[    6.322472] UBI error: no valid UBI magic found inside mtd6
[    6.339090] Freeing unused kernel memory: 2224K
[    6.343776] This architecture does not have kernel memory protection.
[    6.364594] init: Console is alive
[    6.368500] init: - watchdog -
[    6.394428] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.413848] usbcore: registered new interface driver usbfs
[    6.419655] usbcore: registered new interface driver hub
[    6.425228] usbcore: registered new device driver usb
[    6.435605] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.443997] ehci-platform: EHCI generic platform driver
[    6.449537] ehci-platform ehci-platform: EHCI Host Controller
[    6.455511] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.465789] ehci-platform ehci-platform: TX-TX IDP fix enabled
[    6.471853] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.505826] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.513129] hub 1-0:1.0: USB hub found
[    6.517445] hub 1-0:1.0: 1 port detected
[    6.524543] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.532510] ohci-platform: OHCI generic platform driver
[    6.538795] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.548678] init: - preinit -
[    6.820308] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.017436] eth0: link up (1000Mbps/Full duplex)
[    8.022419] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.037339] eth0: link down
[   10.051852] procd: - early -
[   10.054939] procd: - watchdog -
[   10.615524] procd: - watchdog -
[   10.619117] procd: - ubus -
[   10.628881] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.672611] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.679677] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.687297] procd: - init -
[   10.879820] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.893051] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.908688] Loading modules backported from Linux version v4.19.32-0-g3a2156c839c7
[   10.916562] Backport generated by backports.git v4.19.32-1-0-g1c4f7569
[   10.926381] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.940806] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   11.004425] xt_time: kernel timezone is -0000
[   11.069628] PPP generic driver version 2.4.2
[   11.076726] NET: Registered protocol family 24
[   11.126394] ath: EEPROM regdomain: 0x0
[   11.126403] ath: EEPROM indicates default country code should be used
[   11.126407] ath: doing EEPROM country->regdmn map search
[   11.126423] ath: country maps to regdmn code: 0x3a
[   11.126428] ath: Country alpha2 being used: US
[   11.126432] ath: Regpair used: 0x3a
[   11.140500] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   11.142530] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47
[   11.226584] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.368321] urandom_read: 5 callbacks suppressed
[   12.368329] random: jshn: uninitialized urandom read (4 bytes read)
[   12.447275] random: jshn: uninitialized urandom read (4 bytes read)
[   59.709807] eth0: link up (1000Mbps/Full duplex)
[   59.715142] br-lan: port 1(eth0) entered blocking state
[   59.720613] br-lan: port 1(eth0) entered disabled state
[   59.726332] device eth0 entered promiscuous mode
[   59.751678] br-lan: port 1(eth0) entered blocking state
[   59.757138] br-lan: port 1(eth0) entered forwarding state
[   59.762904] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   59.883692] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   61.045880] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  108.875853] random: crng init done