Upgrading Openwrt 21.02.01 to Latest

Hi all,

New to Openwrt but have been running it for several months on a Ubiquiti Edgerouter Pro. It works great and Luci makes it so easy to administer!:slight_smile: I did one upgrade of it and managed to break it and fix it. Now I'm looking to upgrade it again and wanted to know if I did something wrong. On my first upgrade I went just one version up from 21.02 to 21.02.01 I believe. I ran sysupgrade and did it through Luci. When it finished my internet did not come back. I found I had to plug my router into another router to get it to the internet and then I downloaded MWAN again and restored my other misc packages (mostly stats packages) and it was fine. Is there a better way to do the upgrade that doesn't wipe the packages? My internet ports don't match up with the default ports either so I had to move cables around. So did I do something wrong or is it supposed to work this way?

Thanks for the input.

Glad you like OpenWrt, it's such a fine project and community! :slight_smile:

If you need to have packages present "right after the upgrade", without a window of opportunity to install them manually after flashing a new image that does not have that requiered package already inside it, you will want to use the Image Builder to include these packages in your personal image from the get-go: https://openwrt.org/docs/guide-user/additional-software/imagebuilder

1 Like

Thats awesome. I saw the tool but didn't even think about using to build an upgrade image! Rock on! Thank you. I'll play with it latter this week.

One more question. . . :slight_smile: So I found an online image building tool. It has built me an image with collectd, mwan3 etc. Upon a sysupgrade will my configuration still be present or will I need to upload it again too?

If you use sysupgrade in a mode that preserves configs (which is the default), then yes, your configuration files and settings in them will be preserved.

1 Like

I had similar issues with the updates, and my solution is maybe not the best but see it as an alternative if you don't want to compile the firmware every time.

I open a terminal and with the following command I get the complete list of the packages installed

opkg list-installed | awk -F " " '{print $1}'|sed ':a;N;$!ba;s/\n/ /g' 

I copy the output and save it to a file and when the upgrade is over I run

opkg install <the list of files>

That final step unfortunately doesn't accept more than 3 lines so i need to repeate that step 3 or 4 times in order to install the whole list of files.

After that I reboot and I have my router exactly as before the upgrade (of course you have to preserve the configs during the install)

There is also the Attended Sysupgrade system that can do everything for you... it basically collects info about your current configuration, builds a custom image containing everything you need, and then downloads and installs it. It's pretty cool.

4 Likes

I scratched that particular itch by automating the Image Builder with a bit of (ugly) python, which will take care of downloading ImageBilder tarballs and creating images according to a simple INI-style definition. So going from 21.02.n to 21.02.n+1 is done by dialing up a number in the INI, and rerunning the python script.

It's available here: https://johannes.truschnigg.info/code/openwrt_autobuild/ - maybe it's useful for you as well :slight_smile:

1 Like

I found this website https://asu.aparcar.org. It takes the image file and adds the packages you need for you. Have you guys tried it? Thanks for all the things to try!

That is the attended sysupgrade I mentioned before.

1 Like

So many cool packages!