# Restaurar firmware USG Security Gateway

La memoria del USG es un USB interno, abriremos el USG para formatear el USB y cargarle de nuevo el firmware, son 4 tornillos de tipo estrella bajo las almoadillas de la base.

![](/files/voeTId07ZJfmBNHQcqaI)

Una vez abierto, veremos la memoria USB.

![](/files/qE0iRuSBLN9wW6jPqIV0)

![](/files/y2aJJpjCuQYrCLsqCWNh)

Es un pendrive de 4Gb de almacenamiento, lo conectamos al ordenador y lo formateamos en fat32, asi eliminamos todas las particiones.

Nos descargamos la imagen base desde Ubiquiti para poder restaurar el firmware, es la v4.2

```
https://dl.ubnt-ut.com/cmb/USG-4_2_0-shipped.img.bz2
```

[Link alternativo](https://mega.nz/file/ccRWTZ5T#1eUI_fasXVwfyFlWv2MvM4wlJgQLAUimOygTcrBjmok)

La descomprimes, y tienes un fichero .img, el MD5 del .img es

```
9c09035c3f2bce4bbc8cb1f71c5f04b2
```

Ahora solo queda cargar la imagen en el USB, se puede hacer con varias aplicaciones, personalmente uso la de RaspberryPi Imager, <https://www.raspberrypi.com/software/>.

Abrimos la App y seleccionamos "Choose OS", nos aparecera esta ventana, y al final elegimos "Use custom", localizamos el fichero .img y elegimos el dispositivo, tardara unos minutos...

![](/files/vWsAmol0R0NrNfMZej6X)

![](/files/1rjsnUuQJHXXFGEkruHF)

Mientras se crea el USB con el .img, nos vamos a nuestro UniFi controller y eliminamos el USG que nos aparece.

![](/files/QUheSFf5fdspNGEvpAk4)

Cuando termine de crearse la imagen, volvemos a colocar el USB en el USG, lo cerramos, y conectamos los cables, esperamos a que inicie, luego abirmos nuestro UniFi Controller y nos pedira adoptarlo y actualizar, esperamos a que termine... sera un proceso lento, muy lento...\
\
End!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.azagra.dev/unifi/restaurar-firmware-usg-security-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
