Hello,
I'm trying to install OpenWRT on a MikroTIK RB493G and the router doesn't initialize the kernel after it transferred it to RAM (over the network).
I tried all the OpenWRT versions after 23.05.0, including the latest 23.05.5, all of them get stuck at initializing the kernel.
Here's the serial console output:
RouterBOOT booter 6.45.8
RouterBoard 493G
CPU frequency: 680 MHz
Memory size: 256 MiB
NAND size: 128 MiB
Press any key within 2 seconds to enter setup..
trying bootp protocol... OK
Got IP address: 192.168.1.6
resolved mac address 00:22:19:1E:90:EF
transfer started .............................................. transfer ok, time=1.91s
setting up elf image... OK
jumping to kernel code
OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos juhosg@openwrt.org
Decompressing kernel... done!
Starting kernel at 80060000...
All OpenWRT versions after 23.05 behave the same, all get stuck at initializing the kernel.
Interestingly OpenWRT 19.07.9 kernel boots perfectly fine, however this is the last OpenWRT version which successfully initializes the kernel after it was booted over the network, all the OpenWRT versions after that fail to initialize the kernel after booting over the network.
Is this a known bug or am I missing something (or I'm doing something wrong) ?
Help please ?
Thank you
if you can boot 19.07 and install, you can upgrade your way up to 23.05, or are you saying those fail too ?
I tried that, sysupgrade from 19.07.9 to 23.05.5 (all versions after 19.07.9 behave the same though), the sysupgrade does say the image is not compatible with the device but it does allow force upgrade, without keeping the configuration.
However, after the sysupgrade the router can't load the kernel from flash, I'm pasting below the serial console during the sysupgrade and the boot attempt from flash after that:
killall: telnetd: no process killed
Sending TERM to remaining processes ... netifd odhcpd uhttpd ntpd dnsmasq luci sh ubus ubusd urngd logd rpcd
Sending KILL to remaining processes ...
Switching to ramdisk...
[ 302.228519] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" stops
[ 302.258828] UBIFS (ubi0:2): un-mount UBI device 0
Performing system upgrade...
Unlocking kernel ...
Erasing kernel ...
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Writing data to block 18 at offset 0x240000
Writing data to block 19 at offset 0x260000
Writing data to block 20 at offset 0x280000
Unexpected EOF. Expecting at least 1296 more bytes. Use the padding option.
nandwrite: error!: Data was only partially written due to error
error 2 (No such file or directory)
removing ubiblock0_1
[ 305.460549] block ubiblock0_1: released
Volume ID 0, size 22 LEBs (2793472 bytes, 2.6 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "none", alignment 1
Volume ID 1, size 30 LEBs (3809280 bytes, 3.6 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 116310016
Volume ID 2, size 916 LEBs (116310016 bytes, 110.9 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
[ 310.941882] reboot: Restarting system
RouterBOOT booter 6.45.8
RouterBoard 493G
CPU frequency: 680 MHz
Memory size: 256 MiB
NAND size: 128 MiB
Press any key within 2 seconds to enter setup..
loading kernel... kernel not found
A quick update: for some reason the sysupgrade to any OpenWRT 23.x version ends up with many fake bad blocks in the kernel partition. The quick fix is to boot the routerboard with the precompiled OpenWRT ramdisk in this Github repo and then the bad blocks can be successfully erased as described in the Github repo. Afterwards RouterOS or OpenWRT 19.07.9 can be successfully booted over network and installed.
The installation of OpenWRT 19.07.9 doesn't report any bad blocks during the installation. Also, interestingly enough, if I install any older OpenWRT version than 19.07.9 and then sysupgrade to 19.07.9 there are also no bad blocks reported.
To me this is a clue there's something wrong with OpenWRT version 23 or newer (where the RB493G looks to have been migrated from the ar71xx branch - used on the older OpenWRT versions, to the ath79 branch - used on the newer OpenWRT versions).
Is there nobody else running OpenWRT 23 (or newer) on their RB493G ? I wonder if my RB493G is somehow special.
My RB493G is available for any experiments or troubleshooting which can narrow down the issue and (ideally) fix this.
Help please ?