OpenWrt Forum Archive

Topic: Unable to set new values in NVRAM of WRT160NL

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I am using openwrt backfire version on the Atheros based linksys WRT160NL.
For accessing NVRAM on the board, i am using the "nvram" utility configured during "make menuconfig".
The "nvram" utility does allow to view all the variables on NVRAM.
But it doesn't seem to set  new values/variables to NVRAM
since "nvram commit" command fails with the below error:

mtdblock: erase of region [0x0, 0x10000] on "nvram" failed.


I would be grateful if anyone could suggest a means to set new name/values in the NVRAM.


root@OpenWrt:/tmp# nvram set UNITID=7
root@OpenWrt:/tmp# nvram get UNITID
7
root@OpenWrt:/tmp# nvram commit
root@OpenWrt:/tmp# nvram get UNITID
No output

Hi,

I am not sure if you solved your issue yet but I recently encountered this issue and this is what I did to resolve it.

(this is a copy from my notes)

mtdblock: erase of region [0x0, 0x10000] on "nvram" failed

***(Assuming you already installed openwrt previously)***

1. plug ethernet cable into routers Internet port
    - do ifconfig just to make sure you have a valid ip or just ping google.com
2. go into router through putty (if you haven't setup serial port on your router then just google wrt54g serial port setup)
3. do this:
    %> cd /tmp
    %> wget http://downloads.openwrt.org/backfire/1 … uashfs.trx
    %> mtd write openwrt-brcm47xx-squashfs.trx linux && reboot
   
    !!!VERY IMPORTANT!!!
    (at this point don't touch the power or anything and let the system do its thing)

The discussion might have continued from here.