nvram erase

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
luders
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 17
Location: California, USA

PostPosted: Tue Oct 26, 2010 3:30    Post subject: nvram erase Reply with quote
I have a asus wl500gp v2 acting as my main router. After awhile I am unable to access the web interface on it. I figured out that I could just telnet to it and reboot it to get it back up. I have reset it but not necessarily done a 30/30/30 reset. The router is actually in a different building that I dont have access to all the time. I was thinking of doing this and then setting it back up remotely....

telnet 192.168.1.1
username: root
password: admin
nvram erase
reboot

What is the nvram basically? By erasing it will the router be reset to factory settings?
Sponsor
Donny
DD-WRT Guru


Joined: 13 Nov 2008
Posts: 5266
Location: CENTRAL Midnowhere

PostPosted: Tue Oct 26, 2010 3:49    Post subject: Re: nvram erase Reply with quote
luders wrote:
What is the nvram basically? By erasing it will the router be reset to factory settings?


The jtag wiki is worth reading to explain the differences between the cfe, nvram, and kernel. But basically the nvram is where all variables are stored, such as IP addresses, passwords, configurations. Clearing it will set the router to DEFAULT configurations, by the kernel rebuilding the nvram variables to their defaults (not factory...that would be Asus variables. You have dd-wrt!)

_________________
Warning: I'm "out of my element!"
http://www.youtube.com/watch?v=MjYJ7zZ9BRw&NR=1

Peacock Thread Sticky- Just read it! (Anyone using SP1 will be taken out back and shot)
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
luders
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 17
Location: California, USA

PostPosted: Tue Oct 26, 2010 7:47    Post subject: Reply with quote
Alright... that all makes sense. I went ahead and did nvram erase and reboot via telnet and the router rebooted and came back up like nothing happened. Anyone know why that might be? I thought it was suppose to be default dd-wrt settings after that.
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3742
Location: I'm the one on the plate.

PostPosted: Tue Oct 26, 2010 9:11    Post subject: Reply with quote
luders wrote:
... I went ahead and did nvram erase and reboot via telnet and the router rebooted and came back up like nothing happened....


luders wrote:

telnet 192.168.1.1
username: root
password: admin
nvram erase
nvram commit
reboot

I added some green. Try it !

_________________
http://69.175.13.131:8015 Streaming Week-End Disco. Station Ripper V 1.1 will do.
buddee
DD-WRT Guru


Joined: 06 Feb 2010
Posts: 7386
Location: Little Rock

PostPosted: Tue Oct 26, 2010 10:37    Post subject: Reply with quote
Its...

Code:
erase nvram

reboot


This will set it back to defaults.

_________________
Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ

Having problems with port forwarding? Check out Port Forward Troubleshooting for more info.
redhawk0
DD-WRT Guru


Joined: 04 Jan 2007
Posts: 10958
Location: Wherever the wind blows- North America

PostPosted: Tue Oct 26, 2010 11:39    Post subject: Reply with quote
correct....

erase nvram is the command....or

mtd erase nvram

@GeeTek....you do NOT need to do a commit after you erase it...only if a variable has been changed.

redhawk

_________________
I currently test dd-wrt on Asus, Buffalo, Linksys, and Netgear. Too many to list.

Looking for more test units (newer models) for the project...got a brick?...PM me to make a hardware donation. (USA) A donation is not a debricking service....it is a way to "Give back" to the dd-wrt project.

I do NOT provide personal assistance through chat or phone....so please don't ask.
buddee
DD-WRT Guru


Joined: 06 Feb 2010
Posts: 7386
Location: Little Rock

PostPosted: Tue Oct 26, 2010 11:45    Post subject: Reply with quote
Good point redhawk... but to me, if your gonna use mtd, you might as well throw the reboot variable in there to make it a one liner...

Code:
mtd -r erase nvram


This way you don't even have to issue the reboot command in there at all, its all in one line Cool

_________________
Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ

Having problems with port forwarding? Check out Port Forward Troubleshooting for more info.
redhawk0
DD-WRT Guru


Joined: 04 Jan 2007
Posts: 10958
Location: Wherever the wind blows- North America

PostPosted: Tue Oct 26, 2010 11:55    Post subject: Reply with quote
Good point, buddee :lol:

Oh...and BTW...for those that don't know it...you can login to the router to reboot it also the login is

un=reboot
pw=<your password>

This will just reboot the router right from the login.
No additional commands necessary.

redhawk

_________________
I currently test dd-wrt on Asus, Buffalo, Linksys, and Netgear. Too many to list.

Looking for more test units (newer models) for the project...got a brick?...PM me to make a hardware donation. (USA) A donation is not a debricking service....it is a way to "Give back" to the dd-wrt project.

I do NOT provide personal assistance through chat or phone....so please don't ask.
ReadtheAnnouncements!
DD-WRT Guru


Joined: 02 Mar 2010
Posts: 1362

PostPosted: Tue Oct 26, 2010 12:36    Post subject: Reply with quote
Guys, don't tell a noob to use the mtd command. They should stay far from it especially if they don't understand syntax! What is the syntax that will destroy everything on the router with mtd? Isn't it mtd erase nvram or mtd nvram erase? Shocked
_________________
If I've said it once, I've must have said it a thousand times! READ the announcements at the start of the broadcom forum!
THESE:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54889
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54845
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=52043
(We'll wait....!) Wink
redhawk0
DD-WRT Guru


Joined: 04 Jan 2007
Posts: 10958
Location: Wherever the wind blows- North America

PostPosted: Tue Oct 26, 2010 12:40    Post subject: Reply with quote
ReadtheAnnouncements! wrote:
Guys, don't tell a noob to use the mtd command. They should stay far from it especially if they don't understand syntax! What is the syntax that will destroy everything on the router with mtd? Isn't it mtd erase nvram or mtd nvram erase? Shocked


the accidental command to wipe out everything is

erase mtd nvram

DO NOT USE THIS COMMAND....it will clean off your entire flash chip including the CFE....and on routers without JTAG...this would be the routers demise.


redhawk

_________________
I currently test dd-wrt on Asus, Buffalo, Linksys, and Netgear. Too many to list.

Looking for more test units (newer models) for the project...got a brick?...PM me to make a hardware donation. (USA) A donation is not a debricking service....it is a way to "Give back" to the dd-wrt project.

I do NOT provide personal assistance through chat or phone....so please don't ask.
luders
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 17
Location: California, USA

PostPosted: Fri Oct 29, 2010 7:50    Post subject: Reply with quote
So if erase nvram does the same thing as a 30/30/30 reset then why wouldnt the option in the web interface to restore factory defaults just issue the erase nvram command?
buddee
DD-WRT Guru


Joined: 06 Feb 2010
Posts: 7386
Location: Little Rock

PostPosted: Fri Oct 29, 2010 8:06    Post subject: Reply with quote
luders wrote:
So if erase nvram does the same thing as a 30/30/30 reset then why wouldnt the option in the web interface to restore factory defaults just issue the erase nvram command?


The reset to factory defaults from the webgui does issue the command, but then again there is several different ways to do this as you can see. Just use what you believe works best for you.

_________________
Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ

Having problems with port forwarding? Check out Port Forward Troubleshooting for more info.
luders
DD-WRT Novice


Joined: 09 Jul 2006
Posts: 17
Location: California, USA

PostPosted: Fri Oct 29, 2010 8:10    Post subject: Reply with quote
I guess I just dont really understand why 30/30/30 resets are recommend everywhere. They seem like a pain in the arse way of doing things.
DoesItMatter
DD-WRT Guru


Joined: 10 May 2008
Posts: 1373
Location: Pacific North West, USA

PostPosted: Fri Oct 29, 2010 8:37    Post subject: Reply with quote
The 30/30/30 was primarily for a lot of the older hardware.

Newer routers don't always respond to the reset button like the older ones did.

Some can actually be bricked with a 30/30/30 reset.

Just a warning, as I have seen it happen myself, sometimes the
'Reset to Defaults' hangs the router and a power-cycle is necessary to get back to the GUI.

It hasn't happened a lot, but it does happen occasionally.

Something to keep in mind since that remote building isn't always accessible.

_________________
Evil or Very Mad Soylent Green Is People ! Evil or Very Mad
Twisted Evil =-=-=-=-=-=-=-=-=-=-= Twisted Evil
2x Asus RT-N16 - Asuswrt-Merlin 3.0.0.4.376.47
Belkin F7D3302 - Toastman Tomato USB VPN 1.28.7505
Linksys E3000 - Toastman Tomato USB VPN 1.28.7505
-------------------------
2x Buffalo WZR-HP-G300NH V1 - OpenWRT Chaos Calmer 42830 / Gargoyle 1.6.2
TP-Link WR1043ND V1.8 - OpenWRT Chaos Calmer 42830
2x Engenius ESR900 - Stock Firmware 1.3.0 / OpenWRT Chaos Calmer 42830
ReadtheAnnouncements!
DD-WRT Guru


Joined: 02 Mar 2010
Posts: 1362

PostPosted: Fri Oct 29, 2010 13:28    Post subject: Reply with quote
DoesItMatter wrote:
The 30/30/30 was primarily for a lot of the older hardware.

Newer routers don't always respond to the reset button like the older ones did.

Some can actually be bricked with a 30/30/30 reset.



Which ones can be bricked? The only router that I am aware that can be bricked IS old hardware. wrt54gsv1.1.

The reason that the 30/30/30 reset is required is that it DOES work when the erase nvram doesn't always work. Some asus routers did not respond the the erase nvram command. People had problems with the command window. As this is an important step with dd-wrt, the method that does seem to always work is the one that has been the one that people have been asked to follow.

_________________
If I've said it once, I've must have said it a thousand times! READ the announcements at the start of the broadcom forum!
THESE:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54889
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54845
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=52043
(We'll wait....!) Wink
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum