OpenWISP Firmware Upgrader error "Cannot find '/overlay/upper/etc', required for '-c'"

232 views
Skip to first unread message

Mirja Shahriar Enan

unread,
May 11, 2022, 2:34:55 PM5/11/22
to OpenWISP
Hello, 
OpenWISP Firmware Upgrade is failing with this error - " Cannot find '/overlay/upper/etc', required for '-c' "
OpenWRT version tried -  19.07.9, 21.02.2, 21.02.3
Tried multiple devices but all same. In the device, I see the overlay folder but nothing in it.
Not sure how to work around this, appreciate any help :)

Screenshot -

Screenshot_2.png


Federico Capoano

unread,
May 12, 2022, 3:49:46 PM5/12/22
to open...@googlegroups.com
Hi Mirja,

That log you shared is coming from the OpenWrt output of the sysupgrade -c command.

I think that if you execute the same command manually you would get the same error, try to execute the upgrade manually, eg:

scp image.bin root@<ip>:/tmp
sysupgrade -c /tmp/image.bin

I never encountered this error but it looks like something which has to be debugged on the OpenWrt side, because it's not normal that part of the overlay filesystem is missing.

Best regards
Federico Capoano

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/d4f15183-a74e-4126-a9f8-d9b27582d10bn%40googlegroups.com.

Ajay Tripathi

unread,
May 15, 2022, 6:43:33 AM5/15/22
to OpenWISP
Hi,

I think I have seen the error before, If I remember correctly.
The problem in my case was that some of files and folders were mounted as readonly in the filesystem, so I suggest look for that.

P.S: I never fixed the issue, I only have a couple of routers, so I just flashed new version instead of upgrade.

Best,
Ajay T.

Mirja Shahriar Enan

unread,
May 15, 2022, 7:30:21 PM5/15/22
to OpenWISP
Hello All,
Thanks for your prompt reply. I did some workaround for this issue that I described below. It may not be good practice and I might miss something, but I was only doing some proof of concept work so it was ok for me.

1. from web search, i saw -c option is used to specify a configuration file for the sysupgrade (link: http://www.polarhome.com/service/man/?qf=sysupgrade&tf=2&of=NetBSD&sf=8 ). I felt like this is not necessary at least for my testing.
2. I went ahead and modified the upgrader script in this location - /opt/openwisp2/env/lib/python3.9/site-packages/openwisp_firmware_upgrader/upgraders/openwrt.py and removed the "-c" from the command.
openwisp_firmware_upgrade_script_modification.png
3. retired the upgrade again and it was a success. I used a base image directly downloaded from OpenWRT website.
4. in my OpenWRT devices, i saw my configurations were there (e.g - i had a openVPN connection with pfSense before the upgrade and after the upgrade config is still there, and the tunnel was established).
5. for OpenWISP, I saw config file is there (in /etc/config/openwisp), but the OpenWISP package itself was missing. After some reading, I found out it's normal that packages are not retained after sysupgrade.
6. As a workaround, I built a custom image with pre-installed my necessary packages and did the firmware upgrade using it. After the upgrade now everything is good, including packages as those were already pre-baked.

Hope this helps!
Thank you.

Federico Capoano

unread,
May 16, 2022, 8:01:43 AM5/16/22
to open...@googlegroups.com
As long as you know that any change to /etc/ which is not done via OpenWISP will not be maintained after the upgrade, and as long as you know that whenever you upgrade OpenWISP you will lose that change, you're good.
A cleaner fix is to either fix your firmware or as a last resort write a custom upgrader class in which you override UPGRADE_COMMAND and configure it as the default upgrader.

Best regards
Federico Capoano

Reply all
Reply to author
Forward
0 new messages