Firmware upgrade failing on Ubiquiti EdgeRouter X

Having the same issue as discussed here: Firmware upgrade via SSH failing
but not having the same results.
I'm fed up with Ubiquiti not updating its software for the EdgeRouterX boxes.

I got to this step
sysupgrade -n /tmp/openwrt-21.02.3-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin

and received this in reply

Device ubnt-erx not supported by this image
Supported devices: ubnt,edgerouter-x ubnt-erx ubiquiti,edgerouterx - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA
Image check failed.

The device page said to use -force, which didn't work. The above post said to use -F, so I tried this:
sysupgrade -F -n /tmp/openwrt-21.02.3-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin

it returned this:

Image metadata not found
Image check failed but --force given - will update anyway!
Commencing upgrade. Closing all shell sessions.
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

After this I have lost all ability to connect to this router.
rebooting raspberry pi didn't help.
rebooting router didn't help.
changing pi from static 192.168.1.15 to use dhcp did nothing (reverted)
when I ping 192.168.1.1 and cable connected to eth1, i receive "connect: Network is unreachable".

What I do wrong?
How do I get back on track (next steps)?
Thanks

That's the expected output. Did you give it time to do the upgrade? If you pulled power too soon thinking it's not working it could have bricked it.

If it did upgrade correctly you should have been able to access 12.168.1.1

You can also try a default with the reset button.

runtime reset (starting with power on) does nothing. I don't get eth4 flashing LED after 10 seconds, held the reset button for 20 seconds, and nothing flashes

power-on reset: I do get the port LEDs light up in a sequential fashion, The eth4 LED then started flashing and I then released the reset button.

I waited a minute and then plugged in a cable to eth1. I could ping myself at 192.168.1.15, but 192.168.1.1 returns "connect: Network is unreachable". This was waiting after a minute after plugging in a cable to eth1.

I then unplugged the cable and then plugged it into eth0. I waited a minute. I could also ping myself 192.168.1.15, but could not ping 192.168.1.1; it returned the same message about network is unreachable.

ideas?

one more comment: when I did the "sysupgrade -F -n..." (24 hours ago) I did wait for the system to reboot. I couldn't tell you how long, whether 5 seconds or 50 seconds or 5 minutes or 50 minutes. I can confidently say it wasn't just 5 seconds, nor do I have the patience for 50 minutes. However, it didn't cross my mind to time the reboot after the sysupgrade, so I don't know if I waited 50 seconds. I doubted I waited 5 minutes. I just don't know.

Strongly suggest you recover via serial terminal. I had a similar experience migrating an ER-X to OpenWRT about a year ago. Ultimately I realized that the two-step migration method (older partial OpenWRT install followed by in-place sysupgrade to current) was the way to go, but you'll need to unbrick via serial recovery and factory Ubiquiti image.

was reading instructions on serial, and found this page: https://help.ui.com/hc/en-us/articles/360019289113 which contains a reference Ubiquiti Device Discovery Tool. Installed it on Chromium and it found a device at 192.128.28.1. Go figure! Off to reset my static ip to 192.128.28.15 and to see what happens.

Are you sure? This is not an RFC1918 address, and therefore is unlikely to be your ER-X. I could be wrong, though.

typo on my part, the IP address was 192.168.28.1, which is my production router with stock software. In my rush, I had forgotten to turn off the wifi and the discovery tool was finding that. What I had been doing was turning on the wifi to do research and then turning off the wifi to do testing/activity. The pi was directly connected via ethernet cable to either eth0 or eth1 of the edge router x.

I know the ethernet cable is good because wifi is off and the ethernet cable is now connected to a netgear unmanaged switch, and I'm typing this on the internet.

However :pensive: I now seem to have a bricked Ubiquiti EdgeRouterX, the second of two. I haven't touched the first (production) one.

I can get this second router into tftp mode. I held the reset button on for 45 seconds while the power was on and nothing happened. I disconnected the power, depressed the reset button, inserted the power cable, continuing to hold the reset button for 45 seconds, and after about a minute it went into tftp server mode. The power LED stays on continuously, but the eth0/2/4 and eth1/3 LEDs alternate flashing, three LEDs then two, then 3, then 2. It's not the sequential 0/1/2/3/4 pattern.

So installed tftp on my pi, turned off the wifi, connected to eth0 on the router and this is what I get.

pi@raspberrypi:~/Downloads/Ubiquiti $ tftp
tftp> connect 192.168.1.1
tftp> binary
tftp> put ER-e50.recovery.v2.0.6.5208541.190708.0508.16de5fdde.img.signed
tftp: sendto: Network is unreachable
tftp> 

When I connect to eth1 on the router, the pi shows "link is down" when I hover over the network symbol in the task bar.
When the pi is connected to ui.eth0 then pi shows "link is up, configuring" but it never resolves to "eth0: configured 192.168.2.31/24". I'm using DHCP addresses when connecting to the production network, but I am using static IP addresses when the pi is connected to the isolated router. (ie the router and the pi are the only devices on this isolated network). I am also rebooting the laptop anytime I change the IP address on the pi or change port on the router.

Note the UI discovery tool does not find the router when the pi and the router are on an isolated network.

"rebooting the laptop" should read "rebooting the pi".

Did you set the Pi to a static IP address in the 192.168.1.0/24 network? You must do that for this to work...

Also, follow the directions in the link you posted earlier... the ER-X will have a fallback address of 192.168.1.20 -- so the TFTP connection should be made to that, not 192.168.1.1.

The router will be 192.168.1.20 in TFTP recovery mode-- though some late models use a random (but consistent per unit) IP in 192.168.1.0. It is never 192.168.1.1.

During flashing / recovery operations connect the router only to one PC do not connect into a network. It's also best to shut down the wifi in the PC so that it is completely isolated.

The lights will blink in pairs as you describe to indicate that TFTP recovery is active. If it doesn't do that from powering on with the reset button held, you have an old bootloader which doesn't support the recovery feature.

Also the TFTP server will stop responding after about 30 seconds even though the lights continue to blink.

This is the process if you don't have serial. If you have serial the problem is often immediately apparent.

1 Like

ER-X doesn't have serial or console port. It just has eth0/1/2/3/4.

Am making sure since y'day that wifi is off when doing my tests.

I have an isolated network, just the pi connected to the router that I'm trying to flash.

Just in case the router was using 192.168.1.15 as its ip, I switched to 192.168.1.14.

This is my current results (with router in tftp mode eth0/2/4 alternating with eth1/3):

pi@raspberrypi:~/Downloads/Ubiquiti $ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::dea6:32ff:fec7:3d93  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:c7:3d:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 43  bytes 6089 (5.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:~/Downloads/Ubiquiti $ tftp
tftp> connect 192.168.1.20
tftp> binary
tftp> put ER-e50.recovery.v2.0.6.5208541.190708.0508.16de5fdde.img.signed
tftp: sendto: Network is unreachable
tftp> quit
pi@raspberrypi:~/Downloads/Ubiquiti $ 

The only thing I haven't tried is to tftp within 30 seconds of router going into tftp mode.

is there anything in here that needs changing?
image

It does have serial. You need to open the case.

https://community.ui.com/questions/How-to-connect-ER-X-serial-console/75bbbd47-7520-49ba-82c4-2c35ff663497

1 Like

ok, really tried this time to tftp within the 30 seconds

typed in tftp and pressed enter
typed in connect 192.168.1.20 but did not press enter
did a power on reset of ER-X and waited for the alternating eth0/2/4 and eth1/3,
when the LEDs started flashing that pattern then I pressed the enter key for my connect 192.168.1.20 command
quickly typed in binary and pressed enter
quickly typed in put, a space, and then pasted in the file name ending with .img.signed.
This is the results:

pi@raspberrypi:~/Downloads/Ubiquiti $ tftp
tftp> connect 192.168.1.20
tftp> binary
tftp> put ER-e50.recovery.v2.0.6.5208541.190708.0508.16de5fdde.img.signed
tftp: sendto: Network is unreachable
tftp> quit
pi@raspberrypi:~/Downloads/Ubiquiti $ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::dea6:32ff:fec7:3d93  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:c7:3d:93  txqueuelen 1000  (Ethernet)
        RX packets 5  bytes 1715 (1.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 67  bytes 11171 (10.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pi@raspberrypi:~/Downloads/Ubiquiti $ 

I appreciate everyone's help. I guess my next step is to try the ubiquiti forums. I'm not hopeful

thanks, learned something new

What port are you connecting to the pi? It must be eth0.

I'm using the eth0 port on both the pi and ER-X

Open the er-x and connect by serial so you can see what is happening.

will have to order the usb2serial converter. Haven't ever had to use one of those b4.