Which updates are important, and how to start over?

How do I know which software updates are important? How do I revert to a "released" version of the firmware?

I was looking through LuCI and saw the Software section, and noted that there were maybe 17 or 20 software updates listed.

SO I went through the list in LuCI clicking the "Upgrade" button. I think two or three updates complained of something incompatible in their configuration files, so I SSH connected to the router, made copies of the specific outdated files and copied the new configuration files into place. I figured this is a brand-new installation so I might as well have everything new, including config files.

Then I decided to read the docs again and in a section called "Show available updates after a SSH login" I noticed something highlighted with a giant orange exclamation point and a large orange left-brace, and surrounded in a box. I probably hadn't read it because it was so obviously unimportant... :grinning: It says:

Blindly upgrading packages (manually or via script) can lead you into all sorts of trouble.
Inform yourself before doing any upgrades, if it is safe to upgrade. Avoid upgrading core packages, build a new image instead.

If you do chose to upgrade packages, especially with a script: You have been warned. Don't complain on the forum and be ready to deal with the consequences yourself, such as manual dependency resolution and additional free space consumption, potentially leading to ABI-conflicts and soft-bricking.

OK so because of this note and the realization that all of the updates noted git commits, even though the router SEEMED to be working great, I think I probably ought to restart from scratch again with the latest OpenWrt release.

  1. Do I clear the configuration and start over, or do I need to re-flash OpenWrt?

  2. For future reference, how do I know which updates I should consider installing?

Background: I have used linux for years, but I am new(ish) to OpenWRT. I started tinkering with linux in 1995 or so, and in the late '90s settled on Debian, then (after interacting with some of the founders) switched mostly to Ubuntu when it came out in 2004. Generally in Debian and especially Ubuntu, 99% of the updates fix problems and don't cause others.

Looking at my notes, I have been following OpenWrt off and on for years but kept going back to DD-WRT then settled on various varieties of Tomato, starting with my WRT54xxx through several models of ASUS, LinkSys, probably other routers I no longer own. Recently I decided with the stress on the home network (spouse now working from home) I need a better QOS than the (now quite outdated) Tomato Shibby can handle on my ASUS RT-AC66U. I want to try SQM.

SO I have a "new in box" LinkSys WRT1900ACS I bought in 2017 and never used because at the time it wasn't well supported by alternate firmware and I wasn't happy with the stock firmware. (Plus I was annoyed that by default LinkSys wanted to manage my router's configuration via their web site.)

This week I installed the latest, 19.07.2, to the WRT1900ACS.

I have erased and restarted the configuration a couple of times, the first time because I did SOMETHING weird with the configuration in LuCI and it kept telling me it couldn't save, but then it seemed to, but I couldn't tell.

To be fair I was probably trying something nonsensical -- I have an Archer C7 wirelessly connected to my ASUS in what DD-WRT and Tomato call "client bridge mode," yet I'm using the Archer's stock firmware, and I was jumping ahead to try to figure out if OpenWRT can handle that sort of connection if I install it on the Archer C7. I decided that part of the project must wait.)

SO I decided to wipe the configuration and try again. But this time I noticed the software updates and installed ALL of them. Hence my question at the top.

Easy

  • Periodically flash a new release version keeping settings across same releases, then re-install packages.
  • Across releases backup the settings and restore manually
  • The exception is when a known bug is fixed and a specific advisory notifies you to upgrade a package or two

Flash based systems are not designed for mass package upgrades.

4 Likes

To add some additional thoughts to what was already said by @anon50098793 (which is completely right)...

If you feel you want to be on the bleeding edge (or if your device isn't supported by an official stable release), run snapshots. Be aware, though, that snapshots may include new bugs, they do not include LuCI, and the installation of packages can be time-sensitive (you may find that you are unable to install new packages very shortly after downloading a snapshot image because the snapshot build repos are a moving target, unlike the stable releases).

In general, it is rarely necessary to upgrade any packages within a release build unless there is a very specific patch for a security vulnerability or new feature that you must have. Security patches of significant importance/severity are often rapidly rolled into a maintenance stable release.

If/when there is a need to start over, this is easily achieved with one of two methods which will restore back to the original state of the firmware image (however it was built and configured):

  1. reset to defaults for current build (via LuCI: System > Backup / Flash Firmware > Perform reset or via ssh: firstboot and then reboot
  2. Flash a (new or existing) build, not keeping settings (LuCI will prompt to keep settings or not; or in an ssh session, sysupgrade -n <path_to_file> does the same, where the -n argument tells sysupgrade not to keep settings).
3 Likes

OK I'm going to summarize both @anon50098793 and @psherman and add in some terminology from the OpenWrt Web Site. (I find that it helps me to be a little dense and write things out.)

OpenWrt has stable series releases suitable for most OpenWrt users, and snapshots for folks on the "bleeding edge." The current stable series is 19.07, and the current release is 19.07.2.

Most folks running a well-supported router will install the latest stable release and NOT install any suggested package upgrades unless they have very specific reasons to do so. (Three possible exceptions: A. An urgent notification about a specific issue, or B. A need for a new feature in an updated package, or C. Testing a bug fix in conjunction with a developer.)

Generally, urgent bug fixes get quickly integrated into the next stable release, so most folks wait for the next stable release.

If you ARE on the "bleeding edge," you can install software from snapshot build repos, but by necessity those are unstable and break easily. [Upgrading frequently might also needlessly wear out your router's flash RAM.] But snapshot builds might be necessary to use OpenWrt on a router that is not well supported or for otherwise testing software still being developed.

When it's time to upgrade OpenWrt to the next stable release, you can generally have the router retain its settings and reapply them to the upgrade, as long as you're upgrading to the next release within the current stable series.

You will need to reinstall all non-standard packages you are using after every OpenWrt upgrade. [Is this always true?]

If you have accidentally totally borked your router settings or upgraded packages unnecessarily (potentially introducing instability), you can reset to the release defaults for the current build, or flash the build again telling the software to discard the settings and installed packages.

Reset to defaults using LuCI:
System --> Backup / Flash Firmware --> Perform reset

Reset to defaults via ssh:
firstboot [followed by]
reboot

Re-flash a build without keeping the settings via ssh:
sysupgrade -n <path_to_file>
(the -n argument tells sysupgrade to not restore the old settings.)

[Please correct me if I am wrong about any of the above. And do I need start a topic in the Documentation part of the forum to maybe get this added somewhere?]

@twt - I think this is a good summary.

Generally speaking, yes, this is true. You will need to reinstall packages not included in the image, which means most non-standard packages. The exception to this rule is if you are building your own image (you can include whatever packages you want, and even different/customized configuration files) or using one generated by another user/group that might have slightly different goals and/or target systems, but these would not be the OpenWrt official stable releases. Examples would be things like the Davidc502 builds (targeting certain linksys routers), OpenWrt derivative builds (like Rooter), or specialized builds that do things like connect an older DSLR camera to wifi.

I have had my share of issues when preserving settings even within the same release, so I scripted the configuration and now the router configures itself on the first boot after flash. Never had a single issue afterwards.

2 Likes

hi

can we see that script?
thanks

1 Like

Nope, but there are examples at the bottom of this page: https://openwrt.org/docs/guide-developer/uci-defaults

1 Like

What I do is an in-between track, basically homemade backports. I stay on the latest stable release but then update specific packages from snapshots if need be that aren't backported to the stable release (after testing, of course).

1 Like

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