OpenWrt Forum Archive

Topic: WRT3200ACM: OEM to LEDE Partition

The content of this topic has been archived on 7 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was able to install the OEM Linksys firmware on Partition 1 of the WRT3200ACM router.  Partition 2 has LEDE and I would like to get the latest firmware installed on Partition 2.  I am unable to switch from the OEM partition to the LEDE partition.  I have tried powering on the router and as soon as the Power LED turns off, I turn off the router.  After doing this 3 times, the router still boots to the OEM Linksys partition.  What am I doing wrong here?

(Last edited by weaponG on 17 May 2017, 04:58)

Remember that you always install a new firmware on the other partition, and then boot from it. If you want to install a new version of LEDE, just do it from the OEM partition; it should overwrite your current installation and then boot into it.

Like eduperez says, the router always flashes the other partition. Both in OEM and in LEDE/Openwrt.

Note that you don't need to use the "break boot 3 times with power off" trick to switch boot partition without flashing. You can do that by software with both Openwrt & LEDE and also with the OEM firmware.

* Linksys original OEM firmware offers the possibility to boot into the other firmware: "Restore previous firmware". It is named a bit misleadingly, but in the context of two firmware partitions it means the switch to the other partition.

* In LEDE & Openwrt, you can use either simple u-boot env variable modification commands or a script. One script is e.g. the function used by sysupgrade script: https://github.com/lede-project/source/ … ksys.sh#L5
Both variants are visible in the script below, but in principle just

fw_setenv boot_part 2
fw_setenv bootcmd "run altnandboot"

or the respective commands to switch to the partition 1.

I use a script modified from that LEDE/Openwrt sysupgrade script:

#!/bin/sh
#
# This script changes the router to boot from the alternative kernel/partition.
#
# Normally partition is changed at firmware flash. New firmware is flashed
# to the other partition and then the router boots from there. This script
# causes that boot partition change without a flash

cur_boot_part=`/usr/sbin/fw_printenv -n boot_part`
if [ "$cur_boot_part" = "1" ]
then
    echo "Switching to kernel/partition 2"
    fw_setenv boot_part 2
    fw_setenv bootcmd "run altnandboot"
elif [ "$cur_boot_part" = "2" ]
then
    echo "Switching to kernel/partition 1"
    fw_setenv boot_part 1
    fw_setenv bootcmd "run nandboot"
else
    echo "Error: unexpected value: boot_part=$cur_boot_part"
fi

# auto_recovery should have been set to 'yes' by /etc/init.d/97linksys_recovery
# the same script has also reseted the boot-counter used by u-boot.

fw_printenv auto_recovery

(Last edited by hnyman on 18 May 2017, 08:58)

Thanks a lot for the responses.  I was able to perform an install of the latest LEDE firmware for WRT3200ACM (rango) from the Linksys OEM partition.  The router then rebooted into the new LEDE partition.  I will stay on the LEDE partition and see how stable Wi-Fi is on the latest LEDE.  This was a major reason for going back to OEM.

The discussion might have continued from here.