For specific preposes I mount /
into directory somewhere in /tmp/
without any special options. When I perform sysupgrade -n
:
- With older system 21.02 with root in ubi volume
sysupgrade
fails completely saying that volume is busy and not writing new image; - With newer system (~1 year old) it upgrades, but still complains that it can't delete volumes from the boot storage device.
Any idea how to cope with it? Is there any user (supruser) script sysupgrade
runs where I can put FS unmount command? Or maybe I can mount /
with specific options - I need it in read-only mode.
Edit: and by the way, I didn't get it with newer system: why it wants to repartition the boot device, it must only upgrade/touch its boot partition, why it wants to remove data partitions? I recall someone here told me that sysupgrade deliberately leaves other partitions on the same media alone so that users may save the data into there, but here I explicitly see it tries to do otherwise.
Edit: and yes, on newer system it really deletes data from data volume! Root FS is in eMMC p2, data is in p3, and p3 loses its contents after sysupgrade. However I use -n
option to perform full image replacement, but why the device layout? Help for sysupgrade
says '-n' for "do not save configuration over reflash", but what's the "configuration"?
Edit: on older system another ubi volume, which contains the data, is not removed during sysupgrade, and data stays intact.
So we have two problems: (1) issue with sysupgrade when root is mounted elsewhere, and (2) newer system loses its contents of the data volume.
Edit: well first problem is mentioned in the tech page for susupgrade
Easily broken by open files on storage devices (e.g., for swap, or explicitly opened), as these can prevent unmounting
/overlay
probably there is a way to tun script on start of sysupgrade, maybe in platform.sh
, but not sure.