Eventually, I noticed that automatic updates stopped working, and even though 3.7.2 is out, my router has not updated since 3.5.3. My Foris home page was filled with messages about random updater failures, like:
Error from 2017/07/30 19:35:26
Updater failed:
corruption: The md5 sum of kmod-sched does not match
Each time it was a different package. Very confusing.
So, from reading this forum, I decided that pkgupdate
is the appropriate command to use. And it eventually failed like so:
Info:Queue install of mod-sound-core/turris/4.4.77+0-1-967673b9d511e4292e3bcb76c9e064bc-0
Info:Queue install of alsa-lib/turris/1.1.0-1
line not found
line not found
line not found
DIE:
corruption: The md5 sum of kmod-sched does not match
Same random packages. And other times, it would die like so:
Info:Queue install of kmod-sound-core/turris/4.4.77+0-1-967673b9d511e4292e3bcb76c9e064bc-0
Info:Queue install of alsa-lib/turris/1.1.0-1
line not found
line not found
line not found
DIE:
unreachable: https://api.turris.cz/openwrt-repo/omnia/packages/turrispackages/libffmpeg_2.7.6-2_mvebu.ipk: Operation timed out after 120001 milliseconds with 4194304 out of 4660534 bytes
I think I figured out what happened and how to get the router to update:
The pkgupdate
program is not able to retry when a package fails for some reason. Sometimes the server ends the connection early, and sometimes the package fails to download because there is a hard-coded 2-minute limit and the package takes 2 minutes 26 seconds to download on my slow American Internet. Then the next invocation of pkgupdate
downloads all those packages again. The more packages that need to update, the more exponentially likely the update is to fail.
I got it to work by getting the list of packages that pkgupdate
did successfully download, and the next failed package, and then I gambled and used opkg
to install individually the packages that I felt were most likely to be self-contained and not likely to trigger opkg
to self-destruct the system. Things like bash
, busybox
, and all the luci
packages. Eventually, I got the pending package list to be small enough that pkgupdate
downloaded and installed the remaining packages without complaint.
Things yet to resolve: pkgupdate
should cache successfully downloaded packages, at least until they install or go out of date before they install, and pkgupdate
should do something about that hard-coded 2-minute limit so this does not become a problem again. And maybe there should be emails about this: I didn’t know that the router was failing to update until I read the forum emails and learned that there were kernel updates, and then I noticed that my router hadn’t rebooted in months.