Flashing Linksys WRT1200AC

Hello,

I guess this might sound like herecy but can anyone help me remove/overwrite/rollback an LEDE image to the stock image for my router?

As an experiment I flashed it with LEDE Reboot 17.01.5 but I cannot revert to the previous image. I have tried to get image files into the router but tftp doesn't seem to be running. I can connect with putty but don't know what to do once I'm in.

Any pointers would be greatfully received.

Use the wget command to download the previous image to /tmp. You must use HTTP (not HTTPS).

or you can scp the image to /tmp, but you will probably have to ssh in and:

sysupgrade -F -n imagename

to flash an OEM image over the current OpenWrt install.

1 Like

Thanks but I got: "Failed to establish connection" when I tried wget and I don't know how to use "scp"

scp with the PuTTy package is a PITA, easy with the cmder stuff (YMMV). Not sure, but IIRC, the need to use sysupgrade -F from above may be negated by the 18.06 stable release; i.e. you may be able flash OEM from the GUI.

Perhaps the WRT AC Series ToH could be consulted...

Please elaborate, as the only difference between using scp vs pscp is five characters: pscp -scp, all other parameters are the same.... see the Flash tab

Sorry, what is "PITA" and " cmder stuff (YMMV)"?

I'm new here and to Linux but I desperately want to break away from Windows.

I am trying to get the image (which I downloaded from Linksys) into my router (so I can try the sysupgrade -F) from a Windows 7 PC using putty. I have tried several variations in syntax (e.g. scp guest@192.168.1.188:Temp\FW_WRT1200AC_1.0.5.187766_prod.img /tmp) but keep getting "Connection refused". The file is in a Share called Temp (with permissions set for Everyone to Read) and the guest account is enabled on the PC. TIA.

Why not use a Windows scp tool with GUI ? e.g. WinSCP

Thanks but I tried WinSCP and can't connect to my PC.

I just came up with another idea: why not use the USB port on the back of the router?

I copied the image to a USB stick, plugged it in and re-booted the router.

What do I need to do to mount the USB stick?

If putty can connect using SSH then Winscp will also work. You're supposed to use it on the PC to connect to the router. Make sure it uses the SCP protocol.

  • Pain In The A**
    • As I mentioned previously, the only difference in parameters for using scp with PuTTY's pscp is specifying pscp -scp in lieu of scp

  • Cmdr is a terminal emulator for Windows (I personally prefer ConEmu).

Your syntax is wrong, however it's not your fault, as the ToH was wrong (it's been corrected to show the proper <source> <destination> order).

  • SCP command should be [issued from Windows]:
    pscp -scp -r -i "C:\OpenWrt.ppk" -2 -P 22 "D:\Path\To\Firmware.img" root@192.168.1.1:/tmp
    

When installing WinSCP, choose the Commander option [which is default] versus Windows Explorer mode, as this allows displaying Windows mount points on the left hand window and the router's filesystem in the right hand window.

  • Prior to making the connection in WinSCP, you must edit the connection option to change File Protocol from it's default (SFTP) to SCP.

  • Configure your SSH profile for the router in PuTTY first, then on WinSCP, click the Tools drop down and select Import Sites... this will import your PuTTY connection profiles

Since the USB storage wikis leave much to be desired:

  1. Ensure proper kmod is installed for the filesystem the USB drive is formatted with:
    opkg update && opkg find kmod-fs-*
    a. If the file system used is not listed: opkg search kmod-fs-*

  2. Install the file system kmod
    opkg install kmod-fs-<name>

  3. Find the partition and mount it
    a. block info
    b. mount /dev/sda1 /mnt
    • Where sda is the usb drive and 1 is the partition number you wish to mount

Thanks everyone, especially Per, I have finally go where I wanted to be - Stock Image installed - but not too sure how I got there. I have a lot of reading up to do.

1 Like

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