im using a Raspberry Pi 4b with RTL8152 chipset based ethernet dongle for wan.
When i updgrade the open wrt firmware the driver for the ethernet dongle has been removed and all addons (packages) with their configs i installed as well.
It's so annoying. I have to complete reinstall everything. Especially because of the lost internet connection, i have to use another router for internet to get the ethernet usb dongle driver back. Manually downloaded correct packages are causing installation errors. Wrong kernel... .
Do you have a solution how i can keep all packages and settings?
Sysupgrade will do this on a non-router device. Like RPi and x86, etc.
Is it maybe possible to build the image for these devices with all these add-ons installed at the building process with imagebuilder or from source code?
option 1: use https://chef.libremesh.org/?version=21.02.1&target=bcm27xx%2Fbcm2711&id=rpi-4 and add the packages you want to be included in your build under the "customize" section. For a RTL8152 ethernet dongle that would be kmod-mii, kmod-usb-net and kmod-usb-net-rtl8152.
option 2: download the driver packages you need from the same repository as the factory image before you flash the image (and you lose your internet connection) so you can upload them right after sysupgrade while you're still offline. See [pi4] keep modules (usb-ethernet adapter) over offline upgrade for details.
Thank your for your answers.
I noticed when i upgrade the system the partition size on the sd card is resetted as well. So i get from 128 GB only a few mbytes. I would have to resize the partition after each upgrade with gparted.
Is there a possibility to emulate openwrt in a virtual machine? So i could only swap the sd cards fast and the router would be ready again very quick.
This is very Accenture (so PowerPoint) level, since I don't know what the RPi uses as boot loader, but..
Set up the new version on the same SD, parallell to the old install, resize the FS, wget all the required extra packages, reboot into the new version, and install the packets you're missing?