What's the story behind 'nvram commit'? Has it changed?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
jimj
DD-WRT Novice


Joined: 18 Oct 2015
Posts: 35
Location: Sioux Falls SD

PostPosted: Sat Jul 24, 2021 0:22    Post subject: What's the story behind 'nvram commit'? Has it changed? Reply with quote
On the Hardware - DD-WRT Wiki page the nvram commands are explained, including:
Code:
nvram set <variable_name>="<value>"
Change variable value in RAM only
Now you can play with the new settings or test user scripts but this new value will be lost after reboot unless you do nvram commit
and
Code:
nvram commit
Save all changed variables to NVRAM

So based on these two descriptions you MUST run 'nvram commit' after running 'nvram set' if you want your settings to survive a reboot. However, I've never needed to run 'nvram commit'. Anything I configure via 'nvram set' is always saved and always survives a reboot. How could this be?
  1. Do some 'nvram set' variables get saved automatically and not others?
  2. Is there a cron job that frequently runs 'nvram commit' for you?
  3. Did 'nvram commit' used to be needed, but it's no longer needed and the wiki is simply outdated?
  4. Is the behavior I'm seeing is a platform specific quirk? I've only played with command line (CLI) configuration on a Netgear R7800 router starting with build r44719 (currently using r47086).

_________________
R7800 v3.0-r47086 std (07/22/21)
set "tcp_tw_recycle" to 0
Sponsor
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sat Jul 24, 2021 1:05    Post subject: Reply with quote
"on reboot (or any other action) the nvram is saved to mtd from RAM"
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Sat Jul 24, 2021 1:21    Post subject: Reply with quote
Nothing like a carryover from your other thread. I'm feeling nice at the moment, and apparently that wiki needs some editing...
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
jimj
DD-WRT Novice


Joined: 18 Oct 2015
Posts: 35
Location: Sioux Falls SD

PostPosted: Sat Jul 24, 2021 1:30    Post subject: Reply with quote
blkt wrote:
"on reboot (or any other action) the nvram is saved to mtd from RAM"

Thanks blkt, I think I finally understand. If I run 'nvram set' and want to back out the change I could simply pull the power cord to roll back (as long as I haven't done anything else that would save the config). Likewise if you want to ensure your 'nvram set' commands are saved you should run 'nvram commit' (although clicking "Apply Settings" or rebooting should work too).

kernel-panic69 wrote:
Nothing like a carryover from your other thread. I'm feeling nice at the moment, and apparently that wiki needs some editing...

Thanks kernel-panic69. Lots of great info in Hardware - DD-WRT Wiki, but the saving bit did confuse me. It all makes sense now though.

_________________
R7800 v3.0-r47086 std (07/22/21)
set "tcp_tw_recycle" to 0
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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