[FS#662] Sysupgrade messes up Ubiquiti Unifi AP AC Lite

LEDE Bugs lede-bugs at lists.infradead.org
Tue Mar 28 10:42:08 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - rogerpueyo (rogerpueyo) 

Attached to Project - LEDE Project
Summary - Sysupgrade messes up Ubiquiti Unifi AP AC Lite
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Media
Priority - Normal
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - =====Problem description=====
Performing a sysupgrade on a Ubiquiti Unifi AP AC Lite causes the device to operate erratically as, on reboot, it keeps the previous kernel while using the newly flashed rootfs.

====Possible cause====
This problem might be related to the way LEDE/OpenWrt must be flashed from the stock firmware, as detailed in [[https://wiki.openwrt.org/toh/ubiquiti/unifiac#unifi_ap_ac_lite_devices|OpenWrt's wiki]]. Flashing the image to kernel0 or kernel1 does not work; both partitions must be flashed with the same image.

====Steps to reproduce it====

  - Revert to stock firmware (e.g. via Ubiquiti's TFTP recovery procedure)
  - Flash LEDE image (e.g. 17.01.0 stable) from stock firmware as described in [[https://wiki.openwrt.org/toh/ubiquiti/unifiac#unifi_ap_ac_lite_devices|OpenWrt's wiki]] (writing both to kernel0 and kernel1 partitions)
  - On reboot, check kernel version (dmesg | head -n1)
  - Sysupgrade to LEDE snapshot (sysupgrade -v -n lede-ar71xx-generic...)
  - Check kernel version again (dmesg | head -n1)

Both kernel versions will be the same. Actually, it's the same kernel, only the rootfs has been upgraded.

======Suggestions======
It seems Ubiquiti's bootloader implements some mechanism to fallback to an older firmware/kernel/rootfs/image/whatever, or maybe the partitioning scheme has been updated in the stock firmware.

If instead of running sysupgrade, the LEDE image is dd'ed to both the "firmware" (mtd2) and the "ubnt-airos" (mtd6) partitions (mtd write /tmp/lede-ar71xx...lite.bin firmware && mtd -r write /tmp/lede-ar71xx...lite.bin ubnt-airos), the new image is booted (including the new kernel). However, the "ubnt-airos" partition is read-only so a LEDE image having this partition set to rw must be first compiled and flashed from the stock firmware.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=662



More information about the lede-bugs mailing list