Update on 2022/05/27: Uploaded and included link to the ‘usg-4-2-0-shipped.img ‘ on the Archive.org.
A few weeks back we had a power outage at our home. Electricity was restored a few hours later and we all thought nothing of it. Everything turned back on and my home network seemed to function correctly.
About a week later, I logged in to my Ubiquiti Network Manager Controller and saw that my Ubiquiti UniFi Security Gateway (USG) was no longer sending over data to the controller software. I still thought little of this issue, since the USG was still routing and blocking unsolicited traffic.
The following weekend I decided I wanted to restore full USG functionality in the Network Manager Controller software, so I decided to simply reboot the USG. This, unknowingly, was my first mistake. After turning the USG back on, I found that the Network Manager Controller software would not hand out new IP addresses from the DHCP scope. I could only attach to the network with a physical connection and a static IP address self-assigned on the same subnet as the USG. I tried to reboot the device several times, but it was all in vain. I realized the device had a deeper issue.
I performed a factory reset on the USG a few times and the lights indicated that the resets were successful, but my connectivity issues on the LAN were not resolved.
At this point, I began researching online on how to reflash the firmware on the USG device. After putting a process together from several articles, I was able to find a viable solution. I will document the procedure below for future reference.
The first step, which led to several minutes of initial frustration, was figuring out how to get into the device. At first I thought it might pry apart, but I quickly figured out this was not the case.
- Remove the rubber pads from the bottom of the USG device, revealing four screws. Remove all four screws.
- After removing all four screws, the top piece of the unit will lift off, revealing the main board of the USG device.
Note: I had already removed the internal USB drive at the time I took this picture. Pretend it is there.
- Remove the USB drive, containing the potentially corrupted firmware.
- Plug the USB drive into a computer and verify it is actually functional. Sometimes USB drives die. If the drive is at least recognized by the computer, proceed to step 5.
- Download the factory-shipped image from Ubiquiti here:
Internet Archive: https://archive.org/details/usg-4-2-0-shipped.img
- Use your favorite image flashing utility to write the downloaded firmware onto the USB drive.
Note: I like to use balenaEtcher on macOS ($ brew cask install balenaetcher), but Rufus is a good alternative on Windows (> choco install rufus).
Attention: The firmware writing procedure can take 10+ minutes, so do not get frustrated and remove the drive mid-write.
- Once the factory image is flashed onto the USB drive and the image is verified, plug the USB drive back into the USG device. Turn on the device.
Note: The initial boot process can taken several minutes, but the light in the middle of the board will come on once it is running.
- Reassemble the USG (and do not forget to reapply the sticky pads).
Note: Do not reattach it to the network yet.
- Login to the Ubiquiti Network Manager Controller and forget the old USG.
- Plug the USG back into the network and more than likely the Ubiquiti Network Manager Controller will automatically adopt it and reconfigure it.
Note: Make sure to apply all applicable updates to the USG, because the factory image is now out-of-date.
Once all of these steps are complete, you should be on your way to full usage of your USG product once more. I am happy they decided to make their boot medium removable and easily re-writable. If you run into any issues, feel free to drop a line in the comments below and I will see if I can assist.