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 )
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!!! ). 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!