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)