I am using openwrt on X86 platform.
I implement the boot via UEFI and I used for this image the ext4 filesystem.
I am trying to think about how to implement a mechanism to prevent data corruption during sysupgrade flashing process.
This problem can happen for example when the platform is accidentally powered off during sysupgrade.
The current platform has one EMMC device and no other disk.
So the first implementation I though was to keep the current partitions and create new ones after the first partitions block and boot up on the new flashed block via grub configuration.
But I would like to know if someone think about an other concept.
Does someone have an idea ?
Thanks in advance
I already integrate these bunch of modifications to support EFI in my branches.
I probably need a robust mechanism to avoid system lost after a power off during sysupgrade.
Any thoughts ?
Unfortunately, there is no UPS.
It is an embedded system.
Power supply failure can happen.
If you are seraching for a robust solution, then get a UPS.
You could create two partitions. Before update you clone the active system to the 2nd partition, update it and if successful change the grub default entry to the 2nd partition. Next time doing the same with 1st partition.
I personally use a 2nd partition (independent OpenWrt instance) to always update the 1st one (no overlayfs/pure ext4).
That is what I thought to do.
But I tried to see by posting this question on this forum, that an other solution.
Thanks for your help