0

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

9
  • Welcome. The Pi's power down is not "excruitatingly slow" unless you mistake it for the wrong kind of device. It is on a reasonable par for other similar devices that run a general purpose operating system, such as a smartphone. What it is not like is a pure microcontroller (MCU) based device which cannot run a standard operating system, does not have gigabytes of memory, etc., such as many things used in an embedded context. "I want to build a Pi4 into a product that will definitely have the power cord pulled on a regular basis" -> Don't use a Pi for such a project.
    – goldilocks
    Aug 13, 2019 at 12:25
  • Sorry but I checked all the previous questions and this is not a duplicate. Aug 13, 2019 at 12:28
  • And sorry but the Pi is excruitatingly slow on closing. The STM32MK157 does it much faster. And lots of people use Pis for embedded as it's a good fit. Indeed why would the Pi Zero and Pi compute module exist otherwise Aug 13, 2019 at 12:31
  • I did not say don't use it for "embedded". I said don't use it for something that often won't be shut down properly. If there are alternatives that you already know will do what you want, why don't you just use one of those? But if there is no such option, then you need to rethink your understanding. The STM32, BTW, is a perfect example of exactly what I was referring to: It is not even close to comparable to a Raspberry Pi. It is in a completely different category of device. If that is the kind of thing you need, use it.
    – goldilocks
    Aug 13, 2019 at 12:38
  • Beyond that, the "How can I kill the power safely without shutting the OS down properly?" has been done to death. If you want to ask a specific question about copying the whole OS from one place to another at boot, and/or about implementing a read-only filesystem, etc., then feel free to do so. But we are not a "brainstorm-with-me", discussion style forum. Please take the tour to understand better how the site works.
    – goldilocks
    Aug 13, 2019 at 12:38

0

Browse other questions tagged or ask your own question.