Upgrading Individual packages - CLI - openvpn

When I do opkg list-upgradable, I see a bunch of packages that can be upgraded. One of the package is openvpn, and I do not want to lose my keys and config. How do I do the upgrade?

opkg update
opkg upgrade openvpn

Configs are not lost when upgrading software. Just to be safe, save your configs first. Simple.

You might read this thread beforehand...

1 Like

System level packages should never be upgraded (kmods, base files, etc.), as this will cause major issues and result with having to reflash.

If you want to upgrade non-system level packages, I'd recommend simply compiling your own image due to what @jwoods mentioned. Compiling is super simple, and to make it easier for users not familiar with the process, I created a script that automates the entire process on Ubuntu (VM, live boot USB, etc.).

  • This also allows you to include all your custom files and configs within the compiled image:
    • Any custom files to be included within an image are placed, in the same hierarchy as / on the router, in <buildroot>/files/ (i.e. files/etc files/root, etc.)

Thank you JW* for the replies.

I understand that the system packages will be duplicated. Now, If I do extroot (my router has USB port), will that make any difference? Can the OS partition be made +rw for upgrades?

BTW I went ahead did the package upgrade before reading the replies (need for latest and greatest). You are correct, for the same packages, my free storage was reduced significantly. :frowning: The system seems to be stable so I will keep it till the new image comes along.

First is the file system -- there is a read-only "rom" file system that contains the firmware -- including the kernel, core OS, and whatever packages were included. Then think of a transparent file system above that. If you write a file, it writes to the "overlay" partition. (extroot is just using another file system, such as a USB stick, at the overlay.) When you ask to read a file, it checks the overlay first. If it is there, it gives you that. If not, it checks to see if it is on the rom file system and returns that, if it is. Now, the thing is "deleting" files that are on the rom file system. I picked the word "see" because "deleting" a file from the rom file system is really just a blob of Wite Out on the overlay system. You can't "see" the original beneath. That's when when you delete from the rom, you don't see any more free space available. Same kind of thing goes when you "replace" a file -- you're just putting a new version of it on the overlay; the rom version is still there too.

That's why many people recommend a full upgrade - most everything big is on the rom, only your config files and the like are on the overlay. I'll upgrade a package or two, or one I know I've installed (so isn't on the rom anyway), or one that I consider to be a security upgrade. Other than that, I'll build a new image, or roll the dice and grab the current SNAPSHOT build. Remember that with SNAPSHOT builds, tomorrow's kernel modules won't work with today's kernel.

I do full builds from scratch, easy once set up, but not a 1-2-3 thing the first time through. You might want to look into the Image Builder to see if it does what you need. I think it has nearly as many prerequisites as the full-on toolchain, so I've never messed with it. You'll need a 64-bit Linux machine, or one running in something like VirtualBox.