Safe to run MTD ERASE NVRAM on WRT610n?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7020

PostPosted: Sat Aug 07, 2010 2:32    Post subject: Reply with quote
redhawk0 wrote:


does the erase command just remove the variable strings...where mtd removes the string and the variable clearing the partition completely?



Yes the nvram erase command will keep the nvram structure (header, checksum, length) in the nvram area but will erase the variables.

The mtd command will erase a flash partition (containing one or more flash sectors depending on which partition it is) leaving the partition data set to FF's (flash erase state).

I am of the opinion that nvram erase is the standard command to use and that the mtd command should only be used if the nvram variables are so trashed that the nvram erase command can't find the variables and therefore fails to erase them.

The mtd command can also be used when changing the size of the nvram area (converting a 320 or 610v2 into an E2000/E3000) to get rid of the previous nvram structure.

It is not a command to be used for normal nvram variable erasing, it is not the first command to use.
You don't format your hard disk when you want to get rid of a few files..
Sponsor
Peabody
DD-WRT Guru


Joined: 28 Dec 2009
Posts: 1517

PostPosted: Sat Aug 07, 2010 4:19    Post subject: Reply with quote
And, if you get the syntax wrong with mtd, I understand you will be jtagging....
_________________
I fix "shortcuts". If you don't have time to read thoroughly, I don't have time to re-type what you missed.
uncle bob
DD-WRT User


Joined: 31 Aug 2008
Posts: 148

PostPosted: Sat Aug 07, 2010 9:37    Post subject: Reply with quote
socal87 wrote:

Actually yes, it's quite annoying. Proper grammar and detailed explanations work wonders. Though I understand if English is not your native language.


LOL man get out of sun NOW Smile
And yes yoo doo not need 30x3 neither Peacock to flush router How yoo lika meine Unglishe now Razz
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7020

PostPosted: Sat Aug 07, 2010 12:35    Post subject: Reply with quote
uncle bob wrote:

LOL man get out of sun NOW Smile
And yes yoo doo not need 30x3 neither Peacock to flush router How yoo lika meine Unglishe now Razz


Oh, you are such a tough guy.
I guess you also kill mosquitoes with a shot-gun, just so you can show people that you have a shot-gun..
redhawk0
DD-WRT Guru


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

PostPosted: Sat Aug 07, 2010 13:29    Post subject: Reply with quote
Peabody wrote:
And, if you get the syntax wrong with mtd, I understand you will be jtagging....


Yes...this is correct....I've trashed the flash chip by using the mtd command in the wrong order.

IF you must use the mtd command to clear the nvram partition the syntax is

mtd erase nvram



IF you reverse the "erase" and "mtd" it will blow away the chip data and you MUST use jtag to recover.

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 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.
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 12746
Location: Behind The Reset Button

PostPosted: Sat Aug 07, 2010 14:14    Post subject: Reply with quote
redhawk0 wrote:
Peabody wrote:
And, if you get the syntax wrong with mtd, I understand you will be jtagging....


Yes...this is correct....I've trashed the flash chip by using the mtd command in the wrong order.

IF you must use the mtd command to clear the nvram partition the syntax is

mtd erase nvram



IF you reverse the "erase" and "mtd" it will blow away the chip data and you MUST use jtag to recover.

redhawk


I can confirm that Twisted Evil

Also.. MTD may erase partitions that are hidden & protected and should not be erased. Factory partition on a wrt600, board data on a wndr3300, etc..

Another thing I screw up.. Telnet or cammands tab.. the command is "erase nvram" Using serial at the cfe prompt. The comand is reversed.. "nvram erase"

BTW.. I was looking for what the switches do.. -f , -r, etc. Couldn't find any info. Anyone got a link to shed some additional light on the subject?

_________________
[Moderator Deleted] Shocked
buddee
DD-WRT Guru


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

PostPosted: Sat Aug 07, 2010 14:21    Post subject: Reply with quote
barryware wrote:
redhawk0 wrote:
Peabody wrote:
And, if you get the syntax wrong with mtd, I understand you will be jtagging....


Yes...this is correct....I've trashed the flash chip by using the mtd command in the wrong order.

IF you must use the mtd command to clear the nvram partition the syntax is

mtd erase nvram



IF you reverse the "erase" and "mtd" it will blow away the chip data and you MUST use jtag to recover.

redhawk


I can confirm that Twisted Evil

Also.. MTD may erase partitions that are hidden & protected and should not be erased. Factory partition on a wrt600, board data on a wndr3300, etc..

Another thing I screw up.. Telnet or cammands tab.. the command is "erase nvram" Using serial at the cfe prompt. The comand is reversed.. "nvram erase"

BTW.. I was looking for what the switches do.. -f , -r, etc. Couldn't find any info. Anyone got a link to shed some additional light on the subject?


MTD recognizes these commands:

unlock unlock the device


erase erase all data on device

write <imagefile>|- write <imagefile> (use - for stdin) to device


Following options are available:

-q quiet mode (once: no [w] on writing,
twice: no status messages)


-r reboot after successful command

-f force write without trx checks

-e <device> erase <device> before executing the command

Also i am unsure if this MTD version specific, there are different versions of MTD and i do not know if the newer versions bring any different variables with them.

Edit: i am looking into version differences now, will post back if i find anything.

_________________
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.
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
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