使用 TTL 和 TFTP 恢复 ubnt erx 官方固件
date
Nov 6, 2019
slug
ubnt-erx-revover
status
Published
tags
ubnt
summary
type
Post
为什么要恢复
因为我把它刷成了 openwrt ⇒ 为了安装 openclash ⇒ 为了更好的展开工作
但是感觉不好用,并且打算通过旁路由的形式实现。
怎么用 TTL
- 购买一个 USB to TTL 设备,然后把相关的针脚连接好
- 将USB插入电脑,识别后连接到对应的端口等待输出
- 给路由器通电,正常情况下可以看到启动的输出信息
- 按需选择启动模式,进行后续操作
ERX 教程
- 连接 TTL
TX RX GND 线都接好接正确,不正确会导致不输出或者乱码(我遇到了没接地线乱码)。
使用 putty 填入对应的 COM 端口(我这里识别的是 COM3)和速率 57600,然后点击 open 进行连接,速率一定要设置正确,否则输出乱码。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcc4409d4-aa9f-482f-8844-50502e809e2b%2FUntitled.png?table=block&id=6675678c-4290-4271-b778-f7c10f0edb2d&cache=v2)
给路由器通电,这时候 putty 窗口有内容输出则说明前面的步骤均正确,可以进入下一步操作了。
- 使用 tftp 恢复
- 下载恢复镜像 (此步骤可提前)
- https://dl.ui.com/firmwares/edgemax/v2.0.x/ER-e50.recovery.v2.0.6.5208541.190708.0508.16de5fdde.img
- https://dl.ui.com/firmwares/edgemax/v1.10.x/ER-e50.recovery.v1.10.10.5210345.190714.1127.16de5fdde.img
- 连接网线
- 设置好tftp服务
- 恢复固件
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffed04cb9-8746-4e6c-9044-7f79535dc0eb%2FUntitled.png?table=block&id=c5c84c6a-9767-403c-b0b7-57be5455bf8f&cache=v2)
上图只是一个示意,将电脑的lan口和路由器的 eth0 口连接,并假设路由器 IP (device IP) 是 192.168.1.20,电脑 IP(server IP) 为 192.168.1.10,其中电脑 IP 需要自行配置好。
打开后设置好恢复镜像所在的目录和服务器地址。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F59d62974-22a3-439d-84d6-dd38130051ef%2FUntitled.png?table=block&id=4fbb7240-fada-4cc2-a501-6d52c64ac6e9&cache=v2)
在路由器启动的过程中,按数字1键,可以中断启动进程,选择启动模式,如下所示。
Please choose the operation: 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. 3: Boot system code via Flash (default). 4: Entr boot command line interface. 7: Load Boot Loader code then write to Flash via Serial. 9: Load Boot Loader code then write to Flash via TFTP. default: 3
输入1,然后填入对应的 IP和恢复镜像的名称。
1: System Load Linux to SDRAM via TFTP. Please Input new ones /or Ctrl-C to discard Input device IP (172.16.3.211) ==: 192.168.1.20 Input server IP (172.16.3.210) ==: 192.168.1.10 Input Linux Kernel filename (vme600) ==: ER-e50.recovery.v2.0.6.5208541.190708.0508.16de5fdde.img
没有报错的情况下(例如确保网线是连通的),耐心等待恢复完成即可。
案发现场
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F17befbef-9405-47de-baad-84704f85f0a3%2FUntitled.png?table=block&id=c7c6f211-3b77-4442-a91b-e788990566a0&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F42f29356-c37a-4ee6-a654-0a909a81ec36%2FUntitled.png?table=block&id=d2a3b093-aac8-488a-8acb-0e81bcdbc89c&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F17d2ace9-7b3f-41ad-a725-477d4cdb4142%2FUntitled.png?table=block&id=c2e84afd-eb05-4482-995b-459259baa665&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F2b93cd99-4830-4f59-b779-e34e74229bfa%2FUntitled.png?table=block&id=fbf03821-91fe-4c72-892a-df48ec8de6ba&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F20ef7503-58ad-461e-be94-2d8431ff733b%2FUntitled.png?table=block&id=468397f9-9ab6-4ec5-a3e0-9e545b83e8b6&cache=v2)