WRT1900ACS - Router Reverted to Stock Firmware Overnight

Hey Guys -

I've got a Linksys WRT1900ACS which I installed a Davidc502 LEDE build onto a couple of months ago. As always, it vastly improved the router's performance and worked great.

This morning, I went to change a port forward via the web interface for some reason the stock OEM Linksys firmware loaded. I haven't made any recent changes and the only thing I can think of is that we had a power outage a couple of days ago. To note, it wasn't a fresh restore as the OEM firmware was not defaulted as it had all the configurations (WiFi settings, port forwards, etc) which I had made prior to upgrading to LEDE.

I believe this router can support dual firmwares and am assuming that during the last power outage it booted to the other previous one. I'm currently traveling so before trying anything, I wanted to post first to hopefully minimize the chance of defaulting the router and loosing access altogether.

Any suggestions or thoughts? Thanks!

1 Like

Yes, it has two partitions, and there's a way to force it to boot the other partition... I've heard that if you just turn the router off, turn it on, wait a very brief time, then turn it off... repeat 3 or 4 times, then it will decide that there's something wrong with the firmware and switch partitions.

There may be some other combination that is more direct. but I don't know.

1 Like

You can install luci-app-advanced-reboot to boot to the other partition from OpenWrt if you'd like a quicker way than the switch on/off process, Linksys stock has something similar called Revert to Previous Firmware (it's somewhere in the Connectivity or Troubleshooting sections if I remember right), or something along those lines, but I think it will only work if stock Linksys is on the other partition (not sure about that though).

1 Like

Thanks, Guys - Really appreciate the fast replies...

Besides powering off/on X times, is there any other way to have it boot from the other partition? I saw the suggestion to install "luci-app-advanced", but how am I to do so if the router is currently running stock firmware? If stock offers SSH option, I haven't ever used it before and would assume if possible I'd still have to add a repo or something.

So seeing as I'm traveling currently and it partially works, I may just wait until I get back unless someone has a suggestion that's more definitive. Just don't want to loose all settings accidentally. I do have RDP access to a PC that's connected to it via ethernet to the router but if router reverts to default config I'll loose that access.

What do you think? Thanks

Ssh isn't available in stock, you can look in the Connectivity or Troubleshooting sections in stock for Revert to Previous Firmware (or something like that) which is Linksys equivalent to luci-app-advanced-reboot, I never tried it with OpenWrt on the other partition though, so I don't know if it will work that way, no harm in trying though, if it doesn't work it will just stay on the stock partition, otherwise the on/off method is the only other way from stock. You don't lose any settings switching from one partition to another.

Nothing should be lost if you can get it to go back to the other partition from OEM, but power switch is probably best option. It is 3 failed boots and 4th switches.

What is happening under the sheets with OpenWrt:

#!/bin/sh
#hacked from /lib/upgrade/linksys.sh

cur_boot_part=`/usr/sbin/fw_printenv -n boot_part`
target_firmware=""
if [ "$cur_boot_part" = "1" ]
then
    target_firmware="kernel2"
    fw_setenv boot_part 2
    fw_setenv bootcmd "run altnandboot"
elif [ "$cur_boot_part" = "2" ]
then
    target_firmware="kernel1"
    fw_setenv boot_part 1
    fw_setenv bootcmd "run nandboot"
fi
# re-enable recovery so we get back if the new firmware is broken
fw_setenv auto_recovery yes
echo "$target_firmware"
reboot

Does not do you much good from OEM though. Notice the last env variable which can prevent the default behaviour if desired.

1 Like