You can see that in system log. Search for this string:
- lfbb
Thanks again for your help....
My system logs showning....
Jan 1 02:00:10 kernel: _nvram_init: allocat header: 2280783872, size= 65536
And still i am on old CFE 1.0.1.2.
So maybe asus did the trick on newer versions of Fw and upgraded the nvram to 64k without change the version header on CFE.
assuming you have 1.0.1.2 cfe in cfe_old.bin:
1. extract nvram from the origianl cfe to nvram.txt, using offset autodetection
2. edit nvram.txt as you like (replace bl_version and add odmpid, for example)
3. prepare new 1.0.1.3 cfe with no nvram embedded
4. install modified nvram.txt into new cfe, using offset 0x400 and length 4092 (suitable for 1.0.1.3 cfe)
5. do something on your own with cfe_new.bin
yes, these sdram* values are reserved in header and may not appear in embedded nvram, if not used.
- lfbbet0macaddr=XX:XX:XX:00:7D:30 ->main
pci/2/1/macaddr=XX:XX:XX:00:7D:34 ->5GHz
pci/1/1/macaddr=XX:XX:XX:00:7D:30 ->2.4GHz
Roger, I was looking into my nvram variables and you're right about the MACs.
- lfbb
Roger, did you ever figure out what < Ate_power_on_off_ret=2 is about?
Using a different linux distro did not make a difference. Still got that extra line. The first time I did this, I installed ubuntu as dual boot on my laptop, now I am doing it using a live cd.
I wonder if that makes any difference. I removed the Ubuntu install after the last conversion, maybe I should install it again?
You should not run the script, the nvsimple included has bugs
Here is an updated one: http://forums.smallnetbuilder.com/showpost.php?p=53840&postcount=272
$ ./cfe_update.sh cfe.original cfe.new
[1/4] Dumping default NVRAM settings from your CFE...
nvram start 0x400
nvram end 0x13e8
nvram len 4052
nvram crc 0xcb
nvram ver 0x01
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
4092+0 records in
4092+0 records out
4092 bytes (4.1 kB) copied, 0.177994 s, 23.0 kB/s
[4/4] Checking differences between NVRAM from old and new CFE's
4c4
< bl_version=1.0.1.2
---
> bl_version=1.0.1.3
177c177
< wait_time=3
---
> wait_time=?????
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.
ate_power_on_off_enable=4
Ate_power_on_off_ret=2
ate_reboot_log=1,2,
bl_version=1.0.1.2
boardflags=0x00000110
boardflags2=0x00000000
boardnum=00
boardrev=0x1100
boardtype=0xF5B2
boot_wait=on
clkfreq=600,300,150
....
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
odmpid=RT-N66R
....
#!/bin/sh
if [ -z $1 ] || [ -z $2 ]; then
echo "Usage: "$(basename $0)" cfe.old cfe.new"
exit 1
fi
echo [1/4] Dumping default NVRAM settings from your CFE...
./nvsimple $1 > nvram.txt
echo [2/4] Modifying NVRAM settings \(silent step\)...
sed -i 's/bl_version=1.0.1.2/bl_version=1.0.1.3/g' nvram.txt
sed -i 's/odmpid=RT-N66R/odmpid=ASUS/g' nvram.txt
# echo "odmpid=ASUS" >> nvram.txt
echo [3/4] Creating new CFE...
start=1024
count=4092
dd if=/dev/zero of=$2 bs=1 seek=$start count=$count
./nvserial -i cfe_n66u-1.0.1.3.empty.bin -o $2 -b $start -c $count nvram.txt
echo [4/4] Checking differences between NVRAM from old and new CFE\'s
./nvsimple $1 2>/dev/null | sort > nvram.old
./nvsimple $2 2>/dev/null | sort > nvram.new
diff nvram.old nvram.new
echo If you see only two differences: one is for \'bl_version\' and second is a new \'odmpid=ASUS\' variable then all step are done! New CFE image \'$2\' is prepared for flash.
# rm nvram.txt nvram.old nvram.new
$ ./cfe_update.sh cfe.original cfe.new
[1/4] Dumping default NVRAM settings from your CFE...
nvram start 0x400
nvram end 0x13e8
nvram len 4052
nvram crc 0xcb
nvram ver 0x01
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
4092+0 records in
4092+0 records out
4092 bytes (4.1 kB) copied, 0.184513 s, 22.2 kB/s
[4/4] Checking differences between NVRAM from old and new CFE's
4c4
< bl_version=1.0.1.2
---
> bl_version=1.0.1.3
20c20
< odmpid=RT-N66R
---
> odmpid=ASUS
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.
Okay, new idea. I've extracted my current cfe (1.0.1.3) on my router. If the only thing wrong with it is this:
vlan1ports=1
in the nvram.txt that I got using nvsimple-32 (the latest version), why can't I just change this to:
vlan1ports=1 2 3 4 8*
and then put it back into the blank 1.0.1.3 cfe (cfe_n66u-1.0.1.3.empty.bin) and go from there with a cfe that I'm pretty sure will have the right MAC addresses, secret_code, etc. that will work with my router?
Would this work? Seems easier and safer for those of us (probably just me, actually *smile*) that don't have their cfe.original or cfe.old.
Is there anything that I haven't thought of or am not aware of?
Sounds good to me, anyways.
Thanks.
./nvsimple-32 --install nvram.real.mod.txt cfe.real.mod -o 0x400 -l 4092 -v
nvram header created:
start 0x400
end 0x1368
len 3944
crc 0xe2
ver 0x01
Are you able to access the CFE miniWeb Server?I flashed the cfe.new image onto the pmon MTD block and everything worked fine. I make no guarantees that this will work on all RT-N66Rs, but it worked for me.
Yes I was *just* looking at that. I did this before the code was updated. I believe my CFE recovery is bricked... I was just lucky that I didn't need it. I am going to download the new code and fix my CFE.Are you able to access the CFE miniWeb Server?
- lfbb
strings cfe.new | grep vlan1
vlan1ports=1
vlan1hwname=et0
landevs=vlan1
manolis@manolis-laptop:~$ ./cfe_update.sh cfe.bin cfe.new
[1/4] Dumping default NVRAM settings from your CFE...
nvsimple 0.2b (c) theMIROn
nvram start 0x400
nvram end 0x1388
nvram len 3956
nvram crc 0x58
nvram ver 0x01
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
4092+0 records in
4092+0 records out
4092 bytes (4.1 kB) copied, 0.0723049 s, 56.6 kB/s
[4/4] Checking differences between NVRAM from old and new CFE's
1c1
< bl_version=1.0.1.2
---
> bl_version=1.0.1.3
16a17
> odmpid=ASUS
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.
manolis@manolis-laptop:~$
admin@(none):/tmp/home/root# strings /dev/mtd0ro | grep bl_version
bl_version=1.0.1.3
Are you able to access the CFE miniWeb Server?
- lfbb
Damn, I'm having problems with that. When I press 'reset+power on' the router enters rescue mode but I can't access it via 192.168.1.1I am able to access the CFE miniWeb Server and no problem to report so far....
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!