BeagleboneBlack not booting after power outage

Hi,
I have a remote( 200km away) beaglebone black ( strech 9.3 ) with a usb modem connected, powered by the 5V DC plug.
The systems run fine for several days, weeks, but a power outage force me to power cycle the power adapter.
Have found other posts about brown-out and other stuff that look similar to my problem.

Any advice to mitigate the on site power cycles by software? Any change in the config of the TPS ic? Linux Kernel?

Or the only reliable solution is extra hardware?
Have seen that someone suggest using a another mcu like a watchdog that move the PWR_BUT or SYS_RESET signals when inactivity is detected by the watchdog mcu. Is this approach “bullet-proof” or maybe some situation would only make the beaglebone boot after a full power cycle, disconnecting and connecting the 5V dc power .

Thanks in advance.
Pablo

On Wed, 25 Jul 2018 09:12:09 -0700 (PDT), Pablo Rodriguez
<pabloar1ega@gmail.com> declaimed the
following:

Hi,
I have a remote( 200km away) beaglebone black ( strech 9.3 ) with a usb
modem connected, powered by the 5V DC plug.
The systems run fine for several days, weeks, but a power outage force me
to power cycle the power adapter.
Have found other posts about brown-out and other stuff that look similar to
my problem.

  Addressing the subject line itself: ANY UNEXPECTED loss of power can
result in a corrupted file system. (I suppose it might be possible to
configure a device to only log to RAM/tmpfs and set the eMMC/SD card to be
read-only -- but that is going to be rather restrictive on what one can do
with it).

Any advice to mitigate the on site power cycles by software? Any change in
the config of the TPS ic? Linux Kernel?

Or the only reliable solution is extra hardware?

  Well, the first stage is to have something that can support power on
the BBB AND trigger a safe shutdown when power drops. That could mean
needing something like a 2-5 minute power buffer (maybe a super-cap?), but
also something to a GPIO pin interrupt to do the shutdown, and a disconnect
from the power source (latching relay?).

  Restarting when power comes back is another matter. That might be small
controller (PIC, or AVR/Arduino compatible) which is on the power source
side. It would reboot when the power is restored, and (to handle erratic
power source) perhaps run a timer for 2-5 minutes before commanding a
reconnect to the BBB (should probably be longer than the shutdown timing,
so you don't restore power until the BBB has fully shut-down). The
controller will not be on the UPS.

  Activity something like:

Power source drops (controller immediately stops), relay opens (cutting
connection to super-cap, and grounding GPIO to trigger BBB shutdown).

Power source come back up (controller boots), after controller timer
expires controller closes the relay (latching so controller doesn't have to
keep driving it) which provides power to super-cap and BBB, might need
controller to trigger reset or power button [somehow] on BBB especially if
the super-cap is still holding power on the BBB.

Or put a Power Cape on it. It’s designed to address all of those issues.

We’re out of stock right now but more are coming…

-Ron

I would buy a cheap UPS, if it is 12v, serialize 3*3.7v lithium battery.