Xiaomi Mi Router 4A Gigabit (32MB) – system does not boot after reboot (via LuCI or CLI)

Hello everyone,

I’m facing a strange reboot issue on Xiaomi Mi Router 4A Gigabit Edition (32 MB flash) and would appreciate any advice on where to investigate further.

Device

  • Model: Xiaomi Mi Router 4A Gigabit Edition

  • Flash: 32 MB

  • Firmware: OpenWrt / ImmortalWRT 24.10.4

  • Github

What I did

  • Built my own Build System

  • From it, built ImageBuilder

  • Then used that ImageBuilder to create the firmware image (to avoid hash/signature issues)

  • Repartitioned flash to better fit 32 MB

  • Added / removed / modified packages (mesh-related, LuCI, etc.)

All source files, configs and scripts are available on GitHub.

Problem

The firmware boots and works fine after flashing, but:

  • Reboot via LuCI web interface → system never boots again

  • Reboot via CLI (reboot, poweroff -r) → same result

  • After reboot, the router seems to hang very early (possibly bootloader stage)

  • Network never comes up

  • UART logs cannot be captured, because after such reboot there is no output at all

  • Power cycling sometimes helps, sometimes not

So basically:

Cold boot after flashing works, but any software reboot bricks the system until reflashed

Notes

  • This happens only on my custom build

  • Official prebuilt images for the same device do not show this behavior

  • Looks like something related to overlay / jffs2 / procd / reboot handling on 32 MB devices

Question

  • Where should I look next?

  • Could this be related to overlay unmount, jffs2 corruption, or procd reboot path?

  • Any hints on what to debug or disable to make reboot safe?

Thanks in advance for any pointers.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
{
"kernel": "6.6.110",
"hostname": "OpenWrt-Mesh",
"system": "MediaTek MT7621 ver:1 eco:3",
"model": "Xiaomi Mi Router 4A Gigabit Edition",
"board_name": "xiaomi,mi-router-4a-gigabit",
"rootfs_type": "squashfs",
"release": {
"distribution": "ImmortalWrt",
"version": "24.10.4",
"revision": "r33602-e717d133ed6d",
"target": "ramips/mt7621",
"description": "ImmortalWrt 24.10.4 r33602-e717d133ed6d",
"builddate": "1761574217"
}

SPI-flash MX25L25635F

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

I just checked; this error happens with OpenWRT firmware.

{
        "kernel": "4.14.180",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Xiaomi Mi Router 3G v2",
        "board_name": "xiaomi,mir3g-v2",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.3",
                "revision": "r11063-85e04e9f46",
                "target": "ramips/mt7621",
                "description": "OpenWrt 19.07.3 r11063-85e04e9f46"
        }
}

The custom Keenetic firmware with the built-in Breed bootloader boots without a problem.

that firmware is 6+ y.o.

We managed without you. While you were trying to figure out if it was your firmware and if the version was up to date, a friend on the 4pda forum suggested adding something to mt7621_xiaomi_mi-router-4a-common.dtsi:

flash@0 {
   compatible = "jedec,spi-nor";
   reg = <0>;
   spi-max-frequency = <40000000>;
   broken-flash-reset;

Thats cross-flashing. Dont you feel your hacked bootloader has something to do with rebooting?

Nope, Itsa same devices in China and Global versions

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