New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ar71xx: UBNT UniFi AP-AC Mesh/Lite/Pro sysupgrade broken #1301
Comments
What was GLUON_ATH10K_MESH defined to during the build? |
We are seeing old kernels in dmesg after sysupgrading to newer ones. Seems like the sysupgrades are incomplete. |
Corresponding dmesg (AC Mesh sysupgraded from openwrt to gluon):
|
Just an educated guess: |
We did remove the ro flag from the ubnt-airos partition and tried to sysupgrade from that image. Still no luck, sysupgrade seems only to write to the firmware partition. Writing the image again to ubnt-airos partition via mtd, the router boots the new kernel. (https://github.com/lede-project/source/blob/master/target/linux/ar71xx/image/ubnt.mk#L116) It seems like the router loads the kernel image from ubnt-airos while mounting the rootfs from firmware-partition. There is some kind of bootflag according to this lede-forum article (https://forum.lede-project.org/t/solved-ubnt-unifi-ac-pro-partition-problems-kernel0-vs-kernel1/1944) which decides the default boot partition. |
This forum article: https://forum.lede-project.org/t/solved-ubnt-unifi-ac-pro-partition-problems-kernel0-vs-kernel1/1944
Goes on and describes what needs to be written to change the boot partition. |
Upstream issue: https://bugs.lede-project.org/index.php?do=details&task_id=662 |
today i tested one of my UAP AC Pro in depth:
so there is a workaround, but a solution would be better of course. |
It is possible to write the indicator on BS partition from Stock UniFi Firmware. (Verify mtdpart of bs partition first!)
Maybe we integrate this into the sysupgrade procedure, alternatively we document this need somewhere. Because there is already a lot of documentation which lacks this step, this is probably not the desired solution (The breakage only occurs on kernel updates). |
Was this just a lucky draw, or is a sysupgrade from 2016.2.7 to 2017.1.5 basically harmless? |
Pure luck depending on the state of your |
@blocktrron I think fixing the documentation is a good idea, and is IMO good enough to close this issue (and the upsteam one). Making bs writable from OpenWrt/LEDE would also be nice, so it will be possible to fix this issue after flashing as well in the futute. I propose to use /dev/zero instead of echo though to get a zero byte. Does the bs partition contain anything interesting after the first byte? Otherwise we could just overwrite it completely. (mtd directly from /dev/zero?) |
sysupgrade with “mtd write /tmp/firmware.bin kernel0” following “mtd -r write /tmp/firmware.bin kernel1” should also solve the problem, or am I going wrong? |
@NeoRaider There is something on the bs partition but i am not able to relate it to something. @biggesee In case your new Kernel is booting from kernel1 partition, the rootfs is still mounted from kernel0, which leads to problems. |
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
my test proofs, that there is a flag being switched with each stock upgrade. so yes, the outcome of these tests is different depending on where your start. |
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
@blocktrron your upstream change was merged, maybe you could document your fix on upstream's wiki and link to that in upstream bugreport and here? |
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
|
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
Not sure if I'm at the right place here.
How do I flash? |
Downgrade to stock firmware from before march 2017 or pull mtd from openwrt 12.x. |
I just updated the documentation in the openwrt wiki: |
I was able to install gluon on an AP-AC-PRO-Gen2 by first downgrading it to 3.4.7 (just "before march 2017" is not enough) via TFTP (using the firmware.bin image mentioned here), then flashing the <gluon>-ubiquiti-unifi-ac-pro-sysupgrade.bin to kernel0 with |
Firmware 3.4.70 is the latest one before march 2017, and it has Can you please post the output of
Ultimately the issue is not that you cannot flash or boot the device, it is the issue that booting may break when a kernel ABI bump happens. |
On the site you are referencing, the firmware just before march is 3.7.40, not 3.4.70 (Screenshot). I'll post the |
Okay, mixup in the version number. What does not work for you on 3.7.40? Looking at the first log It is more likely that the device booted from |
Can't tell what exactly caused the failure on 3.7.40, the device kept rebooting into stock. I'll be getting 11 of the devices in about 4 weeks for use with gluon, I can do some more tests then. I'm not an expert on the bootselect or mtd, so I can't really give a guess about the reasons. |
Ok, walking you through the situation:
|
Thanks for giving those details, this helps a lot. |
closing this issue as there is a workaround and a perfect solution is unlikely to appear in the near future. |
Just in case it helps:
|
Ok, looks like the firmware partitions on the UAP-AC-Pro (that is your device, right?) are |
Both correct. |
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: Christoph Krapp <achterin@googlemail.com>
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: Christoph Krapp <achterin@googlemail.com>
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: Christoph Krapp <achterin@googlemail.com>
This comment was marked as spam.
This comment was marked as spam.
This removes the read-only flag from the bs (bootselect) partition on UniFi AC devices. This allows to correct the indicator from which partition the device is booting its kernel from. See also: - freifunk-gluon/gluon#1301 - https://bugs.lede-project.org/index.php?do=details&task_id=662 Signed-off-by: David Bauer <mail@david-bauer.net>
Flashing the current Gluon master on a UBNT UniFi AP AC Mesh results in a broken WiFi interface.
iw dev
results innl80211 not found.
logread
dmesg
The text was updated successfully, but these errors were encountered: