Extroot: Keep overlay during sysupgrade

i have been tons of sysupgrade but once thing i could never do: keep my overlay during sysupgrade.
i always have to format the drive, and re install and my scripts. is there anything new in 18 or 19 to keep the overlay?

What do you mean "keep your overlay"?

By default, the contents of the overlay associated with packages' config or those identified in `/etc/sysupgrade.conf' are preserved through an upgrade.

for me when i sysupgrade the previous overlay on hdd is lost. it should be automatic?

For flash-based setups, generally yes. Otherwise take a backup and restore it. That’s what happens underneath the scenes with flash-based devices.

for me it is not working, i am on linksys and i always have overlay, but when i upgrade , the overlay is missing and i want to re-mount it is not working, so i always have to create a new partation and then reinstall all the packages and scripts and then it works with restore and works.
but there is not way to during upgrade to keep the overlay 100%.

Remount? re-create new partition? That part sounds strange. overlay should be created automatically in the boot process if it is missing.

Only the config files flagged as config files by packages are preserved in a sysupgrade archive. The general contents are not preserved in sysupgrade, so you will need to reinstall possible add-on packages etc. (For example, the installed packages or kernel modules might be incompatible with the new firmware, so you might brick the device, if the contents would be 100% preserved).

no way. Risk of bricking the device would be much too big.

Just remember that overlay contains the changes done on top the current ROM firmware. If you upgrade firmware, you will not want to keep all the changes, as some of them were possibly related specifically to the old firmware, package versions etc.

got it, thanks, no biggie, it is not hard to reinstall packages, but thanks for clearing it upi!

If you're using extroot, the overlay is intentionally disabled, as its contents aren't compatible to the new base firmware (both on an overlayfs consistency level and the package/ opkg/ library ABI level).

1 Like

@patrikx3 Are you using extroot?

yes i always use extroot, but now i understand why i cannot use a previous version openwrt extroot, i always have to rebuild the extroot. got it. THANKS!

It would have been good if you had mentioned that in your first posting.
I updated the topic accordingly now.

is there other way for to create an overlay without an ext-root?

Sure, having an /overlay is standard for OpenWrt.

See https://openwrt.org/docs/techref/flash.layout?s[]=overlay#partitioning_of_the_flash

From https://openwrt.org/docs/guide-user/additional-software/extroot_configuration?s[]=overlay (bold highlighting by me):

In most supported devices OpenWrt splits the internal storage into rootfs and rootfs_data partitions which are merged together into a single writable overlay filesystem.
Extroot works by setting another overlay partition in the external storage device, and during boot this new overlay partition will be mounted over the internal storage's overlay partition. This approach allows easy fallback in case the external storage device is removed, as your device will still have its own overlay partition and thus will load all configuration from there.

thanks.now it is clear

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