Resizing kernel images for Edgerouter X

Hi:
thanks again for your work. I hope they can fix kernel 6.6 issues all together with your patches. it took so long...

1 Like
make[3]: *** No rule to make target '/home/bruno/Documentos/openwrt-imagebuilder-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/ubnt_edgerouter-x-kernel.bin', needed by '/home/bruno/Documentos/openwrt-imagebuilder-ramips-mt7621.Linux-x86_64/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin'.  Stop.
make[2]: *** [Makefile:247: build_image] Error 2
make[1]: *** [Makefile:153: _call_image] Error 2
make: *** [Makefile:310: image] Erro 2

I tried, it gave me this error that I have no idea how to resolve, I don't know what it is.

https://openwrt.org/docs/guide-user/additional-software/imagebuilder

make image \
PROFILE=ubnt_edgerouter-x \
PACKAGES=luci luci-app-adblock luci-app-banip luci-app-upnp luci-app-bcp38 \
DISABLED_SERVICES=firewall

currently edgerouter x is excluded. you can not use imagebuilder.
and there are other issues.

1 Like

You need to build from source, after applying the PR.
https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

atleast this is affecting builds for now:

1 Like

Do you have the link to the 6.6 kernel image that failed on eth1?

I wanted to install it here to test and see if I have the same error.

I'm a bit confused about the status of the ER-X currently. Two days ago, the commit to resize the kernel partition was merged to MASTER and builds have been re-enabled.

However, it wasn't backported to the 24.10 branch... So we now have SNAPSHOT images from MASTER, but no 24.10-SNAPSHOT images.

It's confusing, because the wiki describes the upgrade process for 24.10 based images which thus don't exist while the linked migration scripts actually flash a MASTER based SNAPSHOT...

So the resize-commit should be backported to 24.10, and the scripts should reference that 24.10-SNAPSHOT image (or soon, a RC image) to get some testing done on the device. Correct?

I will update the scripts once there are 24.10 images actually available. However once migration is complete, and new partition layout in place, you should be able to sysupgrade between master and 24.10 snapsots, without any issues.

24.10 snapshots for Edgerouter X are now built. I suppose RC images will land in the next few days.
https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/ramips/mt7621/

My migration scripts are now updated to install the latest 24.10 snapshot.

1 Like

Having an EdgeRouter-X, this is why I love OpenWRT.

Thanks guys for all the work you put in.

1 Like

Have updated scripts to migrate to the 24.10.0-rc2 release

1 Like

I still think you should have been allowed to make the whole process automatic :innocent:

Awesome work! Really appreciate it.

Yeh, there were objections to modifying sysupgrade code in 23.05.

However hopefully, they will accept my PR to pre-install migration scripts in the next 23.05.x stable release

1 Like

Ooh! Great idea. Makes everyone happy. I can see the other side of the coin too, not wanting to modify upgrade scripts that are part of the previous version, this should solve things for everyone. Great work.

Hi:
I tried to follow the steps at https://github.com/darkxst/erx-migration but can not make it work.

  1. install 22.03 firmware via https://github.com/stman/OpenWRT-19.07.2-factory-tar-file-for-Ubiquiti-EdgeRouter-x

  2. copy both scripts to /tmp and run it. at first the script failed to download anything, then I found I need to add "--no-check-certificate" to wget command or the certificate check failed.

  3. run the script and er-x get bricked. the command result like below:

root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# ls -la
drwxrwxrwt 12 root root 340 Dec 13 09:20 .
drwxrwxrwt 16 root root 360 Jan 1 1970 ..
drwx------ 2 root root 80 Nov 13 2022 .uci
-rw-r--r-- 1 root root 4 Nov 13 2022 TZ
-rw-r--r-- 1 root root 419 Jan 1 1970 board.json
drwx------ 2 root root 60 Dec 13 09:20 dropbear-18b2c15e
drwxrwxrwt 2 root root 240 Nov 13 2022 lock
drwxr-xr-x 2 root root 80 Nov 13 2022 log
lrwxrwxrwx 1 root root 35 Nov 13 2022 resolv.conf -> /tmp/resolv.conf.d/resolv.conf.auto
drwxr-xr-x 2 root root 60 Nov 13 2022 resolv.conf.d
drwxr-xr-x 3 root root 120 Nov 13 2022 run
drwxrwxrwt 2 root root 40 Jan 1 1970 shm
drwxr-xr-x 2 root root 60 Nov 13 2022 state
drwxr-xr-x 2 root root 80 Jan 1 1970 sysinfo
drwxr-xr-x 2 root root 40 Nov 13 2022 tmp
-rwxr-x--- 1 root root 2685 Dec 13 09:19 ubnt_erx_migrate.sh
-rwxr-x--- 1 root root 2168 Dec 13 09:19 ubnt_erx_stage2.sh
root@OpenWrt:/tmp# ./ubnt_erx_migrate.sh
WARNING: This script will migrate your OpenWrt system to a new layout as
required for the linux 6.6 kernel. This process will erase all your current settings.
It is recommended to back up your system before proceeding.

Do you want to proceed with the migration? (y/n)y
Downloading https://downloads.openwrt.org/releases/24.10.0-rc2/targets/ramips/mt7621//openwrt-24.10.0-rc2-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin
Fri Dec 13 09:20:29 UTC 2024 upgrade: Commencing upgrade. Closing all shell sessions and rebooting.
Command failed: Connection failed
root@OpenWrt:/tmp# Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.

SSH shell is lost when sysupgrade pivots into ram disk for flashing. But its flashing in the background, device should reboot in a couple of minutes and come up on the original default IPs.

It should not have bricked, it will only proceed to flash is the sha256 sums match, so wont flash a corrupted image. Not sure why you are getting a certificate error, I've not seen that in my testing.

Hi:
I recover the bricked device and try again but still get the same result. I will try to find a cable and attach the serial console to see what happened.

the certificate error maybe caused by different country/location.