- Rescue from failed firmware upgrade
- Check first: Device-specific firmware recovery procedures
- Manufacturer-generic firmware recovery procedures
- Recovery for disk-image-based devices (e.g. SD-cards)
- TFTP recovery mode
- Rescue USB stick
- Назад, к родной прошивке
- 1. через OpenWrt CLI
- 2. через OpenWrt Web-интерфейс
- 3. через автозагрузчик
- Back to original firmware
- via OpenWrt CLI
- via OpenWrt WebUI
- via Bootloader
Rescue from failed firmware upgrade
RECOMMENDED: follow the procedures detailed at Failsafe and Factory Reset first
That’s what will most likely help you if you can’t reach the OpenWrt interface anymore after installing packages, changing the password or the network configuration.
Some device vendors provide built-in rescue functions in their device’s flash ROM boot partition that remain there, even after a OpenWrt firmware upgrade, so a OpenWrt upgrade will not overwrite this rescue function.
These rescue functions can be used to recover a failed flash update (no matter if the failed flash was vendor firmware or OpenWrt) or recover from an otherwise dead device, as long as the device hardware and the rescue function is still intact. These rescue partitions do consume a tiny piece of the flash, but renders a device mostly unbrickable.
Unfortunately such rescue functions are not available from all vendors, sometimes not for all models from a vendor and the actual rescue process is mostly vendor specific. This page is meant to collect the known rescue methods of different router vendors or router models.
Check first: Device-specific firmware recovery procedures
Check the “device page” of your device (look for a link in the last columns of the Table of Hardware). The device page may describe a rescue method for your specific device.
Some of the methods may require creating a custom RS232-serial-cable or soldering-skills, while most newer devices require just a certain software trick to remote flash the device from a PC client.
Manufacturer-generic firmware recovery procedures
Many devices of the following manufacturers support a recovery procedures as listed here:
Manufacturer | Procedure | Links |
---|---|---|
ASUS | TFTP -like rescue procedure with a manufacturer utility to be installed on a client PC. | Official ASUS recovery documentation |
D-Link | Several devices have a dedicated rescue firmware partition in their flash ROM. | |
Linksys | Several older devices support a remote TFTP recovery procedure. Several newer devices have 2 independent firmware partitions. | — Official Linksys TFTP recovery documentation — For Linksys dual firmware, see below |
Mikrotik | TFTP -like rescure procedure with a manufacturer utility called ‘netinstall’ installed on a client PC. | Official Microtik recovery documentation |
Netgear | TFTP on a PC client can be used to rescue the firmware. | Official Netgear TFTP recovery documentation |
nmrpflash | https://github.com/jclehner/nmrpflash | |
TP-Link | TFTP on a PC client can be used to rescue the firmware. Several newer devices provide a rescue partition. | TP-Link forum TFTP recovery documentation |
Webpage firmware recovery See link for models which support this method. | https://www.tp-link.com/us/faq-1482.html | |
Ubiquiti (UBNT) | TFTP on a PC client can be used to rescue the firmware. | Official UBNT site: site search for ‘firmware recovery’ |
Xiaomi | Several devices with USB port support a rescue USB stick method. | |
ZBT (ZBTLink) | Several devices support a rescue partition. On some devices, TFTP on a PC client can be used to rescue the firmware. |
Recovery for disk-image-based devices (e.g. SD-cards)
Examples: the different Raspberry PI’s, devices of PC Engines).
OpenWrt devices that use a drive-installed image.gz or sdcard.img.gz are not an issue to recover. The OpenWrt OS is not applied to flash ROM, but installed on a removable drive, e.g. an SD-card. For recovery, mount the removable drive in a working PC and reapply the OpenWrt image to the removable drive according to the device-specific instructions.
TFTP recovery mode
In several of these recovery procedures you will need a working TFTP server on your PC, see how to install and configure it in Set up a TFTP Server article.
Rescue USB stick
Supported by some Xiaomi devices
Назад, к родной прошивке
Строго говоря, вам не надо деинсталировать OpenWrt, вам достаточно заменить OpenWrt оригинальной прошивкой. Мы надеемся, что вы находитесь на этой странице, потому как не нашли инструкций по такой замене на собственной странице устройства в этом wiki. Сперва, будет не лишним заглянуть на страницу flash.layout.
Чтобы заменить OpenWrt оригинальной прошивкой, вам почти наверняка не надо будет вносить изменения в загрузочную область, или ту область, которая содержит такую специфическую информацию как NVRAM или ART . Даже в том случае, если вы перезаписывали загрузчик при установке OpenWrt на ваше устройство.
1. через OpenWrt CLI
Для этого вы можете использовать программу mtd :
cd /tmp wget http://www.example.org/original_firmware.bin mtd -r write /tmp/original_firmware.bin firmware
В OpenWrt не существует никаких уловок, “защищающих” вас от установки какой-либо другой прошивки на ваше устройство. Но иногда вам необходимо быть внимательными, как например в случае с TL-WR1043nd.
Если, в ответ на вызов команды mtd, вы получили ошибку вроде “no valid command given” — вы используете старую версию mtd, которая не поддерживает опции -r или -e.
Загрузите обновленную скомпилированную версию
cd /tmp wget http://downloads.openwrt.org/people/wbx/mtd.static chmod a+x mtd.static wget http://www.example.org/original.trx ./mtd.static -e linux -r write original.trx linux
Совет: ПОЖАЛУЙСТА, ПРОЧТИТЕ! Здесь собраны частые ошибки. Во второй ветке описывается, когда вам следует использовать
Заливать только trx, и никогда — bin файл? Если у вас есть только Linksys
файл прошивки, то это не проблема. Просто удалите шапку, перед тем как выполнять команды:
dd bs=32 skip=1 if=original.bin of=original.trx
Совет: Если ваша заменяющая прошивка содержит web-интерфейс, не забудьте очистить кэш вашего браузера. Иначе, очень вероятно, вы будете получать ошибку “404 error — Страница, которую вы запрашиваете, не существует.
2. через OpenWrt Web-интерфейс
См. сайт разработчика вашей прошивки для вашего модема. Внимание неправильная прошивка может повредить ваше устройство.
3. через автозагрузчик
Чтобы залить оригинальную прошивку через автозагрузчик, пожалуйста, следуйте процедурам, описанным в статье Устанавливаем OpenWrt. Действия по установке оригинальной прошивки аналогичны. Только на этот раз вам необходимо иметь файл с оригинальной прошивкой. Обычно ее можно легко найти на сайте производителя.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. OK More information about cookies
Self-registration in the wiki has been disabled.
If you want to contribute to the OpenWrt wiki, please post HERE in the forum or ask on IRC for access.
Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International
Back to original firmware
This page is very old and seems specific to “ancient” devices.
Consult the device page for more up-to-date and device-specific information.
There is little point in merely uninstalling OpenWrt, what you actually want to do, is to replace OpenWrt with the original firmware. You are probably here because the wiki-page for your device does not help you with that. So, first have a look at the flash.layout.
To replace OpenWrt with the original firmware, you most probably do not have to change the boot partition, or the partition containing specific information like NVRAM or ART , even if you overwrote the bootloader when you installed OpenWrt on your device.
via OpenWrt CLI
Only experts with a full and detailed knowledge of their device and tools should ever write to low-level devices.
Tools such as `dd` and the various `mtd` and `nand` tools can quickly and irrecoverably brick a device permanently.
Non-developers should always use OpenWrt LuCI-based approaches when available.
You can use the program mtd for this:
cd /tmp wget http://www.example.org/original_firmware_STRIPPED.bin mtd -r write /tmp/original_firmware.bin firmware
IMPORTANT: you MUST STRIP the original OEM firmware before using it with mtd, otherwise YOU MAY BRICK YOUR DEVICE
If you want to remove DD-WRT, you should write to the device “linux” instead of “firmware”. (Tested on TP-Link TL-WR841ND V7):
mtd -r write /tmp/original_firmware.bin linux
If you are flashing a Linksys WRT-ACS series, you should write to the device “kernel1” instead of “firmware”. It is not necessary to convert the vendor-provided .img firmware file (Tested on WRT1900ACSv2):
mtd -e kernel1 -r write /tmp/original_firmware.bin linux
OpenWrt has no built-in “pleasantries” to prevent you from going back to original firmware. But sometimes you need to be careful, see e.g. Back to original firmware.
If you get a error message on the above mtd command like “no valid command given” you are using an old version of mtd which doesn’t support the -r or -e parameters.
Download a newer statically compiled version
cd /tmp wget http://www.freewrt.org/downloads/tools/mtd-static chmod a+x mtd.static wget http://www.example.org/original.trx ./mtd.static -e linux -r write original.trx linux
TIP: PLEASE READ — Common mistakes thread section 2 also. It describes when you should use the openwrt-brcm-2.4-squashfs.trx image.
Only flash a trx, never flash a bin file?
Note: It is no more necessary to cut off the vendor-provided firmware file on Linksys WRT-ACS series. If you only have a Linksys .bin firmware file, this is not a problem, simply cut off 32 bytes of the header by using the commands below:
dd bs=32 skip=1 if=original.bin of=original.trx
See also image.conversion for more info about .bin to .trx.
TIP: If your replacement firmware has a web interface, remember to flush your browser cache, sessions etc. This will avoid misleading 404 errors.
via OpenWrt WebUI
via Bootloader
To flash the original firmware back again via the bootloader, please follow the procedures already described in Installing OpenWrt. They are basically the same.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website. OK More information about cookies
Self-registration in the wiki has been disabled.
If you want to contribute to the OpenWrt wiki, please post HERE in the forum or ask on IRC for access.
Except where otherwise noted, content on this wiki is licensed under the following license:
CC Attribution-Share Alike 4.0 International