Installing OpenWrt on Ubiquiti ER-X

I started the installation of OpenWRT on a brand new ubiquiti ER-X router followint this tuto:

I copleted it satisfary.

Then, in order to continue I followed this tutorial from " Get OpenWRT installed on the EdgeRouter X."

I completed it satisfactory.

Then in order to upgrade Open WRT I downloaded it from open WRT webpage and installed using the command "sysupgrade /tmp/openwrt-19.07.6-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin

it shows:

Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

as in the tuto, but then the router has never started. It flashes leds eth0 and then a quick flash in all leds, at the same time.

I can not access it via ssh and the ethernet simbol in Ubunto appears desappears each 5 seconds.

What can I do??

Edit: I forgot to check if the router was in rev.2 instead of rev.1

anyone can help?

Given that you've used (a probably outdated) third party guide instead of the OpenWrt instructions, you might not be aware of this page: https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka, which has information on TFTP+serial install/recovery (probably your best bet now) and debricking.

1 Like

Sorry I explained me wrong.

I started with official recommended tuto
User Experience

There is an excellent write-up on user experience with installation at Ubiquiti EdgeRouter X, Loading OpenWrt and performance numbers

But, due to my small knowledge, I searched for and easy tutorial for first steps (complile the .tar file).

Then, I continue with recommended guide. It was in the last step when It crashed.

Now, as you said, I am following the bricked tuto but have some problem again.

I never set up a TFTP server so I do not know how to create it.

Does the PC should be connected directly to the bricked router?
How can I set the IP of my PC? I whatched some videos and normaly they can setup an IP, because the router they are connecting to allows it. In my case, I tried to change my IP (IP + mask) but, the ethertnet menu does not recognice any device and windows does not allow me to introduce a manual IP and a Mask.

According to the openwrt page,

Bootloader has 172.16.3.211 and is waiting for a tftp-server from 172.16.3.210 wich should provide a matching openwrt-initramfs with filename vme50 and device should be connected via lan port 0.

I understand that I have to set up my server in the IP 172.16.3.210.
My question is, how can I do that? Since I am not connected to any net (only a cable from my PC to the bricked router), and I can not modify my ethertnet configuration, how can I stablish my IP as 172.16.3.210?

Your ethernet network adapter will function regardless, because you're not going to wait for DHCP or APIPA to set an address, you'll set it manually. When your device boots, the hardware switch will be active and a bootloader will have the ability to query a TFTP server that's addressable on a specific port.

If you disconnect the cable from your network card, the device should still be visible in Windows and you should still have full ability to modify the address. If not, you'll need to figure out why. Note: this part is not possible via a Wireless connection. Make sure the network adapter isn't disabled by mistake if you can't see it.
Screenshot from 2021-01-22 12-17-38

According to the OpenWRT wiki, you connect your PC to the device on eth0 (the WAN port). I also see someone wrote that it's actually the LAN0 port. You then set your IP address manually:

So IP 172.16.3.210, mask 255.255.240.0 (try 255.255.255.0 if that doesn't work). Leave the gateway and DNS address empty, it's not necessary.

You then setup a TFTP server to serve the specific firmware image you need:

Note the wiki has conflicting information, one part stating you have to manually select the TFTP option via a serial connection, the other has the bootloader automatically calling a TFTP server on a preset address. One says connect to the WAN port, the other to the first LAN port. Who knows at this point. One I'm assuming is for factory recovery, the other is recovery from a failed or misconfigured OpenWRT install.

My advice is to first figure out if the device automatically attempts to flash an image from TFTP on boot. Connect your PC to eth0 (WAN), open up Wireshark or a different traffic monitoring tool and see if there are any TFTP requests going through. If not, power the device down, connect to LAN1, power on and check for activity in your network traffic. You should see TFTP protocol chatter on the link during the first 5 seconds the router is powered on.

If that doesn't work, you'll have to connect via a serial connection to the device and possibly configure the bootloader it to request an image via TFTP.

2 Likes

Thank you very much for your answer.

I get to change my IP but the Serial scrren continous the same (connected to eth0):

If I change to eth1 at the time of Loading it does not show ART Reply.

What am I doing wrong? TFTP server is Solarwinds

Edit: As I wrote above, the router port eth0 enable and unable each 3-4 seconds. Could it be that this status do not allow the TFTP connex?
Could option 9 solve this?

The "eth0/PoE IN" port, the first one on the left, is to be used for all bootloader TFTP transfers. When OpenWrt starts running, it will configure that port on the WAN network, so you need to use one of the other four to log into OpenWrt, but this is only after OpenWrt has booted.

Disable any firewall on the PC, they are likely to silently prevent a TFTP server from working. Test your TFTP server install by running a TFTP client to TFTP a file to yourself. This does not prove the firewall is open though unless you run it on a separate PC.

Very often it helps to place an Ethernet switch between the router an the PC, so the PC port does not go down and reset its IP while the router is booting.

3 Likes

Got it!!

Thank you very much mk24 and ergamos!! both solve me the problems.

As you say, mk24, disabling Firewall permitted the conex.

Then, I Flashed the kernel file, with option 2.
After that I connected via ssh on eth1 and sysupgrade -n the sysupgrade file... and works.

Thank you very much again

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.