[SOLVED] WRT32X back to stock Firmware

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page 1, 2, 3, 4, 5  Next
Author Message
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Mon Jul 30, 2018 19:02    Post subject: [SOLVED] WRT32X back to stock Firmware Reply with quote
Hi,
I have Linksys WRT32X
How can I back to factory firmware from dd-wrt ?


Last edited by sufgi123 on Tue Jul 31, 2018 17:01; edited 1 time in total
Sponsor
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Mon Jul 30, 2018 23:16    Post subject: Reply with quote
If you haven't overwritten the stock partition you can switch back with the 3x power switch method or via Telnet / SSH commands.
For the WRT32X the commands are:
fw_printenv boot_part
* This will give a 1 or 2
fw_setenv boot_part 1
or
fw_setenv boot_part 2
* Use opposite number returned from first command.

EDIT: I forgot to include that the above commands are for while on the stock OpenWrt Venom firmware.
While on DD-WRT the commands are:
ubootenv get boot_part
then
ubootenv set boot_part 1
or
ubootenv set boot_part 2

If you have overwritten the stock firmware the steps are a bit more complex. This was posted a while back:

ghoffman wrote:
i've spent a number of hours over the past two weeks trying to get dd-wrt on and off a wrt32x. to summarize:

stock -> ddwrt works by gui (flashes other partition) AND by mtd write (summarized above; pick your partition)

stock-> openwrt/lede works by ssh and sysupgrade (probably works by gui but i didnt try)

openwrt -> stock works by ssh/mtd write.

ddwrt -> stock: i had to enable ssh, then flash both mtd5 and mtd7 partions with stock flat firmware file, AND erase nvram partition (mtd erase nvram), then power cycle router. i cant completely explain why, but i think the ddwrt nvram values make openwrt or stock firmware hang, and issing the 'reboot' command at the ddwrt command line re-writes nvram. anyway, only by completely getting rid od ddwrt could i get back to stock.

so: from stock, you can get lede on one partition and dd-wrt on the other.
from dd-wrt: you have to get rid of dd-wrt remanants everywhere to get back to stock or lede.

the quick way to get back to a 'clean' setup is from serial, using the 'run update_both_images' uboot command. i think by flashing both mtd5 and mtd7 with stock, and earsing nvram, this accomplishes the same thing, without serial access.

short story - it's currently hard to get from dd-wrt back to stock, but it can be done without serial access.

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure


Last edited by spuriousoffspring on Tue Jul 31, 2018 4:22; edited 1 time in total
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 2:37    Post subject: Reply with quote
I think I have written over the stock.
Can you explain by details how to back to stock firmware with links to files I need.

Thank you
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 4:17    Post subject: Reply with quote
I attached the flat stock Venom image. Also here's a link to help with MTD info:
https://wiki.openwrt.org/doc/techref/mtd

I haven't personally tried the aforementioned method. However, I can confirm the attached file does successfully flash via USB-TTL Serial Cable.

Unless you are absolutely sure of what you are doing I would not recommend going any further!

The safest approach may be to wait and see if Brainslayer can add a 'return to stock' feature in one of the next DD-WRT builds.

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 4:54    Post subject: Reply with quote
Thank you for trying helping me.
It's new for me and I need instruction step by step what to do.
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 5:44    Post subject: Reply with quote
Like I said I haven't verified this for myself and there is a good chance of soft-bricking your WRT32X.
Use at your own risk.

Read the entire thread before you begin

First, enable SSH in DD-WRT GUI Services Tab - Services Sub Tab - Secure Shell Section - SSHd (Enable)

Second, download and install PuTTY and WinSCP (assuming you are using a Windows PC)
PuTTY:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
WinSCP:
https://winscp.net/eng/index.php

PuTTY & WinSCP login credentials:
User Name is always: root
Password is: your dd-wrt admin password

Third, use WinSCP to copy the venom.img (attached to last post) to /tmp on your WRT32X.

Forth, open PuTTY and SSH into router

The commands you will need to enter:

erase nvram
mtd -r -e kernel1 write venom.img kernel1

EDIT: Correct commands are:
mtd -e linux -r write /tmp/venom.img linux
mtd -e linux2 -r write /tmp/venom.img linux2

I highly recommend you get a USB-TTL cable. It is the only way to recover your WRT32X if something goes wrong.
https://www.adafruit.com/product/954

Good Luck!

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure


Last edited by spuriousoffspring on Mon Sep 03, 2018 18:14; edited 1 time in total
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 8:34    Post subject: Reply with quote
Great, Thank you
I will try later
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 9:03    Post subject: Reply with quote
I just re-read @ghoffman's instructions and I forgot he says to flash both partitions.
After the first commands above you would also need to enter:
mtd -r -e kernel2 write venom.img kernel2

* You will have to copy the venom.img file with SCP again beforehand as it is erased after each reboot.

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 10:40    Post subject: Reply with quote
Thank you
After both commands I should reboot the router ?
or I need to reboot it after each command and do it again for second kernel ?
Can I keep dd-wrt in 1 partition and factory in other, and switch between them ?
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 10:57    Post subject: Reply with quote
That's what the -r in the command is for. However, if the router does not reboot then just enter the command reboot
_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 11:00    Post subject: Reply with quote
FYI: While on the stock Venom firmware or OpenWrt the command to reset is:
firstboot
reboot

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 14:23    Post subject: Reply with quote
Hi,
I enter "mtd -r -e kernel1 write venom.img kernel1"
and get "Could not open mtd device: kernel1
Can't open device for writing!"

What to do ?
spuriousoffspring
DD-WRT Guru


Joined: 05 Apr 2017
Posts: 981
Location: Louisiana, USA

PostPosted: Tue Jul 31, 2018 14:52    Post subject: Reply with quote
That could be my mistake.
Try the command this way:
mtd -e kernel2 -r write venom.img kernel2

_________________
DD-WRT Installation & Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=311117

WRT32X DD-WRT Installation Procedure
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315569

IPVanish OpenVPN Client Setup TUTORIAL
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308565

FIRMWARE: OpenWrt SNAPSHOT r8217-2cc821e / LuCI Master (git-18.276.41146-280dd33)
MODEM: ARRIS SURFBoard SB8200
ROUTER: Linksys WRT32X
USB NAS: Western Digital BLACK 1 TB Hardrive + Startech USB 3.0 External SATA III Enclosure
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 14:57    Post subject: Reply with quote
now I can't connect the router through WinSCP.
I get "The server rejected SFTP connection"

and when I copied the img file, there was no tmp directory, I have made a new one.
sufgi123
DD-WRT Novice


Joined: 17 Apr 2015
Posts: 13

PostPosted: Tue Jul 31, 2018 15:11    Post subject: Reply with quote
I found the tmp directory and do it all again, but still get the error "Could not open mtd device: kernel1
Can't open device for writing!"
Goto page 1, 2, 3, 4, 5  Next Display posts from previous:    Page 1 of 5
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum