I would like to have two identical OSs, Rasp Stretch Lite, as a safety/update feature for unmanned Pis.
So if I had stored on 2 partitions on a USB stick
Have it boot OS_A and use this OS.
In the future I want to upgrade the OS, lets say instead of running apt-get update and relying on this process, I could get OS_A to download a compressed image, uncompress it to the partition of OS_B, once its done, update the boot file to point to this OS_B, it reboots and load OS_B. If OS_B is successful then carry on using that. Obviously in the future I can do the same upgrade but back to OS_A.
Couple of questions
1) Is my logic sound with this idea?
2) Any ideas how I can write a fail back script, so lets say OS_A just uncompressed a new OS to OS_B, changes the boot file to point to OS_B and reboots. If OS_B fails to boot then how can I update the boot file to go back to OS_A
Thanks in advance for any thoughts