Somehow I got LEDE install on both partitions (not sure how that happened) but now I would like to install the Linksys WRT1200AC factory firmware back on partition 1. I looked through lots of posts but cannot figure out how to do this.
Thx
Dick
Somehow I got LEDE install on both partitions (not sure how that happened) but now I would like to install the Linksys WRT1200AC factory firmware back on partition 1. I looked through lots of posts but cannot figure out how to do this.
Thx
Dick
SSH into the router and run the following...
/usr/sbin/fw_setenv boot_part 1
That just boots right back into another LEDE firmware. I need to install the Linksys Firmware back on the router. Also that is the partition I am running already. See the above picture.
Will flash it to the other partition, whichever that is:
sysupgrade -F -n image
point being there is nothing special about any one partition, set the one you want, and flash to the other.
I will try that. Where to I put the image? /tmp ?
the image file would be fw_wrt1200ACV2_2.0.5.182144_prod.img
I would like make sure that the part 1 (currently running) is preserved, so I put the image on partition 1 and then do the sysupgrade command to flash partition 2 automatically?
Yes to /tmp. Not sure why you care as to which partition, but it flashes to the one that is not current; so be on 2 if you want it on 1.
I don't care about what partition but don't want to loose my current (partition 1) running LEDE setup...
Thanks for the help. Trying it later today.
For the CLI orientated:
#!/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
Of course...you have LEDE firmware on both partitions.
As mentioned, whatever the current partition is, flashing will put the firmware on the other partition.
OK, here is what is happening now:
After the reboot I was still running on partition 1. And when I used Advanced Reboot, the old LEDE configuration is still there.
I was on partition 1 and executed the following below:
root@DLRouter:/lib/upgrade# cd /etc
root@DLRouter:/etc# sysupgrade -v -F -n /tmp/expressvpn-linksys-wrt1200ac-v1.5.2.img
Image metadata not found
Image check 'fwtool_check_image' failed but --force given - will update anyway!
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd uhttpd miniupnpd S95done sh openvpn dnsmasq ntpd ubusd askfirst
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.
Server:~ Dick$ ssh root@192.168.1.1
root@192.168.1.1's password:
BusyBox v1.25.1 () built-in shell (ash)
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / Reboot (17.01.4, r3560-79f57e422d)
\________\/ -----------------------------------------------------------
root@DLRouter:~#
Don't understand what is going on or what I am doing wrong.
PS: The image file was definitely there.
root@DLRouter_Part1:/tmp# ls -l
-rw-r--r-- 1 root root 23 Mar 7 06:26 TZ
-rw-r--r-- 1 root root 1583 Dec 6 1968 board.json
-rw-r--r-- 1 root root 504 Mar 8 12:22 dhcp.leases
drwxr-xr-x 2 root root 40 Mar 7 06:26 dnsmasq.d
drwxr-xr-x 3 root root 100 Mar 7 06:27 etc
-rw-r--r-- 1 root root 17432576 Mar 8 12:34 expressvpn-linksys-wrt1200ac-v1.5.2.img
drwxr-xr-x 2 root root 80 Mar 7 06:26 hosts
drwxr-xr-x 4 root root 80 Mar 8 11:02 lib
drwxr-xr-x 2 root root 60 Mar 8 12:31 lock
drwxr-xr-x 2 root root 80 Mar 7 06:26 log
-rw------- 1 root root 66206 Mar 8 11:31 luci-indexcache
drwxr-xr-x 2 root root 780 Mar 8 11:31 luci-modulecache
drwxr-xr-x 2 root root 280 Mar 8 11:30 opkg-lists
drwxr-xr-x 2 root root 40 Dec 6 1968 overlay
-rw-r--r-- 1 root root 32 Mar 7 06:27 resolv.conf
-rw-r--r-- 1 root root 85 Mar 7 06:26 resolv.conf.auto
drwxr-xr-x 5 root root 380 Mar 8 11:10 run
drwxrwxrwt 2 root root 40 Dec 6 1968 shm
drwxr-xr-x 2 root root 80 Mar 8 10:58 state
drwxr-xr-x 10 root root 1128 Dec 6 1968 syscfg
drwxr-xr-x 2 root root 80 Dec 6 1968 sysinfo
drwxr-xr-x 2 root root 40 Mar 7 06:26 tmp
-rw-r--r-- 1 root root 682 Mar 8 12:33 upnp.leases
drwxr-xr-x 3 root root 60 Mar 8 10:59 usr
That doesn't look like a stock firmware image to me...
Get the firmware here...
https://www.linksys.com/us/support-article?articleNum=156197
You are right. It is the stock firmware from ExpressVPN with their stuff all set. I was going to try that on the other partition.
I would guess that is an upgrade, not a factory image.
I did the whole process again but this time with the official Linksys Firmware. The same result. It switches from partition 1 to partition 2 but is still just another LEDE install. I think that somehow the command does not find the image and just performs a reboot.
See the terminal commands and output below:
root@DLRouter:/tmp# ls -l
-rw-r--r-- 1 root root 32768256 Mar 8 15:42 **FW_WRT1200ACV2_2.0.5.182144_prod.img**
-rw-r--r-- 1 root root 23 Mar 8 11:02 TZ
-rw-r--r-- 1 root root 1583 Dec 6 1968 board.json
-rw-r--r-- 1 root root 587 Mar 8 15:40 dhcp.leases
drwxr-xr-x 2 root root 40 Mar 8 11:02 dnsmasq.d
drwxr-xr-x 3 root root 100 Mar 8 11:02 etc
drwxr-xr-x 2 root root 80 Mar 8 11:02 hosts
drwxr-xr-x 3 root root 60 Mar 8 11:02 lib
drwxr-xr-x 2 root root 60 Mar 8 11:02 lock
drwxr-xr-x 2 root root 80 Mar 8 11:02 log
-rw------- 1 root root 66206 Mar 8 11:02 luci-indexcache
drwxr-xr-x 2 root root 760 Mar 8 14:14 luci-modulecache
drwxr-xr-x 2 root root 40 Dec 6 1968 overlay
-rw-r--r-- 1 root root 32 Mar 8 11:02 resolv.conf
-rw-r--r-- 1 root root 85 Mar 8 11:02 resolv.conf.auto
drwxr-xr-x 5 root root 380 Mar 8 13:29 run
drwxrwxrwt 2 root root 40 Dec 6 1968 shm
drwxr-xr-x 2 root root 80 Mar 8 13:25 state
drwxr-xr-x 10 root root 1128 Dec 6 1968 syscfg
drwxr-xr-x 2 root root 80 Dec 6 1968 sysinfo
drwxr-xr-x 2 root root 40 Mar 8 11:02 tmp
-rw-r--r-- 1 root root 682 Mar 8 15:20 upnp.leases
root@DLRouter:/tmp# fw_printenv boot_part
boot_part=1
root@DLRouter:/tmp# **sysupgrade -F -n /tmp/FW_WRT1200ACV2_2.0.5.182144_prod.img**
**Image metadata not found**
Image check 'fwtool_check_image' failed but --force given - will update anyway!
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd uhttpd miniupnpd S95done sh openvpn dnsmasq ntpd ubusd askfirst
Connection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.
Server:~ Dick$ ssh root@192.168.1.1
root@192.168.1.1's password:
BusyBox v1.25.1 () built-in shell (ash)
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / Reboot (17.01.4, r3560-79f57e422d)
\________\/ -----------------------------------------------------------
root@DraadloosRouter:~# fw_printenv boot_part
boot_part=2
root@DraadloosRouter:~#
There was an issue some way back that stopped this from proceeding; not sure if the image you have installed has that commit or not. So by way of possibly moving forward, try a regular(GUI/otherwise) upgrade flash to a current LEDE (stable/snapshot) image, then try the above to get the OEM.
As far as I know the "Reboot (17.01.4, r3560-79f57e422d)" is the latest and greatest stable image.
I have installed the "lede-17.01.4-mvebu-linksys-wrt1200ac-squashfs-factory.img"
I have not installed the "lede-17.01.4-mvebu-linksys-wrt1200ac-squashfs-sysupgrade.bin" because I could not find any documentation to say what I needed to do with it.
Really appreciate all the help from everybody.
Thx
Dick
That is the latest stable, was trying to find the relevant commit, I don't think it made its way into that image(sure hope not). At any rate, simple enough to try a snapshot sysupgrade image, there will be no GUI, but just proceed from ssh as you have been doing. Back up your current config and sysupgrade without keeping settings, you can just restore once you get things sorted.
Just in case you were not aware of power switch recovery.
Just to make sure that I understand:
What the file I should use is: "linksys-wrt1200ac-squashfs-sysupgrade.bin" from the snapshot page in your post.
Question: What is that going to do? It only affects one of the partitions right?
After the router boots into the updated partition, would I try to install the linksys factory image again and see what happens?
Sorry to ask so many questions
That would be the correct image, it will flash to the other partition, i.e. the one that is not current, then you could try scp the OEM to /tmp and ssh in to try the above CLI sysupgrade line. Which will overwrite the other partition, i.e. the one that is current, you can then flash via OEM whatever it is you want on the other partition and restore your config backup, leaving you with OEM on the inactive partition, and (assuming you flash the same LEDE as current) an image that apparently you cannot get off of, on the active partition; so back from whence you came. But, will answer(maybe) the question as to why you cannot get from either??? LEDE image to OEM.
OK, understand. I probably will not do that today or tomorrow. Lost too much time already today.