I managed to go back to original firmware.
This post and two next gave me an answer to my questions.
In short:
Instead of one device "firmware" or "linux" defined in /proc/mtd, in WRT1900AC and WRT1900ACS we have two of them: "kernel1" and "kernel2" which are redundant. When current firmware is running on first, upgrade should be flashed on second. Then there is a possibility to go back if something will go wrong. After flashing it's needed to switch to second flash.
More words:
I found a script /lib/upgrade/linksys.sh which is doing it automatically, but somehow it didn't work for us when we tried to revert to factory firmware thru luci.
Description of how to determine which "kernel" we are currently using is available under the link above.
/proc/mtd in my case looked like that:
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00040000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 00100000 00020000 "devinfo"
mtd4: 02800000 00020000 "kernel1"
mtd5: 02200000 00020000 "rootfs1"
mtd6: 02800000 00020000 "kernel2"
mtd7: 02200000 00020000 "ubi"
mtd8: 02600000 00020000 "syscfg"
mtd9: 00680000 00020000 "unused_area"
Following the instructions I chose to flash new firmware to "kernel1". Then I went to /tmp and used wget do download original firmware from linksys website. At the end I used mtd to flash the data.
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# wget http://cache-www.belkin.com/support/dl/FW_WRT1900ACS_1.0.0.168229_prod.img
Connecting to cache-www.belkin.com (54.231.112.128:80)
FW_WRT1900ACS_1.0.0. 100% |**************************************************************************************************************************************************************| 29952k 0:00:00 ETA
root@OpenWrt:/tmp# mtd -r write FW_WRT1900ACS_1.0.0.168229_prod.img kernel1
Unlocking kernel1 ...
Writing from FW_WRT1900ACS_1.0.0.168229_prod.img to kernel1 ...
Rebooting ...
Write failed: Broken pipe
When I saw that write failed, I wasn't very happy. Especially because yet again I was not able to login via ssh, so I tried to switch to second flash. I did something similar to instructions at http://wiki.openwrt.org/toh/linksys/wrt … e_recovery
In my case PWR led doesn't blink after pressing reset button for 15 seconds, so:
I switched off the router
Switched it on and switched it off again when only pwr led started to blink. I repeated that 3 times
After 4th switching on linksys firmware was booting.
I'm wondering if I was just lucky and I only think that I know what I did, or that's the real way of going back to original firmware.
smithbone - if you will try to do it this way, please let me know if it also worked for you. If yes, then I will add some info to wiki page.
If anyone see that I wrote something that is not entirely true, then also please share that info with me
(Last edited by machnic on 31 Oct 2015, 02:52)