Is there any documentation about what the Pi is actually doing during its (excruitatingly) slow power down ? I want to build a Pi4 into a product that will definitely have the power cord pulled on a regular basis. Obviously I could put in some sort of UPS but that adds cost. I was thus wondering could I boot the Pi from a read-only USB memory or something else which then copies a fresh copy of the OS to the SD card before rebooting to run from that. Alternatively make the SD card read only and install a second external SD card reader on USB3 and switch to running from that once a fresh copy is installed, although I assume that would be slower because of the USB3 in the way.
This way I think (?) that when the power is pulled the system will still always be safe.
Anybody done anything like this ?
Note that this is not a duplicate - other discussions have been on how to close the Pi, not how to just crash it and recover