Tomato命令大全
文章来自 山隈的博客 // 树欲静而风不止,子欲养而亲不待。。。
主页
|
About Me
|
归档
标签
Tomato命令大全 备份整个nvrom: nvram export --set 中文ssid: nvram set wl1_ssid="永林干货-5G" nvram commit BCM NAT加速技术: modprobe bcm_natdmesg | grep BCM 如果看到了BCM for NAT :INIT 即表示挂载OK。 修改默认地区: nvram set wl_country_code=US nvram set wl0_country_code=US nvram set wl1_country_code=US nvram set wl0_country=US nvram set wl1_country=US nvram set pci/1/1/ccode=US nvram set pci/2/1/ccode=US nvram set regulation_domain=US nvram set regulation_domain_5G=US nvram commit 查看路由cpu信息: cat /proc/cpuinfo 清除nvrom: 输入 mtd -r erase nvram 或 mtd-erase -d nvram 两个区别是什么我也不知道 (当打完指令后,Telnet 会提示和路由器切断连线,因为路由找不到 NVRAM 了。路由这时会自动重启系统去建立新的 NVRAM,这时候千万别切断电源,静等几分钟,直到可以用 Telnet 重新登陆上路由器为止。特别注意:如果在此期间切断了电源,路由会由于没有正确的 NVRAM 而变砖,甚至用 RESET 键也都无法恢复)。 3. 输入 nvram commit (执行完上面一步后,因为新建的 NVRAM 只是暂时保存在内存中,如果不用本命令的话,一旦你切断了电源,路由会由于没有正确的 NVRAM 而变砖,甚至用 RESET 键也都无法恢复。为了保险起见,该命令执行完成后请静待10秒再执行下步)。 4. 输入 reboot 重启路由。 常用的 nvram 指令有以下 4 种: 1. nvram show 列出 NVRAM 内所有参数,我们亦可以用 grep 命令来抽取部份资讯,例如 nvram show | grep lan_ 这命令列出了所以用 lan_开头的参数,结果如下: lan_gateway=192.168.1.254 dr_lan_rx=0 lan_netmask=255.255.255.0 lan_lease=86400 lan_stp=1 lan_hwaddr=00:12:17:E1:56:F5 lan_dns=211.152.179.7 202.96.128.86 lan_ifnames=vlan0 eth1 size: 12567 bytes (20201 left) lan_ipaddr=192.168.1.1 lan_proto=static lan_ifname=br0 lan_wins= lan_hwnames= 2. nvram set 参数=数值 用来添加或修改一些参数,例如我想把 LAN 的 IP 由 192.168.1.1 改为 192.168.1.2,可执行: nvram set lan_ipaddr=192.168.1.2 nvram commit reboot 第 1 行是修改 IP 地址,第 2 行是保存,第 3 行是重新启动 OpenWrt ,因为更改 IP 地址后要重启才能生效。 3. nvram unset 参数 用来删除一些参数,不过这个功能很少用到,因为 NVRAM 的 64K 容量足够保存大量参数,大部份人都赖得去删。 例如我想删除“dr_lan_rx=0”这个参数,请执行: nvram unset dr_lan_rx 4. nvram commit 当你对 NVRAM 做了一大堆修改后,你需要把这些修改保存起来,否则你的路由器 RESET 后,这些修改便没有了,和上面一样,这时你要执行: nvram commit mtd -erase nvram nvram commit reboot 如果不行,就刷上openwrt,然后执行以上命令 好了之后再用bootwait刷回dd-wrt就可以了 回到dd-wrt启动时候,按住reset button启动,去web gui把reset button支持关掉,保存,重启 =============================================== WVR纯DD清nvram,刷tomato 1、进入管理界面点开升级界面。 2、进入TELNET管理后输入“mtd -e nvram erase nvram”再执行“nvram commit”这是保存, 3、到你刚点开的升级界面,选择TOMATO的固件, 4升级吧,现在你就可以进入西红柿了(用户名和密码和DD的一样)。 以上操作不用REBOOT。 对第2台WVR进行了升级,必须得恢复到默认设置(好像只有4116 http://www.dd-wrt.com/phpBB2/viewtopic.php?t=5033&start=45 也就是10.10日的版本可以恢复出厂默认)后再进行上面1-4的操作。 我的WAN口接了设备,这时也不行,要拨下来,才可以进入到西红柿。 其实tomato能清除nvram的原因不是它能同时写入到dual nvram,而是它把main part给清除了再把自己的默认数据写了进去,reboot以后pmon检测主备均正常,然后把主拷贝到备里面~~~ 而dd呢,把main擦除了,希望交给pmon来写入默认值,但pmon发现虽然main无效了,但是sub 还是好的,so就把sub给拷贝到main了~~ linux驱动加载命令和驱动模块信息查看 驱动操作命令: insmod / modprobe 加载驱动 rmmod 卸载驱动 lsmod 查看系统中所有已经被加载了的所有的模块以及模块间的依赖关系 modinfo 获得模块的信息 查看已经加载的驱动模块的信息: lsmod 能够显示驱动的大小以及被谁使用 cat /proc/modules 能够显示驱动模块大小、在内核空间中的地址 cat /proc/devices 只显示驱动的主设备号,且是分类显示 /sys/modules 下面存在对应的驱动的目录,目录下包含驱动的分段信息等等。 dmesg命令 dmesg用来显示开机信息,kernel会将开机信息存储在ring buffer中。您若是开机时来不及查看信息,可利用dmesg来查看。
Pre:
魔兽争霸秘籍
Next:
RouterOS软路由常用命令
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
No Leanote account? Sign up now.