Step by step install openwrt onto edgerouter x?

Hello,

Can someone assist me in flashing OpenWrt onto my Edgerouter X? I've read the wiki and read through a lot of posts on the forum and I'm still confused. I'm a complete noob when it comes to these kind of things and reading bits and pieces from different posts on how to do it the correct way has left me confused.

I found a link to instructions here (http://www.makikiweb.com/ipv6/edgerouterx_openwrt.html), this sounds a lot easier than what I've been reading on this forum. Could someone confirm if i follow this exactly it will work? It mentions loading a file into the edgeos which no one has mentioned in any of the posts from what i've seen (they all start off with CLI commands). One thing I do recall is people having issues loading/upgrading to the 19.07 version but the link above makes it sound so easy?

Any help is appreciated. Thank you, JT

1st Update to the latest stock firmware 2.xx version to get the latest bootloader.

2nd Get a OpenWrt firmwire file to prepare the device to load OpenWrt firmware and flash it through the Web interface of stock firmware:
https://github.com/stman/OpenWRT-19.07.2-factory-tar-file-for-Ubiquiti-EdgeRouter-x/blob/master/openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar

3rd After reboot you can flash the latest official firmware:
http://downloads.openwrt.org/releases/19.07.4/targets/ramips/mt7621/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin

For reference:

  1. Operational OpenWrt 19.07.2 Factory Tar file for EdgeRouter X
  2. https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka
  3. https://github.com/stman/OpenWRT-19.07.2-factory-tar-file-for-Ubiquiti-EdgeRouter-x

If you do not trust a built image by a "3rd party". Then you could make the image mentioned under 2nd by your own also. The steps for this are described within the 3rd referenced link.

Thank you. I've read those pages and was confused, that's why I posted here hoping someone told me the exact steps/commands to type. I'm also guessing I do this via PuTTY in Windows?

This file is not found

For step 1 and 2 you do not need any command line tools like putty. Even for the 3rd step you would probably have a GUI available (don't know for sure). If not just start putty, connect to 192.168.1.1 on port 22 with username "root". Connect your router to internet before also and type in:

Strange. If I click on the link the file is getting loaded. Maybe you can try another browser or use a download manager? If you work with command line for step 3 you don't need to download the file before because "wget" is doing this.

Ok so i've loaded the initramfs file but the only way i can connect to the router via putty is if i give myself a 192.168.1.* IP address which disables my internet connection so i can't use the wget command. Any idea?

I also opened a command prompt and tried to follow what the other page mentioned but got this error

pscp openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin 'root@[192.168.1.1]/tmp/'
Local to local copy not supported

i've tried a few combinations of the above and get different errors

More than one remote source not supported
ssh_init: Network error: Cannot assign requested address
More than one remote source not supported

I've also tried connecting to my phone's hotspot while connected to the router via putty and the wget command returns the error

root@OpenWrt:/tmp# wget http://downloads.openwrt.org/releases/19.07.4/targets/ra
mips/mt7621/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
Downloading 'http://downloads.openwrt.org/releases/19.07.4/targets/ramips/mt7621/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin'
Failed to establish connection

I assume your ISP modem is connected to your PC and you are dailing in via PC.
Then it is necessary to download things before. There is no other way.

How far are you now? Did you install https://github.com/stman/OpenWRT-19.07.2-factory-tar-file-for-Ubiquiti-EdgeRouter-x/blob/master/openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar through EdgeOS GUI already?

If so connect your PC to eth1 on EdgeRouter give an static IP to your PC (like you did above already). Push the file (what you have downloaded before)
http://downloads.openwrt.org/releases/19.07.4/targets/ramips/mt7621/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin to your device with the command:*

scp /path/to/your/downloaded/file/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp

then ssh onto the device with putty. On command prompt enter:

  • cd /tmp
  • sysupgrade -n -v openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
  • wait for reboot

*If you are under Windows you don't have scp. So use putty/pscp:

Thank you. Yes I loaded the initramfs through edgeos but every pscp command I tried gave me an error. I then tried your scp command above and it seems to have transferred it even though i'm on windows.

I followed your sysupgrade command and some error popped up about the session being closed and the ssh session says Commencing upgrade. closing all shell sessions.
Is this correct? How long do I have to wait - should i power off the Edgerouter now and power it back? it's been like 2 minutes.

Yes this sounds correct.

Normally there is no need to power cycle the device. You should be able to access the device over your Webbrowser (http://192.168.1.1) after a while (2 minutes sounds good).

Don't forget to setup ethernet on your PC again if necessary.

Thanks for your patience, it seems to be working now :slight_smile: Looking back at everything I made it look much harder than what it was haha.

Yes, if you know how things are working its always easy. :smiley:

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