Linksys WRT32x: transfer from DD-WRT to OpenWRT + OEM. Solved by noob

Solved by noob.

I had: Linksys WRT32x with DD-WRT (v3.0 44715) in both (!) parttitions.

Task: to get newest ver. of OpenWRT (23.05.5) on one partition and OEM on other.

Problem: DD-WRT do not write OEM or OpenWRT firmware by using standart "Firmware update" from web GUI. It doing something but after reboot I have DD-WRT again. To use "mtd" for direct writing to partition I did not find "special prepared" venom.img firmware file.

Solved.
I used "mtd" to write factory OpenWRT firmware.

Now step-by-step for noobs (Like I am :upside_down_face: )

Prepare: check you have WinSCP and PuTTY programs for Windows. Download OpenWRT ver. 18 or 19 factory firmware (I used ver. 18.06.9: "openwrt-18.06.9-mvebu-cortexa9-linksys-wrt32x-squashfs-factory.img") and rename firmware file to "venom2.img" for simple use.
Enable SSH in DD-WRT GUI: Services Tab - Services Sub Tab - Secure Shell Section - SSHd (Enable).
Run WinSCP and login to WRT32x: Protocol - SCP, Hostname: IP of your WRT32x, Username: root, Password: your DD-WRT admin password.
By WinSCP upload to WRT32x to folder /tmp file "venom2.img". Close WinSCP.
Run PuTTY and login to WRT32x: Hostname: IP of your WRT32x, Port: 22, SSH, Telnet. Use Username: root, Password: your DD-WRT admin password when asked.
Check partitions set by SSH command: cat /proc/mtd (for info only, not necessary step). You have to see:

root@WRT32X:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00020000 00020000 "u_env"
mtd2: 00040000 00020000 "s_env"
mtd3: 005c0000 00020000 "unused_area"
mtd4: 00040000 00020000 "devinfo"
mtd5: 07b00000 00020000 "linux"
mtd6: 07800000 00020000 "ubi"
mtd7: 07b00000 00020000 "linux2"
mtd8: 07700000 00020000 "rootfs2"
mtd9: 00040000 00020000 "nvram"
mtd10: 00100000 00020000 "BBT"

Our "targets" are "linux" or (not and!!!) "linux2" partition. You do not need write both simultaneously (and never do it!!!). If something going wrong better to have DD-WRT router then bricked one.
Now check what partition is active right now: use SSH command ubootenv get boot_part In the end you can see "1" or "2". And "1" is active "linux", "2" is - "linux2". We will write our firmware in other (not active!!!) partition. It meens: if you have active partition "1", write to "linux2" and vice versa.
Now write our uploaded "venom2.img" (we remember - it is old version OpenWRT firmware).
Use SSH command:
mtd -e linux write /tmp/venom2.img linux
or (!!!)
mtd -e linux2 write /tmp/venom2.img linux2

Now set writed partition active: "1" for writed "linux" or "2" for writed "linux2". Use SSH command:
ubootenv set boot_part 1
or (!!!)
ubootenv set boot_part 2

Now clear NVRAM (useful for booting in OEM in future) and reboot. Use SSH command: nvram erase && reboot

If you have done all right you'll boot in old version of OpenWRT. Why did we use old version for first firmware update? Because only old version (befor ver. 20?) is able to write OEM to WRT32x. Newer can not do it right.
Now you have OpenWRT old version on active partition and DD-WRT on other one.
Download OEM firmware (I used last one: "FW_WRT32X_1.0.180404.58.img").
Use LuCI GUI to update firmware to downloaded OEM. Router will update and reboot. Now you have OEM firmware on active partition and old OpenWRT on other one (bye bye DD-WRT!!! :rofl:). Now first of all use "Reset" button for having realy clear OEM. After rebooting pass thrue "First set" steps to have working router.
Download last factory OpenWRT firmware for WRT32x. Use OEM GUI to update router to newest OpenWRT factory firmware. Router will reboot. Now you have new OpenWRT on active partition and OEM on other one.

Be happy! :grinning:

2 Likes

Reverting from dd-wrt is not handled here. Surprisingly revert is not clearly documented at dd-wrt.

Transition to OpenWRT from any other firmware is good reason to write here. OpenWRT + OEM = "Gold standard" for Linksys WRT series now.

2 Likes

FYI, I flashed openwrt..-factory.img through latest dd-wrt webif 2 days ago, at least on the WRT1200AC this worked fine.

What ver. of OpenWRT did you use?

The power led for wrt series is broken on any build that uses kernel 6.6, there was a regular expression change in the led gpio parsing code, upstream has it correct, But the patch in openwrt was taken over from previous patches, that add aliases.

I never had problems with power led in OpenWRT on my WRT1900AC, WRT1900ACS, WRT3200ACM and WRT32x - it works like with OEM. It is problem that row "Power - USB2" leds are not so bright like "LAN" are, but it is problem in any firmware, is'nt it?

Then you are not using a build with kernel 6.6, such as 24.10-rc or snapshot build.
Openwrt 23.05 comes mich older kernel.

Now I have tested my WRT32x for transfer DD-WRT ---> OpenWRT using web GUI again.
I write from OpenWRT (1st partition) using LuCI DD-WRT v3.0 44715 on 2nd partition and reboot to DD-WRT (2nd partition).
I use DD-WRT web GUI to update to "openwrt-18.06.9-mvebu-cortexa9-linksys-wrt32x-squashfs-factory.img"
DD-WRT says me it is updated successful and reboot.
After reboot I can see my previous firmware (OpenWRT v.23) from 1st partition from wich I have updated to DD-WRT.
It meens DD-WRT writed nothing but only change boot partition.
And it meens if you had OpenWRT on other partition befor - you returned to it but DD-WRT write nothing.
After I was trying to update from DD-WRT to OpenWRT ver.19 and ver.23 (other ver.) by using web GUI: and again DD-WRT write nothing but change boot partition.
And if you have DD-WRT on both partition you can not use web GUI to transfer from DD-WRT to OpenWRT on WRT32x.
P.S.
M.b. I'll have time to test it with other WRT routers (1200ACv2, 1900AC, 1900ACS, 3200ACM)

Yes, I did not test v.24 yet. Do not know if I need it now - it is still very "young".

very young? It is the stable release, not yet 100% available but the -rc2 is very stable, now the rc3 and rc4 are available too

I'll wait for all_led_working release :stuck_out_tongue_winking_eye:
And if he is serious: yes, it is too "young" for my 24/7 tasks.

Everything lives in master snapshot builds for testing before being tagged to a stable release; i.e. the only thing young is the tag, not the code.

1 Like

Yes and No.
Yes, it's stable now.
No, not all bugs were detected. Some of them might not be serious (pwr led for example). Some of them might not be so small.
I'll wait some more.

bug free software is simply software with bugs yet to be identified. You seem to not understand the development process.

2 Likes

Yes, I understand this process very good :slight_smile:
It's why I can use v.24 only for testing now but not for 24/7 tasks.

Now I have tested with WRT3200ACM tranfer DD-WRT ---> OpenWRT v.23 and it is work from GUI without any problems. You have tested WRT1200AC and it has no problem too.
It seems that only the WRT32X has problems. M.B. it is due to the non-standard partition size on the WRT32X.

1 Like

No idea about DD-WRT, but OEM == OpenWrt == 6MB

Yes, the WRT32X has a firmware that is different from other WRTxxxx: it is smaller, has different functionality and is based on a later version of OpenWRT. It even has an open SSH.
And this can even be seen from the sizes of the firmware files:
FW_WRT1200ACV2_2.0.6.191786_prod ~30MB
FW_WRT1900ACS_1.0.3.187766_prod ~32MB
FW_WRT1900ACSV2_2.0.3.201002_prod ~33MB
FW_WRT3200ACM_1.0.8.199531_prod ~42MB
FW_WRT32X_1.0.180404.58 ~10MB

Conflate much.

1 Like