WRT1200AC Reset before selling

as the title suggests I want to sell my wrt1200ac router.
Now I want to do a hard-reset of the router to:

  1. Give the new owner a fresh start
  2. Not leak any sensitive information
  3. (maybe revert back to stock firmware)

Normally I would re-flash the firmware and be done, but the thing with the two firmware partitions and the flash layout here in the wiki (Kernel1,Kernel2,Sysconfig, etc.) confused me a bit.

So what do I have to do to completely wipe the router and not leave any trace of prior usage?


Right its always best to revert back to stock when reselling.

So simply SSH into your router and run the following commands and please for the love of all routers make sure you use the correct stock firmware as the WRT1200AC a version 1 and a version 2.

So for ease of use i will make two copy and pastable code boxes for you for each version.

For WRT1200AC Version 1

cd /tmp
wget http://downloads.linksys.com/downloads/firmware/FW_WRT1200AC_1.0.5.187766_prod.img -O stock.img
sysupgrade -F -n stock.img

For WRT1200AC Version 2

cd /tmp
wget http://downloads.linksys.com/downloads/firmware/FW_WRT1200ACV2_2.0.6.191786_prod.img -O stock.img
sysupgrade -F -n stock.img

This will then restore your firmware back to stock safely without risk of bricking your unit (So long as you pick the right command set). Then after that if it has two partitions flash the stock firmware again via the now Stock WebGUI.

Then just to make sure nothing is left after do the Linksys Reset Method of the 30/30/30 trick
which is holding the Reset button in for for 30 seconds with the power removed then 30 seconds with the power pluged back in then another 30 seconds with the power removed again.


Thanks for the quick answer!

So if I understand this correctly, the commands will flash partition A and the second flash (via the stock WebGUI) will then flash partition B and the 30/30/30 trick will erase the rest of the flash memory?

Can I use the same img file for the WebGUI flash or do I need a different one?

You can use the same image. It is the normal OEM firmware image.

And there is no 30/30/30 with the current routers that have all settings stored as files in normal flash (instead of some shortable old-style nvram).
Better to use some factory-reset command from the OEM GUI to clear any OEM firmware related personal settings.

I still do the 30/30/30 trick regaurdless just incase something sticks, however it seems that can be skipped now adays and the factory default setting in the WebGUI should be enough.

Yes using the commands above will flash only one partition, to restore the other to stock you simply use the WebGUI from the partition that boots back up.

Also the images for V1 and V2 from what i can understand are different even on stock so alway make sure of which version you have before using the commands i put in, it better to be save then sorry.

When I look at the Flash Layout in the Wiki I guess that flashing the firmware (2x times) will overwrite mtd4 and mtd6.
mtd8 sounds like it might contain data/settings that sould be cleared before selling aswell.
I guess the

should clear this section then?

mtd8 (syscfg) is only used by Openwrt for storing the settings archive file during sysupgrade, after which the file is deleted.


Note that it is mounted as /tmp/syscfg in OpenWrt, so you can check the contents by yourself.

From my own WRT3200ACM:

root@router3:~# ls -lt /tmp/syscfg/
-rw-rw-rw-    1 root     root             2 Jun 29 09:47 sysup
drwxrwxrwx    2 root     root           232 Jun 29 09:46 devidentd
drwxrwxrwx    2 root     root           160 Feb 18  2017 openvpn
-rw-rw-rw-    1 root     root           300 Feb 18  2017 detected_hosts_history
-rw-rw-rw-    1 root     root            22 Feb 18  2017 syspwl.lst
drwxrwxrwx    2 root     root           240 Feb 18  2017 license
drwxrwxrwx    2 root     root           160 Feb 18  2017 downloads
-rw-rw-rw-    1 root     root             0 Feb 18  2017 updated
drwxrwxrwx    4 root     root           320 Oct 11  2012 ipa
drwxrwxrwx    2 root     root           160 Oct 11  2012 esm
drwxrwxrwx    2 root     root           160 Oct 11  2012 events
drwxrwxrwx    2 root     root           160 Oct 11  2012 ewps
-rw-r--r--    1 root     root            50 Jan  1  1970 files-to-keep.conf
-rw-r--r--    1 root     root            45 Jan  1  1970 panic.md5
drwxr-xr-x    2 root     root           232 Jan  1  1970 syscfg

That contains nothing from OpenWrt.
But I have no knowledge if some of those are permanent and needed by the Linksys firmware, or if everything is re-created automatically if a file is missing.

1 Like

I did the sysupgrade, and the router now boots into the stock firmware - so sucess!

Now I have another problem... I think it might not be OpenWrt related, but I'll ask anyway maybe somebody knows a fix.

The Stock Firmware boots, but when I connect to the webinterface I only see "waiting..." and a loading circle nothing more happends.

I switched back to the OpenWrt partition and flashed the stock image again - same result

I did all of this "offline", so no internet connection for the router (transfered the firmware image via SCP from my laptop).

Is the firmware image known to be broken?
Does the first boot take longer than an hour?
Does the stock firmware need internet on the WAN port for the first boot?
Or is there anything else I could try?

The browser cache may be troublesome, as both OpenWrt and Linksys ffirmware use You might try with another browser thta does nto know about OpenWrt, or you might empty the browser cache.

Could be also this, although not likely. I noticed with my WRT3200ACM that the current OEM firmware wants to "call home". I could not flash the OpenWrt firmware via OEM GUI until I had let the OEM firmware to call home at Linksys. But I was able to access OEM GUI quite ok.

Clear your caches in your browser, failing that do the 30/30/30 trick see if that helps.

Browser caches should not be a problem.
Since the OpenWrt firmware used a Subnet
But the stock firmware gives my laptop an IP in a Subnet

I will try the 30/30/30 trick now, and let it "call home" via the wan port

30/30/30 did not help
And "calling home" also not...

But another thing I noticed, when I connect the router to my network via the WAN port I don't get internet acces from my laptop that is connected to the lan port of the router.

So it seems that the router does "not work properly".
Not only the WebUI seems broken but also basic functions.

Does the web UI work well enough to use the 'restore defaults' function?

The dual-boot option is operated by cutting the power during boot-up, if you do that three times it will boot the other partition. "30/30/30" does nothing. Check the device wiki page for recovery options.

Since you are now running Linksys stock firmware you could go to the Linksys forums.

1 Like

I always run into that 'waiting' problem if i go back to stock on my wrt1200, maybe some devices are more susceptible to it than others, clearing history/cookies/cache in your browser should get you back in the gui and reset through gui or physical button should fix any other problems as others have already suggested.


Clearing caches did not help

but a Reset via the red reset button did help a bit.
I can not get one step farther in the WebUI, and the router uses a subnet again.

Might hook it up to the internet again.

But I think this is a Linksys problem and nothing from openwrt

How is your router connected to the modem?

Is it just a single RJ45 cable to the WRT1200's WAN or do you have another cable connected, if you have another cable connected and the IP range is the same your going to have issue simply disconnect it should solve it else i don't know what the issue is.

If you can SSH into the router you can always login and issue the firstboot command which should help.

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