Hi,
Let me introduce my project autoupgrade for OpenWRT. Its a modified sysupgrade script that automates the system upgrade process.
Featuring:
- sha256 checksum verification of upgrade image
- gpg verification of upgrade image
- automatic re-installation of opkg packages incl. kmods
- backup and restore with packages
Its been currently successfully tested on the following hardware:
- x86/64
- tp-link archer c7 v2
VirtualBox Image you can import and play with:
I am in need of testers that are familiar with:
- OpenWRT itself (installing, backup & restore ...)
- resetting their devices (if needed)
- tftp restore (if needed)
Yes I am all those & more! and willing to test.. so how do i set this up ?
- Backup your device with sysupgrade -b.
- View the pull-request https://github.com/openwrt/openwrt/pull/1310 which includes a video of what to expect.
- Download or wget the sysupgrade version of your current installed version to /tmp and chmod +x it.
- master: https://raw.githubusercontent.com/stumper932/openwrt/testing-master/package/base-files/files/sbin/sysupgrade
- 18.06: https://raw.githubusercontent.com/stumper932/openwrt/testing-v18.06.1/package/base-files/files/sbin/sysupgrade
- 17.01: https://raw.githubusercontent.com/stumper932/openwrt/testing-v17.01.5/package/base-files/files/sbin/sysupgrade
-
View installed packages with /tmp/sysupgrade -k and note them somewhere safe.
-
Backup your device using /tmp/sysupgrade -b and copy this file somewhere safe.
-
Setup the upgrade url for your device with /tmp/sysupgrade -U <upgrade_url> (=link to image you normally download to upgrade device manually)
-
Validate with /tmp/sysupgrade -U if the url is set correctly.
-
Check if there is an update for your device with /tmp/sysupgrade -w
-
To test run:
/tmp/sysupgrade -T -Zzz (to do a testrun)
If all done correctly run
/tmp/sysupgrade -Zzz
to perform the upgrade. -
SNAPSHOT/MASTER-ONLY: you can schedule this with cron (checks every hour for update):
!note: in lack of a proper solution atm its parked in /etc/config,this will change in the future!
- mv /tmp/sysupgrade /etc/config/sysupgrade
- service enable crond
- crontab -e and paste * 0 * * * * /etc/config/sysupgrade -Zzz | logger -t sysupgrade
- Want to switch from snapshot to release or vice versa ?
- run /tmp/sysupgrade -U <new_url>
- validate with /tmp/sysupgrade -w
- Logs are found in /var/log or view the system log in luci.
- please post your logs and device brand/version in this thread as attachment
- troubleshooting/questions post them in this thread.
- ama goto: irc #openwrt and ping me.
Have fun and thanks for testing!
Edited/Fixes: sat 17 nov 2018
- testing repos are synced now
- typo's/grammar
- url error