Edgerouter X Install Guide

EdgeRouter X to OpenWRT Basic Guide

Main EdgeRouter OpenWrt Page

Required Files/Applications:

Optional: Put all the files and applications into a single working folder (c:\openwrt)

The latest ER v2 stock firmware (v2.0.9 hotfix7)

The latest Putty pack of files (which includes SSH and SCP)

The latest initramfs-factory.tar file from GitHub (v22.03 – look for the download “raw” file link)

The latest OpenWRT kernel image (v23.05.3)

Optional: rename the kernel .bin file to something shorter (openwrt.bin)

Process:

  1. Set your network adapter to a static IP of 192.168.1.11 (anything other than .1) and the subnet mask of 255.255.255.0. Gateway IP is optional.

  2. Make sure the ER-X is running the latest stock firmware and has been reset to factory defaults.
    (Plug into eth0 and connect to https:/192.168.1.1 (default: ubnt/ubnt))

Note: If ER-X is running firmware < 10.1.6, see additional steps at the end of this guide.

  1. Login via the GUI and upload/install the initramfs .tar file. Reboot when prompted.
    (After reboot, move your cable from eth0 to eth1)

  2. Use PuttySSH and connect to root@192.168.1.1
    (There is no local password set - set to one of your choosing)

  3. Use SCP to copy the kernel .bin file to the /tmp directory on the ERX:
    pscp -scp <path/to/openwrt.bin file> root@192.168.1.1:/tmp
    Example: pscp –scp c:\openwrt\openwrt.bin root@192.168.1.1:/tmp

Note: If you get the FATAL ERROR: Received unexpected end-of-file from server message - make sure you added the "-scp" before the path to force it into scp mode.

  1. Use PuttySSH to connect back to the router and run the upgrade command:
    sysupgrade -n /tmp/openwrt.bin

Note: The connection will automatically close, but it takes a bit for the ER-X to complete this process so wait about 5 minutes (even after the eth1 light illuminates) before attempting the next step.

  1. Log back in via GUI to https://192.168.1.1 and configure OpenWrt
    Don't forget to reset your network adapter to DCHP

Additional Steps:
On older v1.x.x firmware, you will need to update the bootloader before any OpenWrt images are installed. Take extra caution as this section is where most ER-Xs become paperweights. Also, It is very strongly recommended that after each UI firmware install you reboot TWICE before doing anything else.

2a. Start with downloading and installing v1.10.11 via the GUI.

2b. Login, confirm the ER-X is at v1.10.11, and reboot the device.

2c. After it comes back up, SSH to the ER-X, and follow the prompts to update the boot-loader (reboot prompt).

2d. After that reboot, SSH again to the ER-X, delete the older firmware so that only v1.10.11 is listed, and reboot again.
Show system image <---(this shows the system images on the system)
Delete system image <---(this deletes the old unused one)

2e. Login to the GUI and update the firmware to the latest v2.x (All ER-X Downloads).

2f. When that's done - log back into the GUI to confirm v2x has been installed, reboot the ER-X one more time, and then continue above with Step 3.

1 Like

Found one of these cheap on ebay to make a managed 5 port switch with. I flashed a couple of these years ago to OpenWrt from the 19.07 initramfs image (and then a 19.07 sysupgrade image).

However, following your guide and using the 22.03 initramfs image, I have one bricking after Step 6: installing the 23.05.3 kernel image. I also tried a 23.05.3 sysupgrade image instead, which also failed.

At least recovery with tftp is relatively easy with the version 003 bootloader.

Did you by chance use an earlier initramfs version than 22.03, or earlier kernel image or sysupgrade image than 23.05.3 when you were successful?

nothing stops you from initially flashing an older release, then upgrade all the way to 23.05.

Nothing does. Sound advice. I'll go that route next.

Nonetheless, if my original question identifies some incompatibilities with the current versions to be mindful of, it may save someone else following these steps a tftp recovery, or worse if they didn't install the current Ubiquiti boot loader version with tftp recovery first.

2 Likes

Thanks for the feedback. I had 4 of them when I wrote this up - and bricked 1 - mainly because it was running an older boot loader and didn't do the proper reboots and steps to make sure it was running v1.10.11 cleanly before starting the process. No issues since.

But to answer your question - I used no earlier initramfs versions - just went from v1.10.11 to v2.0.9hf7, then to 23.05.3 using the 22.03 initramfs image in between.

1 Like

Huh. Thanks for confirming. Mine also came with 1.10.11 installed, and I upgraded to 2.09hf7 and confirmed upgraded boot loader (version 003 was already installed) before starting.

I must be fat fingering something - wouldn't be the first time.

Haven't taken the time to do another tftp recover yet, but when I do, I'll see if the third time is the charm and if that still doesn't work, I'll start off with 19.07 and see how that goes. I'll report how it goes either way.

1 Like

Let me know how that goes - I have a few more in the pile (they all have the older boot loader) - and I can just as easily do another one if you discover a step that needs clarification or correction.

Success.

FWIW, I went straight from the Ubiquiti 2.0.6 recovery image, rebooted it after recovery, then to the 22.03 initramfs image, and finally to the 22.03 sysupgrade.

What changed? This time I followed the oft sage advice to RTFM. Especially the 5 minutes in this part of Step 6.:

I'd forgotten how long it takes an ER-X to sysupgrade -F -n and bring up its interfaces. The light turns back on at eth1, but nobody is home for many minutes. Previously I had interpreted light back on after a minute, but no response, as something gone wrong and went straight to tftp recovery. This time the solution was to get a drink, come back, reconnect to eth1 five minutes later and try to ssh into it one more time :wink: Eureka!

Thank you for posting your guide, and sorry for my false alarm!

1 Like

Whew! Good to know and glad you got it worked out. I'll see about expanding that note or at least adding some bold to the 5 minutes. Thanks for the report. Have a great weekend!

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