Zyxel NBG6817 problems flashing OpenWrt

Hi,my post might not quite fit in here, but since I didn't find an active thread for the Zyxel armor Z2, I'll try it here.
My internet access is about to get upgraded from 32Mbit/s to 1000Mbit/s so I thought I'll finally switch from my netgear wndrmacv2(openwrt) to the zyxel nbg6817.
I already flashed the zyxel with openwrt in the past and tried to update it with some self compiled snapshot.
Unfortunately it's not working - tried it with luci and with sysupgrade, but both attempts failed-the zyxel reboots an shows the old image still active.
Right now it's running with OpenWrt SNAPSHOT r10766-3032bf7f89 / LuCI Master (git-19.228.15332-c2d6770) Kernel Version 4.14.138.
Am I missing something here?
Should I use tftp to flash with the latest snapshot?

The push-button tftp recovery described in the debricking guide of the nbg6817's device page will always work, but there might be more gentle approaches.

The easiest would be trying to explicitly disable the wireless interfaces before the upgrade (using ssh):

wifi down
killall -9 hostapd
sysupgrade /tmp/openwrt...nbg6817...sysupgrade.bin

If that doesn't help, switching to the alternative partition set using luci-app-advanced-reboot or https://github.com/pkgadd/nbg6817/blob/master/nbg6817-dualboot might be successful.

If neither if the options help, you can still use tftp.

Didn't work with killing the wifi before sysupgrading - in the kernel log the last entry is "MTD: Attempt to mount non-MTD device "/dev/loop0"->the current image was compiled without the losetup package - can this be a problem?

That would indeed be a problem, but shouldn't happen with OpenWrt (personal build with a modified config?).

The second option, switching to the alternative partition and running the sysupgrade from there, however should work (if not, tftp is still there - and that always works).

How to switch to the alternative partition without having luci-app-advanced-reboot installed - using the github dualboot script?If yes, how to do that? Otherwise if too complicated/time-consuming, I would try the tftp method

cd /tmp
wget https://raw.githubusercontent.com/pkgadd/nbg6817/master/nbg6817-dualboot
chmod +x nbg6817-dualboot
./nbg6817-dualboot --toggle-rootfs
reboot

When trying to execute ./nbg6817-dualboot --toggle-rootfs
I'm getting an error:"./nbg6817-dualboot: line 8: syntax error: unexpected newline"

Are you sure that you downloaded the RAW file (https://raw.githubusercontent.com/pkgadd/nbg6817/master/nbg6817-dualboot) and not the HTML page with github menus, syntax highlighting, etc.?

--
Thinking about it, installing losetup (opkg update && opkg install losetup), might be another option to help the normal sysupgrade succeed. However, r7xxx is quite dated by now (we're at r13xxx now), so that might very well fail.

Great, thank you very much.
First, I used wget on my desktop PC because router doesn't have internet access and scp'ed to the router-but I downloaded the HTML page and not the file(used https://github.com/pkgadd/nbg6817/blob/master/nbg6817-dualboot instead of the given link :see_no_evil:).
Tried again, this time it worked and after the original zyxel image showed up after reboot I was able to flash my openwrt image through the OEM webinterface.
DANKE :wink:

I just checked current OpenWrt master and 19.07.2 builds, both contain losetup and shouldn't pose any problems for future upgrades; no idea why it's been missing from your build.

Btw. nbg6817-dualboot is written in a way that it also works on the OEM firmware, should the need arise to toggle between OEM and OpenWrt. For convenience sake, I'd suggest to install luci-app-advanced-reboot.

My build was self compiled - I guess I forgot to do a make defconfig before compiling my image.
Already added the advanced-reboot package but I don't think that I will revert to the OEM image.
By the way, ist the wifi qca9984 firmware to be preferred over the qca9984-ct firmware?

No, the default is ath10k-ct (and at least currently it works better).

Simple packaging for nbg6817-tools exists in https://github.com/pkgadd/owrt-feed-pkgadd/blob/master/utils/nbg6817-tools/Makefile

Ok, will try that, thank you very much for helping me out so quickly.

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