Firmware flashing broken since r30754 (sysupgrade from snapshot r36702..r36762 may fail)

i've got mx4300 as AP. since r36754, i cant flash new builds using owut, sysupgrade or the graphical interface. i've tried a default build form firmware-selector and that also will not flash. i'm my device:

Hostname ap253
Model Linksys MX4300
Architecture ARMv8 Processor rev 4
Target Platform qualcommax/ipq807x
Firmware Version OpenWrt SNAPSHOT r36754-c1b3943aa3 / LuCI Master 26.273.63965~32775cf
Kernel Version 6.18.54

wondering of rthe the recent changes to 'mtd' have created a problem. anyone else seeing this?

Use stable?

the problem that i'm reporting is that flashing 'from' r36754 fails. i've tried flashing 25.12.5 but i'. stuck back on r36754.
fw_setenv boot_part 2 reboots to partttion 1. so i'm stuck on it.

seems like a mtd / mtd tools problem in addtion to things reported in issues

Assuming you can't figure out what's wrong via ssh, you'll need serial to investigate/report the issue and be able to get out of the snapshot you're currently on.

You could try to add an automatic TFTP or USB recovery sequence to U-Boot prior to booting from flash, from OpenWRT, but if you get it wrong, you'll def need serial to recover.

its something with recent shapshots on kernel 6.18.54; a 'later' build with 6.18.52 will take a sysupgrade. i might have had a frankenbuild from the owut server. for now, i have reverted to 25.12.5.

i have 3 of these devices all as AP's, and only bricked one of them. my route was to use mtd write from the openwrt cli, going back to oem firmware on both partitions and then restarting the openwrt insertion process.

fyi - this issue has afflicted all my devices that had r36754, including mx8500, whw01, and rt4330w. i've gone back to 25.12.5 on all these devices

how should i go about reporting this issue? i cold not find any other reports, so maybe it was a temporary imagebuilder issue that i was lucky enough to catch.

thanks for your frequent and consistent help in these forums

You need to get serial, an issue stating "it's not working" won't get picked up, logs are most likely the 1st thing they'll ask for anyway.

The reporting is done on the page you got earlier.

I just compiled a new firmware for qualcommax/ipq807x/DL-WRX36 and it fails to boot.
My previous firmware was r36743-c759267c92 compiled at 20260930T2056. And I am now trying sysupgrade from it.

Likely in the similar error as you @ghoffman

I have serial there, and it seems to hang at waiting rootfs:

[    1.691611] 0x000001000000-0x000007100000 : "rootfs"
[    1.766955] mtd: setting mtd18 (rootfs) as root device
[    1.767246] mtdsplit: no squashfs found in "rootfs"
[    1.771051] 0x000007100000-0x000007a00000 : "0:wififw"
[    1.782869] 0x000007a00000-0x00000db00000 : "rootfs_1"
[    1.854767] 0x00000db00000-0x00000e400000 : "0:wififw_1"
[    1.861946] 0x00000e400000-0x00000fa00000 : "ubifs"
[    1.878612] 0x00000fa00000-0x00000fa80000 : "0:ethphyfw"
[    1.879480] 0x00000fa80000-0x00000fd00000 : "certificate"
[    2.237295] cpufreq: cpufreq_policy_online: CPU0: Running at unlisted initial frequency: 800000 kHz, changing to: 1017600 kHz
[    2.239236] remoteproc remoteproc0: q6wcss is available
[    2.578119] qca-ppe 3a000000.ppe: configuring for fixed/internal link mode
[    2.578181] qca-ppe 3a000000.ppe: Link is Up - 1Gbps/Full - flow control off
[    2.758628] qca-ppe 3a000000.ppe lan4 (uninitialized): PHY [90000.mdio-1:00] driver [Qualcomm QCA8075] (irq=POLL)
...
[    3.040679] qca-edma 3ab00000.edma eth0: entered promiscuous mode
[    3.049121] DSA: tree 0 setup
[    3.055341] ubi0: attaching mtd18
[    3.485058] ubi0: scanning is finished
[    3.528272] ubi0: attached mtd18 (name "rootfs", size 97 MiB)
[    3.528310] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.533003] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.539796] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.546633] ubi0: good PEBs: 776, bad PEBs: 0, corrupted PEBs: 0
[    3.553410] ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
[    3.559664] ubi0: max/mean erase counter: 177/119, WL threshold: 4096, image sequence number: 634945484
[    3.566690] ubi0: available PEBs: 0, total reserved PEBs: 776, PEBs reserved for bad PEB handling: 40
[    3.576003] ubi0: background thread "ubi_bgt0d" started, PID 724
[    3.576716] block ubiblock0_2: created from ubi0:2(rootfs)
[    3.591554] clk: Disabling unused[    3.600982] check access for rdinit=/init failed: -2, ignoring
[    3.601087] Waiting for root device /dev/ubiblock0_1...
[   13.927805] qcom,gcc-ipq8074 1800000.clock-controller: sync_state() pending due to 8a00000.usb
[   33.767788] l11: disabling

In my archive from March 2026, a successful boot goes like this:

[    2.023598] ubi0: background thread "ubi_bgt0d" started, PID 668
[    2.033457] block ubiblock0_1: created from ubi0:1(rootfs)
[    2.039143] clk: Disabling unused clocks
[    2.044702] PM: genpd: Disabling unused power domains
[    2.051414] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.051737] Freeing unused kernel memory: 960K
[    2.057641] Run /sbin/init as init process

First guess is that the crucial difference is
[ 3.576716] block ubiblock0_2: created from ubi0:2(rootfs)
vs
[ 2.033457] block ubiblock0_1: created from ubi0:1(rootfs)
breaking the rootfs finding.

That makes me to think that it may be related to this merged by @nbd

It explicitly says that:

Since sysupgrade creates the provisioning volume by default, it takes the
lowest free volume ID before the kernel and rootfs volumes are created.
This shifts their IDs by one, so devices that hardcode the rootfs volume
in root= (e.g. root=/dev/ubiblock0_1) no longer boot after a sysupgrade.

EDIT:
that previously mentioned commit is apparently the fix, not the problem itself, which was from two days earlier:

So devs are merging stuff, without testing, that bricks routers ? That's nice...

... bricking just some devices, not all...

(there is no real possibility to test all devices for all changes)

Well, don't most devices in qualcommax target have rootfs volumes hardcoded ? If so it would be nice to check first.

Yeah,
just checked from DTS, and it is hardcoded for DL-WRX36 :

Just checked, and someone reported that ipq50xx is affected too haha :slight_smile: So, pretty much most of qualcommax target...

I guess that that problem only concerns if sysupgrading from a build

  • AFTER the r36702-725a1dc534 "create provisioning partition by default" on 29 September and
  • BEFORE the later fix r36763-3f26ab3d4d "keep kernel and rootfs UBI volume IDs with provisioning" merged on 1 October.

So, both my own build r36743 and ghoffman's r30754 just fall into the problematic time period.

Just need to figure the best way to escape the trap.
(I have the DL-WRX36 fallback USB stick bootcmd installed, so that will likely offer a way for me.)

EDIT:
related bug:

EDIT2:

I fixed my own things by:

  • boot DL-WRX36 with the USB stick recovery boot to an old OpenWrt version uimage.
  • compile a personal new firmware image with DTS patched with root=/dev/ubiblock0_2 so that it will boot with the current ubi contents.
  • Transfer the image to router /tmp with scp. Then sysupgrade to that image
  • manually delete the "provisioning" ubi0_0 volume with ubirmvol
  • sysupgrade from ssh console to a new firmware with normal root=/dev/ubiblock0_1 with sysupgrade --no-provisioning <firmware_name>
  • Then sysupgrade normally to the same normal image.

Now I have the provisioning volume there at ubi 0_127, and kernel is normal ubi0_0 and rootfs ubi0_1:

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

ubi0
Volumes count:                           4
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     776 (98533376 bytes, 93.9 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:  40
Current maximum erase counter value:     180
Minimum input/output unit size:          2048 bytes
Character device major/minor:            246:0
Present volumes:                         0, 1, 2, 127

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        47 LEBs (5967872 bytes, 5.6 MiB)
State:       OK
Name:        kernel
Character device major/minor: 246:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        151 LEBs (19173376 bytes, 18.2 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 246:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        532 LEBs (67551232 bytes, 64.4 MiB)
State:       OK
Name:        rootfs_data
Character device major/minor: 246:3
-----------------------------------
-----------------------------------
...
-----------------------------------
Volume ID:   127 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        2 LEBs (253952 bytes, 248.0 KiB)
State:       OK
Name:        provisioning
Character device major/minor: 246:128
root@router5:~#

If you're running a snapshot r36702..r36762, upgrade with:

sysupgrade --no-provisioning <image>

Run it from the shell. LuCI and owut don't pass the flag.

The flashing is done by the running build's sysupgrade script, so this applies to any target image, including 25.12.x.

Without the flag, that script creates the provisioning vol at ID 0 and the new image hangs at Waiting for root device /dev/ubiblock0_1. A board that already hangs needs serial, web recovery or USB recovery first.

With a fixed build (r36763+), the next normal sysupgrade puts provisioning at the last volume ID.

Tested on a Mercusys MR80X v2.

Yeah, the sad part is that if you are now running a faulty build, you will likely notice this discussion only after a failure with normal sysupgrade, and then you are already in trouble.