You’re streaming a movie and your Internet dies. You dink around until you’ve confirm that it’s not the fiber modem; it’s the trusty UniFi USG: there are some lights flashing around the network ports but no square blue light on top, and if you cycle power, no flashing white light on top.
TL;DR
First try replacing the power brick (12 volts, 1 amp, negative pole on the outside of the barrel connector). Next, try replacing the internal USB drive, flashed with stock firmware.
Backwards
I did that backwards. I might have avoided the USB hassle if I’d first connected a serial cable to the console (Baud rate 115200, 8 data bits, 1 stop bit, no parity, no flow control) (reference). When the power supply is good, you’ll probably see some attempts at booting in the serial console. It was after replacing the USB, when it still wouldn’t boot, that I checked the serial console and saw: nothing. Once I swapped in a good power supply, the console showed it could boot from the new, unconfigured USB or from the old one, still linked to my UniFi Network application.
Flash and Replace USB
Originally based on this UniFi forum thread, with this old firmware image download from UniFi: https://dl.ubnt-ut.com/cmb/USG-4_2_0-shipped.img.bz2. Some nice photos and tips in this thread, which loads this imgur thread, which refers to duct.me/etcher for flashing the USB drive, which is now apparently balenaEtcher, which worked:
It was kind of fun to open the USG and find a little flash drive in there. I used an old 16GB Kingston Data Traveler SE9 G2 to replace it, which is nice because you don’t have to shuck it to get it into the slot on the motherboard:
Replace the Power Supply
However as mentioned, it turns out that the USB drive wasn’t the problem. The power supply was failing. Here’s a whole video about that possibility. I still had a faint, flashing green light on the console port, but it wouldn’t boot. This is the failing power supply:
After replacing that with another power brick that I had on hand (from an old Western Digital Data Elements hard drive), the USG booted up properly with either USB. Here’s the beginning and end of the boot process:
With the old USB installed and the new power supply, the USG booted normally and started managing traffic again.