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.. _________________ Kernel panic: Aiee, killing interrupt handler!
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.
LOL man get out of sun NOW
And yes yoo doo not need 30x3 neither Peacock to flush router How yoo lika meine Unglishe now
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.. _________________ Kernel panic: Aiee, killing interrupt handler!
Joined: 26 Jan 2008 Posts: 13049 Location: Behind The Reset Button
Posted: Sat Aug 07, 2010 14:14 Post subject:
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
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]
Joined: 06 Feb 2010 Posts: 7401 Location: Little Rock
Posted: Sat Aug 07, 2010 14:21 Post subject:
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
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.