Bekijk de volledige versie : nvram, nvram_x
Hi,
Here is my problem:
I configure WL-500g for with my setting (start dropbear after boot, some iptables mods...etc)
then i save my config via web interface.
When I try to restore config after reseting wl-500g, bootCmd, and dss entry wasn't in my nvram (nvram show|more)
When i config file, dss and bootCmd entries was there.
i try to config manualy again, and save with nvram_x fget,
and restore with nvram_x fset....The same result
But when i create entry something like 9_x_bootCmd, and save config with web, or nvram_x, resotration work fine.(but bootCmd doesn't work of course)
Am I doing something wrong, or this is bug???
Could someone take a look at this.
I use FW 1.6.5.3-5
Thanks a lot
Why you're trying to use nvram_x instead of nvram? Yes, there is a real difference between them in way how they treat variable names, so 9_x_bootCmd will never work, because rc.nvram does not expect this.
I need to make complete backup of my settings from nvram.
And when I restore it, all settings are restored except bootCmd and dss entries.
I don't know why at this time.
I though the nvram binary was accessing /dev/mtd/4, basically like flashfs, but it turns out that it uses /dev/nvram. Looking at the nvram_linux.c code on both user and kernel side, I do not quite understand what's going on.
E.g. it seems the nvram size is 32KB, but the nvram partition is 64KB.
Where did the factor of 2 go?
Does anybody know if the nvram is used by something else than /usr/lib/libnvram.so? I'm thinking of merging the flashfs and nvram partitions into a 128KB jffs2 partition and reimplement libnvram.so to store its data in a plain old filesystem.
64k is just the page size of some flashes. You cant remove nvram completely - pmon uses it to boot linux.
I'm currently implementing a system based on the WL500g platform and I'd like to store some data, preferably surviving power-offs. So NVRAM is the thing to use, and it works. However, I know that NVRAM can be flash-like memory that has a limited lifetime, related to the number of writes. Does anybody know what kind of memory is used as NVRAM in the WL500g?
I'm thinking of using files in /tmp and only use NVRAM as a backup to store data less frequently. But maybe this is not necessary? :)
Hi
Since NVRAM resists inside the Flash Memory it has some 1000 write cycles. This is enough for normal configuration files which are not changes more than every some days, you can calculate it for yourself how long it will survive :).
Modern ones like in the 500g have a guranteed 10000 cycles lifetime, mostly much more since thy gurantee it over the complete temperature range which is normaly not used in home envoirements (+85°C).
Greets
Hehe, what are you developing ?
I´m just curious :rolleyes:
Unfortunately I cannot tell you. Company secret ;)
Unfortunately I cannot tell you. Company secret ;)
Thought a forum like this was meant to help each other and share information and knowledge.
Thought a forum like this was meant to help each other and share information and knowledge.
What I'm doing with the WL500g is completely irrelevant for other people. I asked something about NVRAM, got a reply, and that might be valuable info for other people as well. That's what counts.
What I'm doing with the WL500g is completely irrelevant for other people. I asked something about NVRAM, got a reply, and that might be valuable info for other people as well. That's what counts.
Strictly speaking: you can't be the judge of that ;)
:D Getting back on topic. :D
:confused: Just wondering, what is the ASUS definition of NVRAM?
AFAIK NVRAM is battery backed up SRAM or in a less strict definition also a CMOS or an EEPROM
NVRAM stands for Non Volatile Random Access Memory. So it can be a lot of different types of memory as long as its non-volatile and random access. This includes battery backed SRAM and harddisks as well.
The NVRAM in the Asus WL-500g is a seperate section of the flash space available. 32k is used and the page size is 64k.
Info: http://wl500g.info/showthread.php?t=809
I have a lama question to ask. I got a Asus 500g and I would like to do following changes 16_x_FIsFtpServer=0, wan_ifname=ppp0. I have used nvram set wan_ifname=ppp0; nvram commit. However, I still get old values after reboot. Can anyone tell me where I make a mistake? Is it hard coded somewhere without a change to change it?
Best regards
Jamie Poz.
Hi,
I would like to know if every setting I can set up on Oleg's firmware is set in nvram value, and if so, is it possible to do a manual backup and restore.
I would like to go back from a mixed state configuration set and also to do a kind of configuration switch?
Everything accessible via web interface is stored in the nvram.
but how can you make a backup restore in one operation? Do I have to script the nvram command, or can I use a /dev/mtd in some way?
after searching, there is some info about nvram_x, but this utility looked buggy and does'nt exist anymore. Do I have to script all value to save and restore nvram, or is there a new command to do so?
Just use built-in save/restore configuration function. I think this should be enough for you.
yes, but it doesn't work on Wl-Hdd. I get a WLHDD.cfg file with 0k size.
On wl500 version (when I was testing it before your actual version for wl hdd), it was working.
Also, this method ask for a browser. I would need a telnet way, as I will be using non standard browsers.
Well, you can play dangerous game with nvram then:
cat /dev/mtd/3 > /tmp/nvram.bin
should backup whole nvram
flash /tmp/nvram.bin /dev/mtd/3
reboot
should bring it back.
Is there a command I can use to remove entries from nvram?
I have UPnP entries that have been storded to nvram that I would like to remove. I find them with this command:
nvram show | grep forward_port
I could of course reset to factory default, but I'd rather not...
S.
Is there a command I can use to remove entries from nvram?
I have UPnP entries that have been storded to nvram that I would like to remove. I find them with this command:
nvram show | grep forward_port
I could of course reset to factory default, but I'd rather not...
S.
nvram unset var_name or smthg similar should work, I believe.
HTH
Roofcat
Antiloop
16-03-2005, 13:49
nvram unset var_name or smthg similar should work, I believe.
HTH
Roofcat
indeed that will work
also
nvram set var_name should work to erase the entry
after doing this do a commit
nvram commit
Thx! That works, and now I'm working on a script like this:
#!/bin/sh
i=$1
while [ $i -le $2 ]
do
nvram unset port_forward$i
i=$i + 1
done
but I keep getting
./clearUPnP: 8: +: not found
What gives??
S.