UniFi AP LR resets to defaults after reboot on OpenWRT 24.10.2

Hi everyone,

I'm testing OpenWRT 24.10.2 on a UniFi AP LR and encountering an issue where the device resets to factory defaults after every reboot.

Details:

  • Upgraded from 23.05.5 (which worked fine) to 24.10.2 (where the problem occurs)
  • Using firmware built via Firmware Selector with these custom packages:
base-files ca-bundle dropbear firewall4 fstools kmod-ath9k kmod-gpio-button-hotplug kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables opkg ppp ppp-mod-pppoe procd-ujail swconfig uboot-envtools uci uclient-fetch urandom-seed urngd wpad kmod-usb2 luci openwisp-config openwisp-monitoring netjson-monitoring sqm-scripts iperf3

Observations:

  • With stock firmware (no custom packages): If I configure manually after flashing, settings persist after reboot
  • With custom firmware:
    - On 23.05.5: No issues
    - On 24.10.2: Always resets

File size:
ls -all test.bin -> -rw-r--r-- 1 a a 7537482 1 lug 12.03 test.bin

Could this be a problem resulting from limited space?

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.8M      4.8M         0 100% /rom
tmpfs                    27.5M    136.0K     27.3M   0% /tmp
tmpfs                    27.5M     80.0K     27.4M   0% /tmp/root
overlayfs:/tmp/root      27.5M     80.0K     27.4M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev

Thanks in advance for any help or suggestions!

Yes this looks like it is out of flash space. You need five 64 kiB blocks free for the jffs to be formatted.

Remove some packages. Some likely candidates:

  • opkg -- there won't be space to add any more packages at runtime anyway.
  • kmod-usb2 -- the SoC USB port does not need to be brought up as the hardware is not connected to anything on this board.
  • ppp, pppoe -- not needed unless wan connected directly to an ISP that uses pppoe
  • ca-bundle -- this rather large package is unfortunately a dependency of openwisp and results in installing two redundant root CA sets. Note that without opkg you're really not going to do any https other than to your openwisp server, and if you check that certificate at all you only need that single root CA.
  • swconfig -- not sure of this there may be a direct PHY in which case SoC switch not used. Be careful removing this one since Ethernet may break, which is a little difficult to recover from.