What's new

Deleting bogus nvram setting

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

hafizullah

Occasional Visitor
ASUSWRT-Merlin RT-AC68U 386.3_2

I overclock this router with clkfreq=1250,850 and there's no problems except that I auto-reboot it every Sunday and the setting doesn't hold. Haven't been able to figure out how to script this, so I just telnet into the unit and issue the command to set clkfreq.

However, I did this before coffee one time, and apparently typed
nvram set nvram clkfreq=1250,850

So now there's a bogus command "nvram clkfreq=1250,850" and the setting can't be deleted because I can't quote or escape the space in the setting.

It's probably not hurting anything, but it is annoying.

Any suggestions will be appreciated, and thanks in advance.
 
So nvram unset "nvram clkfreq" doesn’t work?
 
I doubt your nvram command is actually having any effect as those are not valid numbers for that variable. Asus locked down the clock speeds anyway, even if you did use valid numbers.
 
Last edited:
Code:
toaruScar@RT-AX88U:/tmp/home/root# nvram set var\ with\ spaces=set
toaruScar@RT-AX88U:/tmp/home/root# nvram set "yet another var with spaces=set"
toaruScar@RT-AX88U:/tmp/home/root# nvram commit
toaruScar@RT-AX88U:/tmp/home/root# nvram dump | grep spaces
var with spaces=set
yet another var with spaces=set
size: 74129 bytes (56943 left)
toaruScar@RT-AX88U:/tmp/home/root# nvram unset var\ with\ spaces
toaruScar@RT-AX88U:/tmp/home/root# nvram unset "yet another var with spaces"
toaruScar@RT-AX88U:/tmp/home/root# nvram commit
toaruScar@RT-AX88U:/tmp/home/root# nvram dump | grep spaces
size: 74077 bytes (56995 left)
These are some of the ways to set and unset variables with spaces in them.
 
I doubt your nvram command is actually having any effect as those are not valid numbers for that variable. Asus locked down the clock speeds anyway, even if you did use valid numbers.
nvram show | grep clk
shows the values as 1250,850 for as long as the router is up, but are reset to default upon reboot.
 
Code:
toaruScar@RT-AX88U:/tmp/home/root# nvram set var\ with\ spaces=set
toaruScar@RT-AX88U:/tmp/home/root# nvram set "yet another var with spaces=set"
toaruScar@RT-AX88U:/tmp/home/root# nvram commit
toaruScar@RT-AX88U:/tmp/home/root# nvram dump | grep spaces
var with spaces=set
yet another var with spaces=set
size: 74129 bytes (56943 left)
toaruScar@RT-AX88U:/tmp/home/root# nvram unset var\ with\ spaces
toaruScar@RT-AX88U:/tmp/home/root# nvram unset "yet another var with spaces"
toaruScar@RT-AX88U:/tmp/home/root# nvram commit
toaruScar@RT-AX88U:/tmp/home/root# nvram dump | grep spaces
size: 74077 bytes (56995 left)
These are some of the ways to set and unset variables with spaces in them.
I think I tried all of these.
Embedded the setting in quotes: no joy.
Escaping the space with a whack: no joy.
Used both unset and set to nul. No joy.
 
This may be a long shot, but did the file system on your router become read-only?
Can you create a file on your /jffs folder?
 
nvram show | grep clk
shows the values as 1250,850 for as long as the router is up, but are reset to default upon reboot.
Just because you're changing that variable doesn't mean it's doing anything. It's a purely cosmetic change. If you want to verify the actual CPU speed issue this command:
Code:
cat /proc/cpuinfo
and then divide the BogoMIPS number by 2.
 
Just because you're changing that variable doesn't mean it's doing anything. It's a purely cosmetic change. If you want to verify the actual CPU speed issue this command:
Code:
cat /proc/cpuinfo
and then divide the BogoMIPS number by 2.
Thx! BogoMIPS/2 is 797.9... so setting the variable isn't doing anything.
 
So what is the actual output of nvram show | grep clk
 
Can you post the output of these commands please:
Code:
nvram show | grep "clk" | hexdump -C

nvram show | grep -n "clk"
 
Last edited:
Can you post the output of these commands please:
Code:
nvram show | grep "clk" | hexdump -C

nvram show | grep -n "clk"
murshid@Qutb:/tmp/home/root# nvram show | grep "clk" |hexdump -C
-sh: hexdump: not found


murshid@Qutb:/tmp/home/root# nvram show | grep -n "clk"
size: 58287 bytes (7249 left)
1713:clkfreq=1250,850
1846:nvram clkfreq=1200,800
 
murshid@Qutb:/tmp/home/root# nvram show | grep -n "clk"
size: 58287 bytes (7249 left)
1713:clkfreq=1250,850
1846:nvram clkfreq=1200,800

Well, here's another shot.
What's the output of the following commands?
Bash:
NVRAM_CMD1='eval nvram show 2>/dev/null | grep "[ ]*clkfreq"'
$NVRAM_CMD1 ; expr length "$($NVRAM_CMD1)"

NVRAM_CMD2='eval nvram show 2>/dev/null | grep "nvram[ ]*clkfreq"'
$NVRAM_CMD2 ; expr length "$($NVRAM_CMD2)"

Make sure to type the single quotes when settings the variables.
 
Well, here's another shot.
What's the output of the following commands?
Bash:
NVRAM_CMD1='eval nvram show 2>/dev/null | grep "[ ]*clkfreq"'
$NVRAM_CMD1 ; expr length "$($NVRAM_CMD1)"

NVRAM_CMD2='eval nvram show 2>/dev/null | grep "nvram[ ]*clkfreq"'
$NVRAM_CMD2 ; expr length "$($NVRAM_CMD2)"

Make sure to type the single quotes when settings the variables.
No output to console for the first command.

Second command returned
Code:
nvram clkfreq=1200,800
Code:
 
No output to console for the first command.

Second command returned
Code:
nvram clkfreq=1200,800
Code:
There seem to be some "missing pieces" in your reply.
Can you instead post a screenshot of your console window showing the suggested commands & their results?
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top