Dual firmware on WRT3200ACM

Hi,

I have a Linksys WRT32000ACM and I am struggling with the dual firmware. On partition one I have the original Linksys firmware, on partition twoI have OpenWrt 24.10.4.

The issue I have is that the dual firmware flashing does not seem to work. When I am running on OpenWrt from partition 2 and try to flash a new firmware, it fails and reboots to partition 2. Also the advanced reboot does not work, meaning I cannot use luci to reboot switch the reboot partition.

The only way I can upgrade is by doing the 3x power cycle to make it boot to partition 1 and then flash factory image from there.

What I would like to achieve is having OpenWrt on both partitions. When I want to replace the paritiion one Linksys by flashing from OpenWrt, should I use a factory image?

Any tips or advice on how to troubleshoot the dual firmware flashing and reboot toggle would be appreciated.

Thanks!

What was on partition two before 24.10.4?

This was resolved with this commit: mvebu: fix sysupgrade failure #16690, and is in the 24.10 Release.

Since you are running on the factory image now, try running sysupgrade again against the alternate partition using the sysupgrade image for 24.10.4.

Hi,

thank you for your reply and suggestion. I now tried to flash a sysupgrade image from the existing OpenWrt 24.10.4 web interface on partition 2. My understanding is that this should have overwritten the Linksys image on partition 1.

Unfortunately this did no happen. It seems the flash process did not even complete. After starting the flash process I waited for 10 minutes, but the router had not rebooted.

At this point I power cycled the device and it rebooted back to OpenWrt on partition 2. Luci reports that partition 1 still has the Linksys firmware.

Would flashing from commandline provide more information?

Not impossible, but problably not. The actual flashing happens detached from the ssh session, so if there are failures to write out the image, you're not going to see it through ssh (serial would show those).

Let's see what your u-boot environment on both partitions looks like. Run /usr/sbin/fw_printenv | grep -A2 boot_part= on each partition and post the output. Partition 1 should report:

boot_part=1
bootcmd="run nandboot"

Parition 2 should report:

boot_part=2
bootcmd="run altnandboot"

Thank you for the help! I only have Linksys original firmware on partition 1, so I cannot run the command.

On partition 2 where I have OpenWrt I get these values:
bootcmd=run nandboot
boot_part=2

This does not seem to be in line what you expect. Should I set the bootcmd value on part 2?

Appears env variables are borked. Might try resetenv uboot env to defaults if you serial available.

change to other partition
#!/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
1 Like

Thanks! I was just looking for that :+1: Rebooting Linksys WRT3200ACM leads to the router reverting to 'default' settings - #8 by anomeome

Hi again,

there seems to be something really wrong with my device. fw_setenv command does not work, it just hangs forever. Any ideas why this might be and how to resolve it?

I would suggest:

  1. Take a backup of your current 24.10.4.
  2. Flash both partitions to Linksys stock firmware from the current linksys partition (make sure you can access both of the Linksys fw partitions)
  3. Then flash OpenWrt factory, followed by an immediate update using the current OpenWrt sysupgrade for this device.

That should get you back to normal as far as a dual partition device goes. If needed, restore your backup via the GUI.

That did the trick! Now advanced reboot and dual partitions work.

Thank you!

Actually, might have spoken too soon. Now I have OpenWrt on both partiions and boot_part and bootcmd values look correct.

However, when I am running on partition 2, I cannot flash partition 1 or switch boot partition.

fw_setenv command also does not work, so I can only switch boot partitions with the 3x power cycle trick.

What is strange is that Linksys stock firmware was able to flash partition 1 (thats how I got OpenWrt there), but now I cannot flash it anymore.

Try to think of the concept of Current Partition/Alternate Partition instead of Partition 1/Partition 2. The normal progression of running on a dual partition device is to flash from Current Partition to Alternate Partition.

You can try to return to the Current Partition and then retry the flash to Alternate Partition, but you may have to repeat the procedure I provided to get you back to square one.

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