index.html

Recover bricked EdgeRouter X

Word count: 308Reading time: 1 min
2019/08/15 Share

A firmware update failure bricked my ER-X completely, it reboots immediately after startup.

Luckily there is an official manual on firmware recovery here.

Here are the steps to recover a bricked router.

Utilities

  • USB to TTL adapter
  • TTY client
  • TFTP server
  • Patience

TFTP Server

Download recovery firmware of the model from the official web page, in my case ER-X v2.0.x

Set up a TFTP server, I use tftpd on Linux, there’s plenty of tutorials on the Internet.

Installation:

1
sudo apt install xinetd tftpd tftp

Configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo nano /etc/xinetd.d/tftp

service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tmp
disable = no
}

Copy downloaded firmware image to /tmp and rename it to something easy to type, eg. erx.img.

Start service and test:

1
2
3
4
5
6
7
sudo service xinetd restart

tftp 127.0.0.1
tftp> get erx.img
Sent *** bytes in *** seconds

tftp> quit

Connection

Open the case of the router, connect the TTL wire.

The pinout of ER-X (if Ethernet port on the left):

  • PIN-1: GND
  • PIN-2: RXD (connect to TXD)
  • PIN-3: TXD (connect to RXD)
  • PIN-4: GND

Then plug the Ethernet cable to eth0

Flash

Open TTY client and connect to the device, in my case GtkTerm and the device is in /dev/ttyUSB0.

Start the router and the terminal should print some log. (like kernel panic T^T)

Hold down the 1 key as the router starts up to interrupt the boot process.

Input the interface IP and the file path.

Wait until the flash is over and the device automatically reboots.

After the device boot, switch the cable to eth1 - eth4 (LAN) and now the computer should be able to SSH into the router.

EOF

CATALOG
  1. 1. Utilities
  2. 2. TFTP Server
  3. 3. Connection
  4. 4. Flash