Belkin rt3200 stuck in emergency

I recently upgraded the firmware to latest but then reset to factory using the reset button and now when I go to flash the an older firmware it reboots and stays stuck so I power cycle and it goes back into emergency mode. Iv even tried the latest firmware and no luck. Tried following this forum and nothing

Tried cat /sys/fs/pstore/* and nothing via SSH

Have you already turned the power off? That should also clear the pstore files, but might help also for other problem, if some has crashed in a weird way.

Look also into ubi debug/info commands from the ssh console and try to figure out if there is something wrong with the file systems.

Tried powering on and off.even left it off for a night a night and nothing. I'm a newbie when it comes to this stuff and I
ran log read and found these

Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.745741] nand: found bad block 0xf
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.749534] nand: found bad block 0x10
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.753533] nand: found bad block 0x12
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.757413] nand: found bad block 0x13
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.761283] nand: found bad block 0x14
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.765170] nand: found bad block 0x15
Fri Oct 14 22:44:42 2022 kern.info kernel: [ 1.898800] [BBT] 74 available blocks in BMT pool
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.908003] [BBT] BMT.v2 is written into PBA:0x3ff
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.916651] 12 fixed-partitions partitions found on MTD device 1100d000.snfi
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.923732] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.929418] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.935568] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.941242] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.947115] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.err kernel: [ 1.952781] OF: Bad cell count for /snfi@1100d000/partitions
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.958605] Creating 12 MTD partitions on "1100d000.snfi":
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.964087] 0x000000000000-0x000000080000 : "Preloader"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.970217] 0x000000080000-0x0000000c0000 : "ATF"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.975618] 0x0000000c0000-0x000000140000 : "u-boot"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.981454] 0x000000140000-0x0000001c0000 : "u-boot-env"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.987684] 0x0000001c0000-0x0000002c0000 : "factory"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.994129] 0x000000300000-0x000000320000 : "devinfo"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 1.999729] 0x000000320000-0x000000340000 : "senv"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 2.005058] 0x000000360000-0x000000380000 : "bootseq"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 2.010628] 0x000000500000-0x000002300000 : "firmware1"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 2.046269] 0x000002300000-0x000004100000 : "firmware2"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 2.081874] 0x000004100000-0x000005a00000 : "data"
Fri Oct 14 22:44:42 2022 kern.notice kernel: [ 2.112052] 0x000005a00000-0x000006e00000 : "mfg"

but my problem is i cant seem to get out of recovary mode no matter what firmware i try just keeps putting make into recovary
logread. You have noticed a an other account with the same problem and tread. it's mine to. I set up by mistake

tried these

root@OpenWrt:~#  df -Th
Filesystem           Type            Size      Used Available Use% Mounted on
tmpfs                tmpfs         241.5M     15.6M    225.8M   6% /
tmpfs                tmpfs         241.5M    236.0K    241.3M   0% /tmp
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev
root@OpenWrt:~# mount
tmpfs on / type tmpfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)

The bad blocks sound nasty, and may be part of the problem.

Which exact image are trying to flash with sysupgrade?
(Make sure that it has UBI in its name)

1 Like

Iv tried one from this https://openwrt.org/toh/linksys/e8450

Also tried following this guide

And a few others I tried but can't find the link at the moment

Instead of mailing links to sites from where you have downloaded something, please specify the exact file that you have downloaded from there and flashed... The question is if you have flashed a non-UBI sysupgrade file, an initramfs image, UBI sysupgrade, or something....

I urged you earlier to spend a few minutes with the ubi debug/info commands to clarify what you actually have on your system right now.

The first thing is to clarify if you are on the (normal) UBI variant like expected...

This is how a normal RT3200 with the normal UBI variant looks from UBI filesystems perspective:

Generic UBI info, (volumes and bad block info):

root@router4:~# ubinfo -a
UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:127
Present UBI devices:            ubi0

ubi0
Volumes count:                           6
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     1000 (126976000 bytes, 121.0 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  20
Current maximum erase counter value:     65
Minimum input/output unit size:          2048 bytes
Character device major/minor:            250:0
Present volumes:                         0, 1, 2, 3, 4, 5

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        9 LEBs (1142784 bytes, 1.0 MiB)
State:       OK
Name:        ubootenv
Character device major/minor: 250:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        9 LEBs (1142784 bytes, 1.0 MiB)
State:       OK
Name:        ubootenv2
Character device major/minor: 250:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        72 LEBs (9142272 bytes, 8.7 MiB)
State:       OK
Name:        recovery
Character device major/minor: 250:3
-----------------------------------
Volume ID:   3 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        67 LEBs (8507392 bytes, 8.1 MiB)
State:       OK
Name:        boot_backup
Character device major/minor: 250:4
-----------------------------------
Volume ID:   4 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        143 LEBs (18157568 bytes, 17.3 MiB)
State:       OK
Name:        fit
Character device major/minor: 250:5
-----------------------------------
Volume ID:   5 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        674 LEBs (85581824 bytes, 81.6 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 250:6

Details about the main firmware image:

root@router4:~# ubinfo -d 0 -n 4 -a
Volume ID:   4 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        143 LEBs (18157568 bytes, 17.3 MiB)
State:       OK
Name:        fit
Character device major/minor: 250:5

Details about the R/Woverlay:

root@router4:~# ubinfo -d 0 -n 5 -a
Volume ID:   5 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        674 LEBs (85581824 bytes, 81.6 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 250:6

If your data looks like that, you should be on the normal UBI track.

Then the correct first aid might to download the ubi sysupgrade image, e.g. from dangowrt's site, and flash it from initramfs. But it is crucial that you use the ...e8450-ubi-squashfs-sysupgrade.itb image (and not anything with initramfs in the name).

EDIT:

You could also show the start of the contents of both the recovery and the normal firmware.
This is how they look in a normal system:

Normal UBI firmware start (kernel)

root@router4:~# hexdump -C /dev/ubi0_4 | head -n 34
00000000  d0 0d fe ed 00 00 10 00  00 00 00 38 00 00 04 e8  |...........8....|
00000010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00000020  00 00 00 8e 00 00 04 b0  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00000040  00 00 00 03 00 00 00 04  00 00 00 66 63 de a5 22  |...........fc.."|
00000050  00 00 00 03 00 00 00 29  00 00 00 00 41 52 4d 36  |.......)....ARM6|
00000060  34 20 4f 70 65 6e 57 72  74 20 46 49 54 20 28 46  |4 OpenWrt FIT (F|
00000070  6c 61 74 74 65 6e 65 64  20 49 6d 61 67 65 20 54  |lattened Image T|
00000080  72 65 65 29 00 00 00 00  00 00 00 03 00 00 00 04  |ree)............|
00000090  00 00 00 0c 00 00 00 01  00 00 00 01 69 6d 61 67  |............imag|
000000a0  65 73 00 00 00 00 00 01  6b 65 72 6e 65 6c 2d 31  |es......kernel-1|
000000b0  00 00 00 00 00 00 00 03  00 00 00 04 00 00 00 84  |................|
000000c0  00 50 b2 0d 00 00 00 03  00 00 00 04 00 00 00 76  |.P.............v|
000000d0  00 00 10 00 00 00 00 03  00 00 00 1c 00 00 00 00  |................|
000000e0  41 52 4d 36 34 20 4f 70  65 6e 57 72 74 20 4c 69  |ARM64 OpenWrt Li|
000000f0  6e 75 78 2d 35 2e 31 35  2e 39 31 00 00 00 00 03  |nux-5.15.91.....|
00000100  00 00 00 07 00 00 00 20  6b 65 72 6e 65 6c 00 00  |....... kernel..|
00000110  00 00 00 03 00 00 00 06  00 00 00 25 61 72 6d 36  |...........%arm6|
00000120  34 00 00 00 00 00 00 03  00 00 00 06 00 00 00 2a  |4..............*|
00000130  6c 69 6e 75 78 00 00 00  00 00 00 03 00 00 00 05  |linux...........|
00000140  00 00 00 2d 67 7a 69 70  00 00 00 00 00 00 00 03  |...-gzip........|
00000150  00 00 00 04 00 00 00 39  44 00 00 00 00 00 00 03  |.......9D.......|
00000160  00 00 00 04 00 00 00 3e  44 00 00 00 00 00 00 01  |.......>D.......|
00000170  68 61 73 68 40 31 00 00  00 00 00 03 00 00 00 04  |hash@1..........|
00000180  00 00 00 70 ec 54 45 10  00 00 00 03 00 00 00 06  |...p.TE.........|
00000190  00 00 00 44 63 72 63 33  32 00 00 00 00 00 00 02  |...Dcrc32.......|
000001a0  00 00 00 01 68 61 73 68  40 32 00 00 00 00 00 03  |....hash@2......|
000001b0  00 00 00 14 00 00 00 70  83 84 0f 8a de da a6 4a  |.......p.......J|
000001c0  6b ec 40 ad 0c e5 24 de  76 05 db 26 00 00 00 03  |k.@...$.v..&....|
000001d0  00 00 00 05 00 00 00 44  73 68 61 31 00 00 00 00  |.......Dsha1....|
000001e0  00 00 00 02 00 00 00 02  00 00 00 01 66 64 74 2d  |............fdt-|
000001f0  31 00 00 00 00 00 00 03  00 00 00 04 00 00 00 84  |1...............|
00000200  00 00 77 08 00 00 00 03  00 00 00 04 00 00 00 76  |..w............v|
00000210  00 50 d0 00 00 00 00 03  00 00 00 31 00 00 00 00  |.P.........1....|

Recovery:

root@router4:~# hexdump -C /dev/ubi0_2 | head -n 34
00000000  d0 0d fe ed 00 89 64 ac  00 00 00 38 00 89 64 38  |......d....8..d8|
00000010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00000020  00 00 00 74 00 89 64 00  00 00 00 00 00 00 00 00  |...t..d.........|
00000030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00000040  00 00 00 03 00 00 00 04  00 00 00 00 61 7d 32 9a  |............a}2.|
00000050  00 00 00 03 00 00 00 29  00 00 00 0a 41 52 4d 36  |.......)....ARM6|
00000060  34 20 4f 70 65 6e 57 72  74 20 46 49 54 20 28 46  |4 OpenWrt FIT (F|
00000070  6c 61 74 74 65 6e 65 64  20 49 6d 61 67 65 20 54  |lattened Image T|
00000080  72 65 65 29 00 00 00 00  00 00 00 03 00 00 00 04  |ree)............|
00000090  00 00 00 16 00 00 00 01  00 00 00 01 69 6d 61 67  |............imag|
000000a0  65 73 00 00 00 00 00 01  6b 65 72 6e 65 6c 2d 31  |es......kernel-1|
000000b0  00 00 00 00 00 00 00 03  00 00 00 1c 00 00 00 0a  |................|
000000c0  41 52 4d 36 34 20 4f 70  65 6e 57 72 74 20 4c 69  |ARM64 OpenWrt Li|
000000d0  6e 75 78 2d 35 2e 31 30  2e 37 35 00 00 00 00 03  |nux-5.10.75.....|
000000e0  00 00 00 07 00 00 00 25  6b 65 72 6e 65 6c 00 00  |.......%kernel..|
000000f0  00 00 00 03 00 3b 8d d5  00 00 00 2a 6d 00 00 80  |.....;.....*m...|
00000100  00 08 a8 b6 00 00 00 00  00 00 00 20 04 81 2c 04  |........... ..,.|
00000110  05 46 05 f2 01 04 d9 46  95 b8 61 2b ef 2a 02 ef  |.F.....F..a+.*..|
00000120  4b 02 24 4e e8 67 79 66  60 08 21 ab f7 57 e1 02  |K.$N.gyf`.!..W..|
00000130  3f f9 cd 7a 25 df cc 7a  da d7 35 c4 a3 b6 01 11  |?..z%..z..5.....|
00000140  bb 7a 4c aa a5 05 f1 f9  8e 90 87 72 ed 4c 12 8a  |.zL........r.L..|
00000150  92 55 63 fa 48 8f a0 14  79 ab 35 b4 b2 d4 eb 8d  |.Uc.H...y.5.....|
00000160  85 af a6 c1 83 a6 1b c4  41 2c b2 f4 92 fc 3b d9  |........A,....;.|
00000170  3a 26 a1 d4 31 6c b0 1d  1c 0e 0d 92 7f 2e c8 51  |:&..1l.........Q|
00000180  64 5a 20 e2 44 7b 13 e6  16 89 95 09 c7 03 cd 41  |dZ .D{.........A|
00000190  c0 45 a1 a2 0a ef d3 42  b3 40 39 36 0e 2c 5b ad  |.E.....B.@96.,[.|
000001a0  df f6 6c 6d c7 ac f3 df  ae 99 06 9f 52 03 71 c4  |..lm........R.q.|
000001b0  78 d7 52 fa ba e4 f6 ee  5c 5d d3 63 da a5 8c 8d  |x.R.....\].c....|
000001c0  2b 4d 56 a7 61 d9 fd 5d  a5 41 2b 12 97 44 a8 e2  |+MV.a..].A+..D..|
000001d0  40 c1 a2 d6 1a 4a 4a 40  f2 f9 2b 43 14 34 62 be  |@....JJ@..+C.4b.|
000001e0  82 fc 18 c6 03 e6 50 9b  a9 e9 42 1f 03 64 69 0d  |......P...B..di.|
000001f0  cf da 59 7e 0b 9e 17 c1  6c 8c e5 6a 76 a2 a8 a0  |..Y~....l..jv...|
00000200  70 6a 8a e1 23 72 e2 0b  57 f9 35 d1 de 1d 16 50  |pj..#r..W.5....P|
00000210  18 47 d0 69 2e 71 ef 8a  aa a5 4e 36 5e 2c 75 24  |.G.i.q....N6^,u$|

iv tried some them commands and this is all i get is this

root@OpenWrt:~#  ubinfo -a
UBI version:                    1
Count of UBI devices:           0
UBI control device major/minor: 10:63
root@OpenWrt:~#  ubinfo -d 0 -n 5 -a
ubinfo: error!: cannot get information about UBI volume 5 on ubi0
        error 2 (No such file or directory)
root@OpenWrt:~#  hexdump -C /dev/ubi0_4 | head -n 34
hexdump: /dev/ubi0_4: No such file or directory

the files im trying are
ede-mediatek-mt7622-MTK-AX3200-MT7531-squashfs-sysupgrade
openwrt-22.03.1-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery-installer
openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery-installer
openwrt-22.03.0-rc1-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade
[ openwrt-22.03.1-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb 

no matter what firmware i try it kicks me back to recovery

root@OpenWrt:~# hexdump -C /dev/ubi0_2 | head -n 34
hexdump: /dev/ubi0_2: No such file or directory

iv even tried FW_RT3200_1.0.01.101415_prod.img and still stuck in recovery
iv also tried
Switch device power off.
3x Switch device power on for 2 seconds, then off again.
Switch device power on, the device should now boot to the alternative partition.
and also powered off for 10 seconds after using openwrt-22.03.1-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery-installer.itb still stuck in recovery. im not sure now what else as iv been trying for few days now and still stuck in recovery

started a tread over on github and dangowrt commented telling me to try
You need to do things in the right order.
So:
Step 1: rm /sys/fs/pstore/*
Step 2: sysupgrade https://downloads.openwrt.org/releases/22.03.3/targets/mediatek/mt7622/openwrt-22.03.3-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb

Do not reboot after rm /sys/fs/pstore/*, directly proceed to sysupgrade the correct file.

still stuck in recovery

solved it by trying a few commands again

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.