UAP-AC-PRO not reachable after first bootup

My uap-ac-pro stops replying to network packets after printing the
Please press button now to enter failsafe message over the network.
More closely related: https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg55379.html

Possibly related, but not solving the issue: https://github.com/openwrt/openwrt/commit/2dffadece9a7243a236ce7d91719787a671e23d4#comments

Im on current master with the following config diff:

CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_generic=y
CONFIG_TARGET_ath79_generic_DEVICE_ubnt_unifiac-pro=y
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
# CONFIG_BINUTILS_USE_VERSION_2_34 is not set
CONFIG_BINUTILS_USE_VERSION_2_35_1=y
CONFIG_BINUTILS_VERSION="2.35.1"
CONFIG_BINUTILS_VERSION_2_35_1=y
CONFIG_GCC_USE_VERSION_10=y
# CONFIG_GCC_USE_VERSION_8 is not set
CONFIG_GCC_VERSION="10.2.0"
CONFIG_GCC_VERSION_10=y
# CONFIG_GDB is not set
CONFIG_PACKAGE_ATH_DYNACK=y
CONFIG_PACKAGE_ath10k-firmware-qca988x=y
# CONFIG_PACKAGE_ath10k-firmware-qca988x-ct is not set
CONFIG_PACKAGE_cgi-io=y
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_kmod-ath10k=y
# CONFIG_PACKAGE_kmod-ath10k-ct is not set
CONFIG_PACKAGE_kmod-ledtrig-default-on=y
CONFIG_PACKAGE_kmod-ledtrig-heartbeat=y
CONFIG_PACKAGE_kmod-ledtrig-netdev=y
CONFIG_PACKAGE_kmod-ledtrig-timer=y
# CONFIG_PACKAGE_kmod-nls-base is not set
# CONFIG_PACKAGE_kmod-usb-core is not set
# CONFIG_PACKAGE_kmod-usb2 is not set
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_libltdl=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-compat=y
CONFIG_PACKAGE_luci-lib-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-iptparser=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-mod-network=y
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-material=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-file=y
CONFIG_PACKAGE_rpcd-mod-iwinfo=y
CONFIG_PACKAGE_rpcd-mod-luci=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_ucert=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
CONFIG_PACKAGE_wpad-wolfssl=y
CONFIG_PACKAGE_zlib=y
CONFIG_TARGET_OPTIMIZATION="-O2 -pipe -mno-branch-likely -mips32r2 -mtune=74kc"
CONFIG_TARGET_OPTIONS=y
# CONFIG_ATH10K_LEDS is not set
CONFIG_PACKAGE_kmod-hwmon-core=y

Is there anyone else using this device and with a working installation on current master?
Im going to try figuring out why it fails to boot.

[    6.044834] eth0: link up (1000Mbps/Full duplex)
[    6.054574] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    6.069927] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to [    6.110662] urandom_read: 4 callbacks suppressed
select the debug[    6.110668] random: procd: uninitialized urandom read (4 bytes read)
 level
[   10.296498] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   10.306903] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.385689] eth0: link down
[   51.254485] random: crng init done

This is the last thing it prints, and then it keeps blinking the onboard led and locks up

[   10.028174] procd: running /etc/init.d/ubus running
[   10.041609] procd: glob failed on /etc/init.d/ubus
[   10.100554] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.107704] procd: Connection to ubus failed
[   10.211963] procd: Connection to ubus failed
[   10.416250] procd: Connection to ubus failed
[   10.820736] procd: Connection to ubus failed
[   11.626669] procd: Connection to ubus failed
[   12.632740] procd: Connection to ubus failed
[   13.638863] procd: Connection to ubus failed
[   14.644944] procd: Connection to ubus failed
[   14.918610] procd: Ping
[   15.651092] procd: Connection to ubus failed
[   16.657182] procd: Connection to ubus failed
[   17.663097] procd: Connection to ubus failed
[   18.669185] procd: Connection to ubus failed
[   19.675097] procd: Connection to ubus failed
[   19.920937] procd: Ping
[   20.681869] procd: Connection to ubus failed
[   21.687099] procd: Connection to ubus failed
[   22.693185] procd: Connection to ubus failed

hmmm /etc/init.d/ubus does not even exist in my image (staging dir).

I think i found a part of the problem:

root@(none):/etc/config# ubus
ubus   ubusd
root@(none):/etc/config# ubusd
usock: No such file or directory
root@(none):/etc/config# mkdir /var/run/ubus
root@(none):/etc/config# ubusd

Is it possible that this is not created on first boot?

Maybe the same issue like x86_64's , you may find solution in my post.

1 Like

The only thing missing on current openwrt that is in your thread is the shadow + group+passwd file edits.
Imma try this and see if it changes something.

Edit:
Interestingly the files are changed correctly in the rootfs when in recovery console.

Did not work, i dont know whats going on here, either ubusd is not starting correctly during a normal system boot or procd cant connect to it properly.

Im going to try building with the default toolchain for now.
Edit: Not related to the toolchain, i ran the defaults.

Current master just does not run on this device.

19.07.4 boots fine, im going to try building this one aswell to rule out my buildhost.

you should see something like these in your vanilla rootfs...

############!/bin/sh
#[ "$(uci get rpcd.@rpcd[0].socket)" = "/var/run/ubus.sock"  ] && {
#    uci set rpcd.@rpcd[0].socket='/var/run/ubus/ubus.sock'
#        uci commit rpcd
#        
#}
#[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock"  ] && {
#    uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
#        uci commit uhttpd
#        
#}
fgrep -r ubus build_dir/*/root* | grep sock
1 Like

Okay this is exactly what i feared.

Clean installs dont work correctly, when i install 19.07.4 first and then upgrade to latest master it works correctly.
Not sure whats broken here but its super critical if not fixed before release.

gee... I would have assumed the opposite...

in my case, it was the 'keep settings' that trips the new commits up... ( is that device ext4? )

i'm sure they will resolve... master is master for just this purpose... usually... you just come back in a few days / week or so... and forget the whole thing happened :wink:

Device is jffs2.

Its been a while since they touched ubus though, so i assume noone tested fresh first installs.
Hopefully the right person comes across this forum post, otherwise i might have to send an email.

1 Like

i don't see ubus / ubusd?

Its only a diff to the official default configuration file. (generated with scripts/diffconfig.sh)
Ubus/ubusd exist and work correctly when used in recovery manually. Something just doesnt create the configs / file locations for the services correctly on the very first boot.

1 Like