For context I am using a raspberry PI3 but in the end might use a PI4 (but docs says they should behave the same).

I changed config.txt to allow my raspberry to wake from a halt state (with GPIO3). But is there a way to differentiate a normal boot with power supply from a boot after a halt ? I want my raspberry to only work when booted with GPIO3.

I've seen that it is possible to run commands in the rc.locale file, could I put "sudo halt" in that file, of will that never allow me to boot ?

Thank you for your time

  • You should cite references for your claims (which IMHO are wrong). The Pi3 + Pi4 have a number of major differences. Nothing you can do in config.txt influences GPIO3 reboot (which is built into firmware) although there are (unusual) settings which prevent it from working. GPIO3 DOES NOT cause boot it only enables boot if shutdown which can be disabled on Pi4.
    – Milliways
    Jun 2 at 9:41
  • You are right, I sould have said that they seem to behave the same only for what I already Implemented but I don't know if they do for what I am trying to achieve. And you are also right for GPIO3, I am not booting the PI but rebooting it (after a shutdown command)
    – camp
    Jun 2 at 9:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.