Extroot; flash firmware best practice

I am relatively new to this platform and recently had to flash firmware on an extroot system for the first time. Apparently the extroot doesn't carry through between upgrades even minor ones such as 17.1.4 > 17.1.5.
Unless I've missed something there're no instructions in the documentation that provide steps for users with extroot enabled devices on what to do at the time of upgrade. Here at the bottom there's mention of 'release' vs. 'trunk', but that shouldn't apply to most user who just want to flash the latest stable upgrade release in LUCI? If I am wrong on any of this, my apologies and mabye some one can point me to the appropriate documentation. In the meantime maybe some experienced useser could provide feedback, if the following is sound:


  • List of packages that were previously installed on extroot
  • Current backup of device configuration
  1. Backup device configuration
  2. Apply new firmware
  3. Follow instructions on how to set up extroot
  4. Reinstall desired packages
  5. Restore configuration from backup

All should be well in opwnwrt land?



1 Like

The "tricky" thing is that there are two configurations you need to preserve, one is that on the flash file system that says "load the extroot" and the other is the "running" configuration on the extroot itself. sysupgrade only manages the "running" one.

Even if you built an image with the extroot config in the ROM, I'm not sure where the preserved config would be restored by the upgrade process in an extroot configuration, to the flash, or to the extroot.

Sounds like your approach is pretty much on

1 Like

@z0rk -

Your process is exactly what I do. To make it easier, I have written scripts to do this, making it easier and faster to 'restore' to my desired state. Depending on my device, I use either 2 or 3 scripts:

Script 1 (optional, mainly for devices with only a single ethernet port (like the TP-Link TL-MR3020 and TL-WR902AC): sets up and enables wifi LAN, configures ethernet as WAN. Reboot or at least restart network stack before continuing.

Script 2: perform extroot. If using a standard release image, installs necessary packages for extroot process and then runs extroot. (alternatively, if image builder was used to include these packages, go straight to extroot process). Reboot.

Script 3: install desired packages. The nice thing about scripting this part of the process is that you'll always have a list of your packages, easy to update, makes forgetting a key package a bit less likely.

Then I restore the backup. If migrating from a major version, I manually move and test each config file to ensure working configs and prevent conflicts/problems where there have been changes. Minor versions are okay to restore backup directly. Also, don't forget to update the sysupgrade.conf file so that it grabs files you might have stored outside the standard places (mainly anything other than /etc/config).

1 Like

If you're up for it, you can build/assemble your ROM images, including the packages you need, and even including "custom" config files for your extroot implementation.


@jeff @psherman Thanks for your feedback gents!