Thibor 081005 build - how to clean NVRAM?

Discussion in 'HyperWRT Firmware' started by SirDracula, Oct 9, 2005.

  1. SirDracula

    SirDracula Network Guru Member

    Hello Thibor (and others),

    First of all, nice job on static DHCP.

    1) After the static DHCP changes for this version, I'm wondering if there's a way to get rid of *all* old variables from NVRAM that are not being used by the current version of the firmware. For example, I still had static_lease[1-5] in there which I unset manually. Resetting to factory defaults doesn't get rid of them. Is there another way to remove variables that don't apply to the current firmware or what is the proper way to apply a firmware upgrade so that the old NVRAM variables are completely gone? I know it's not a big deal to have 5 extra variables in there that are not being used, but switching between various firmwares and versions may create some garbage which will pile up.

    2) Also, would it be possible to remove the requirement to type static_lease in front of each lease? I assume the code could just add it for each line ... Unless that form is intended to enter other options for udhcpd too, in which case it's fine to leave it in there, but a hint line would help.

  2. Toxic

    Toxic Administrator Staff Member

    You tried the 30 second reset button proceedure?
  3. PaCkEtGrEmLiN

    PaCkEtGrEmLiN Network Guru Member

    The following as proved helpful when experimenting with various firmware flavours.

    erase nvram;reboot
    Use at your discretion
  4. SirDracula

    SirDracula Network Guru Member

    What's the exact procedure, please? Holding the button while powering up, etc.? Thanks.

    As for 'erase nvram' - what exactly does it do? Will the firmware be able to write back the entries it needs? Also, does it need a 'nvram commit' after the erase? Thanks.
  5. jagboy

    jagboy Network Guru Member

    nvram erase;reboot will clear the nvram. i dont think that it needs a nvram commit.
  6. Toxic

    Toxic Administrator Staff Member

    nvram erase did NOT clear my DDWRT variables in HypwerWRT firmware. you have to do a hard reset (press reset for 30 seconds) to clear ALL old variables and install the present firmwares variables.

    You will loose ALL settings, however you will make sure your settings are not using old firmware variables as well.
  7. SirDracula

    SirDracula Network Guru Member

    'nvram erase' does NOT do anything. In fact 'nvram blah' runs without errors, except it doesn't do anything (substitute anything you want for blah, except for get|set|unset|show|commit and maybe others which are valid nvram commands).

    You should run:

    /sbin/erase nvram
    or simply 'erase nvram'

    Type just 'erase' to see the usage:

    # erase
    usage: erase [device]
    Yes, it's easy to get confused between 'nvram erase' and 'erase nvram' but only the latter does what you want.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice