Failing to install OpenWrt 19.07.2 on EdgeRouter X

Hi there.

Before posting this message, be sure I have read and tried all what was found on OpenWRT forums.

I can easily install OpenWRT 18.06 from EdgeOS with "add system image" from a tar file, as shown in many messages, but once the router rebooted under OpenWRT 18.06 I definitely can't sysupgrade to 19.07.2.

I have tried all what was adviced, even downgrading EdgeOS, before installing OpenWRT 18.06, and later sysupgrade to 19.07.2, nothing works.

When doing so, the rooter keeps rebooting.

Any idea why it doesn't work ? Could we have available a working OpenWRT 19.07.2 initram tar file, as I couldn't generate it myself, after numerous tries.

Any configuration within "manuconfig" to enable the generation of such tar file ?

I have read that it was failing because the kernel was too big ?
What should be removed from the kernel then ?
It would be very nice to have one available on OpenWRT EdgeRouter X device page, so that we can later on sysupgrade with the full OpenWRT 19.07.2 bin files , and those I found with luci already installed ?

Kind regards for your help, because currently, I am definitely blocked with version 18.06.

stman

@stman@mastodon.social

try with this imae my friend, it worked for me on my Edgerouter X

Thank four your reply.

Is it a 18.06 image, or is it a 19.07.2 image ?

maybe even 17.xx...
this is for the initial flash, THEN you upgrade to 19.07

Restarting from scratch from EdgeOS V2, I could SCP it to the router, install it with "add system image" command and reboot fine the router with it (It's an OpenWRT 18.06 by the way), but later when SCP the "19.07.2 sysupgrade binary" (not the initram one), the router crashes again after rebooting.

Do you mean that I should SCP and install with sysupgrade command the "19.07.2 initram binary" instead ?

Or is it because I should do all this the from downgraded version of EdgeOS, the 1.1 ?

I definitely can't get it running, there must be a trick I am definitely not getting.

I installed it on mine with the old 1.10 firmware...

and I followed this post

I installed it on mine with the old 1.10 firmware...

and I followed this post

but I guess there shouldn't be a reason why it shouldn't work on the newer firmware...
and the newer firmwares have a emergency bootloader, that's a HUGE plus

Check if there are bad blocks in either of your kernel partitions, if one is bad you may need to force the flash into the good partition. Though I think this has eventually been fixed in OpenWrt.

I did eventually put the new bootloader in mine. I don't think this changed much of anything with regards to OpenWrt though. The recovery feature will only flash Ubiquiti signed firmware.

By forcing, you mean using the "Force" option of "add system image" ?
Is there a risk to definitely brick it with this ?

I still can get it working, I've tried everything that was told in those forums.
I can't get the 19.07.2 running, the rooter keeps rebooting.

I did it even with downgrading EdgeOS to 1.1 before proceeding.
Same results as with 2.x EdgeOS firmware.

I can just install a 18.06 version, but when sysupgrading with a openWRT official 19.06.2 sysupgrade bin file, it ends in a reboot loop.

I'd like to understand what's wrong.

I will try to recompil 19.07 according to the post that worked for SaberJ2X to see if the strategy in this post actually works (EdgeOS->custom version of OpenWRT 19.07-> Stock OpenWRK 19.07.2) and will let you know.

It did not work either.

None of the many methods worked, I did them all, exactly like they were adviced.

There is definitely an issue with this new built.

Giving a new try recompiling with a few kernel modules less, to save space, to see if it changes anything.

YES ! I could recompile the 19.07.2 and generate the Tar file for initram for factory init !

Testing it, and I will let you know if the trick works.

Yes, the router booted in this new self compiled 19.07.2 initram.tar , but I removed too many things to be able to log on the router, still, it is working.

Giving it another try removing less things.
This mean the hacker who said it was a matter of size was right.

The Tar file is only generated under a size he gave (As far as I can remember, 3,1 Mb max, but he gave the exact size, will try to look for it again).
Will let you know if I could ssh on this new build I am compiling.

I could SSH but could not sysupgrade to OpenWRT stock versions yet.

Improving my "short recipe" (Menuconfig options) so that it can still generate a tar file and later sysupgrade to stock versions.

Done, It works perfectly, from my custom "small receipt" compiled OpenWRT 19.07 initram Tar factory image, I could directly "add system image" it from EdgeOS, then rebooted under this new image and sysupgrade it with the official "stock" version of OpenWRT 19.07.2.

And it now works perfectly under the 19.07.2 :slight_smile:

I am going tu publish a new post with the detailed whole procedure so that other can reproduce it easily.

Kind regards to all.

Stman.
Crypto-Anarchist Federation

2 Likes

Here is the link to my repository where you can find my custom made "short receipt" "OpenWRT 19.07 factory tar file" called "openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar"

You can flash it directly over any EdgeOS, and then replacing it by sysupgrading the router again with a usual "OpenWRT official stock image", like the lastest 19.07.2 sysupgrade stock bin file found here :

http://downloads.openwrt.org/releases/19.07.2/targets/ramips/mt7621/openwrt-19.07.2-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin

Kind regards to all.

Stman.
Crypto-Anarchist Federation
@stman@mastodon.social

1 Like

Hello again.

Here is the detailed procedure to compile an equivalent operational "short receipt" Tar factory image as I have been doing in my previous post.

These things where done under Xubuntu 18.04.2 :

Open a terminal.

Then type the following commands (One of them related to feeds install is doubled because some errors happen on the first launch):

sudo apt-get update
sudo apt-get install subversion g++ zlib1g-dev build-essential git python python3 python3-distutils libncurses5-dev gawk gettext unzip file libssl-dev wget libelf-dev ecj fastjar java-propose-classpath libldap2-dev libcap-dev libidn2-dev liblzma-dev libjansson-dev libpam-dev
git clone https://www.github.com/openwrt/openwrt -b openwrt-19.07
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install -a
make menuconfig

Now, from the menuconfig main screen,

  • Set Target System to : MediaTek Ralink MIPS
  • Set Subtarget to : MT7621 based board
  • Set Target Profile to : Ubiquiti EdgeRouter X

Then select Save and accept to save the configuration under the proposed default filename .config and then select Exit until you quit the menuconfig utility and are back to the terminal bash prompt.

From here, enter the following bash commands :

make defconfig
make menuconfig

Go into Global Build Options submenu, and then :

  • Set Strip unnecessary export from the kernel image to *
  • Set Strip unnecessary functions from libraries to *

From this screen, enter the submenu Kernel build options and then :

  • Unset Compile the kernel with debug filesystem enabled
  • Unset Compile the kernel with symbol table information
  • Unset Compile the kernel with debug information

Then select Exit until you back reach the menuconfig main screen, then select Save , it will propose you to save the configuration under the default filename .config , accept it, and then select Exit until you are back to the terminal bash prompt.

Back to the terminal bash prompt, enter the following commands :

make download
make -jXXX

For the last command above please replace XXX by the number of processor cores your computer has. In my case, I used the command make -j8 because I have an 8 cores computer. If you ignore how many cores your microprocessor has, please just type make alone.

The compilation should take about 10 minutes with 8 cores.
Once it is finished, enter the following bash commands :

cd ./bin/targets/ramips/mt7621
ls -al

And you should see the following files :

user@PC:~/openwrt/bin/targets/ramips/mt7621$ ls -al
total 8684
drwxr-xr-x 3 user user    4096 mai   18 14:01 .
drwxr-xr-x 3 user user    4096 mai   18 13:55 ..
-rw-r--r-- 1 user user     335 mai   18 13:55 config.buildinfo
-rw-r--r-- 1 user user     263 mai   18 13:55 feeds.buildinfo
-rw-r--r-- 1 user user    1880 mai   18 14:01 openwrt-ramips-mt7621-device-ubnt-erx.manifest
-rw-r--r-- 1 user user 2938880 mai   18 14:01 openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar
-rw-r--r-- 1 user user 2923299 mai   18 14:01 openwrt-ramips-mt7621-ubnt-erx-initramfs-kernel.bin
-rw-r--r-- 1 user user 2990868 mai   18 14:01 openwrt-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
drwxr-xr-x 2 user user    4096 mai   18 14:01 packages
-rw-r--r-- 1 user user     720 mai   18 14:01 sha256sums
-rw-r--r-- 1 user user      18 mai   18 13:55 version.buildinfo

As you can see, there is an openwrt-ramips-mt7621-ubnt-erx-initramfs-factory.tar that was generated. Use this file to update your router from EdgeOS with usual procedures.

Then, update again the router under this temporary OpenWRT 19.07 built with the official stock sysupgrade 19.07.2 bin file from the OpenWRT website, and you're done.

1 Like

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