Recovering broken filesystem - acc-/tplink-archer-c2300 GitHub Wiki
Recovering broken firmware
During my tests I accidently broke my device. I did a stupid thing, kind of rm -rf /
;-) After restarting, router entered into boot-loop state... This section describes how to recover / files from the original firmware.
Preparing firmware for flashing
Download the latest firmware from TP-Link web site. Extract it. The firmware file is a .bin one - in my example it's "Archer C2300(EU)_V1_171121.bin". But it's not ready to be flash directly if you don't have web interface running. We need to prepare the proper firmware file. We'll use binwalk
tool to extract the firmware.
binwalk -e "Archer C2300(EU)_V1_171121.bin"
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
5239 0x1477 JFFS2 filesystem, little endian
3544183 0x361477 UBI erase count header, version: 1, EC: 0x0, VID header offset: 0x800, data offset: 0x1000
We'll use the first extracted file, bigger one - 1477.jffs2 in this case
Flashing extracted firmware
- connect serial adapter to your router and reboot
- during startup, press space quickly to enter CFE menu
- using your cable-connected PC, go to http://192.168.1.1
- select the prepared firmware file (1477.jffs2 in the example above) and click to flash
The router reboots automatically and has the / partition restored. You will have your config remained (as it's retrieved from nvram). You'll also have files in /data and /tp_data, as these are different partitions.