On 08/22/2017 08:21 PM, David Ryskalczyk via vcf-midatlantic wrote:
I'll make an EE guess here: When you unplug the DC side, the Pi is shut off relatively quickly so there is little room for bad writes to corrupt the card, or for the voltage to drop low enough for the CPU to execute random instructions but still high enough to run at all. When you unplug the AC side of the power adapter, the capacitance in the power supply causes a much slower drop-off which causes the CPU to execute random instructions, likely writing to the card.
I think the USB PS tend to be more inductive than capacitive.
My suggestions? Make the Linux setup as read-only as possible as that will minimize possibility of corruption, and of course, if the image contents are static, keep a copy of the image handy on a nearby PC. Constant writing will quickly kill the SD card anyway.
This will help, you can setup a share using either NFS or Samba (CIFS). You can then write to that. But there are some things that need to write to files. The OS part of Linux generally doesn't need this but the applications (rsyslog, email, etc) does and they also tend to try and write out logs. That's a distribution issue. Pulling power from the DC end (that part that plugs into the Pi directly) is probably not a bad idea. But not until you've run the shutdown cmd. So to properly shutdown the Pi, run the shutdown command or use Dave's suggestion of the pushbutton solution. I like that one but protect the button and don't make it a big red button that say don't push. People will want to push it. I'm sure there are more than a few of us with stories of idiots pushing the emergency power off on mainframes. -- Linux Home Automation Neil Cherry ncherry@linuxha.com http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies