EdgeRouter ER-X Upgrade from 23.05 to 24.10 (Help!)

Hello,

I have an Edge Router X, and I want to upgrade OpenWrt from
23.05 to 24.10.

I followed these instructions:

and I get the following error at the end: "Line 8: Syntax error: unexpected line break."

Can anyone help? What's wrong here?

BusyBox v1.36.1 (2024-03-22 22:09:42 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.3, r23809-234f1a2efa
 -----------------------------------------------------
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# ls -1
TZ
board.json
dhcp.leases
dnsmasq.d
etc
hosts
lib
lock
log
luci-indexcache.541a02a9.json
overlay
resolv.conf
resolv.conf.d
run
shm
spool
state
sysinfo
sysupgrade.img
tmp
ubnt_erx_migrate.sh
ubnt_erx_stage2.sh
root@OpenWrt:/tmp# chmod +x ubnt_erx_migrate.sh
root@OpenWrt:/tmp# ./ubnt_erx_migrate.sh
./ubnt_erx_migrate.sh: line 8: syntax error: unexpected newline
root@OpenWrt:/tmp# login as: root
 OpenWrt 23.05.3, r23809-234f1a2efa
 -----------------------------------------------------

How did the scripts end up on the router ?

I used WinScp Tool on Windows

1 Like

And you c&p:ed it to a file on Windows from GitHub ?

Yes, I'm using a Windows PC.
I downloaded the files with Firefox and then copied them to the Temp directory
in OpenWrt using WinSCP. (I didn't edit the files.)

Try using wget directly from the router - https://raw.githubusercontent.com/darkxst/erx-migration/refs/heads/main/ubnt_erx_migrate.sh + https://raw.githubusercontent.com/darkxst/erx-migration/refs/heads/main/ubnt_erx_stage2.sh.

If it still fails, report the issue to the maintainer on GitHub.

It worked! Thank you for your help.
Apparently, the file was corrupted during the browser download.

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