天天看点

史上最全面的Buffalo WHR-G300N CH v2 刷OpenWrt教程

Buffalo WHR-G300N CH v2 刷OpenWrt、有两种办法、一种是Windows下刷、一种是在linux下使用tftp刷、

Buffalo WHR-G300N-CH v2的openwrt固件在这个地址下载:

<a href="http://downloads.openwrt.org/snapshots/trunk/ar71xx/" target="_blank">http://downloads.openwrt.org/snapshots/trunk/ar71xx/</a>

openwrt官方对G300N v2的支持时有时无、还没有正式支持、

由于硬件一样、我们可以下载使用WHR-G301N或者WHR-HP-G300N的固件、

而这两款路由也没有得到openwrt正式的支持、

openwrt每次会发布G301N和HP-G300N的openwrt固件、而每次发布没几天、该固件就会被openwrt取消下载、

为了提供方便、在这里我提供下载、

<a href="https://skydrive.live.com/redir.aspx?cid=64ea5fcc7735e8c6&amp;resid=64EA5FCC7735E8C6!485&amp;parid=64EA5FCC7735E8C6!475&amp;authkey=!AB-azpXhYObiNnA">squashfs-factory版</a>

<a href="https://skydrive.live.com/redir.aspx?cid=64ea5fcc7735e8c6&amp;resid=64EA5FCC7735E8C6!486&amp;parid=64EA5FCC7735E8C6!475&amp;authkey=!ANH2oa2Fu-lAGbY">squashfs-sysupgrade版</a>

<a href="https://skydrive.live.com/redir.aspx?cid=64ea5fcc7735e8c6&amp;resid=64EA5FCC7735E8C6!484&amp;parid=64EA5FCC7735E8C6!475&amp;authkey=!AFaNCg_03UYFLRY">squashfs-tftp版</a>

内核3.2.6

提前说一下、这个路由是刷不死的、不管怎样都可以用linux下tftp刷回、

Ⅰ.Windows下:

我们需要用到两个工具、

2.Telnet

Windows7默认没有开启telnet功能、在此讲述一下telnet的开启方法、

控制面板-程序-程序和功能-打开或关闭Windows功能、

把telnet服务端和telnet客户端勾选、确定、

<a href="http://zzsjlove-wordpress.stor.sinaapp.com/uploads/2012/04/telnet0.jpg"></a>

下载上面提供的sysupgrade版固件、

使用hfs挂载、挂载方法:

挂载方法:

①.打开hfs、

menu-IP Adress、选择你的路由给你电脑分配的IP地址、

(一般为192.168.1.?、图中我的即是192.168.36.2)

<a href="http://zzsjlove-wordpress.stor.sinaapp.com/uploads/2012/04/hfs-01.jpg"></a>

把固件包拖到左侧“Virtual File System”下、成为这样:

<a href="http://zzsjlove-wordpress.stor.sinaapp.com/uploads/2012/04/hfs-02.jpg"></a>

telnet或者ssh登录路由、输入以下命令:

cd /tmp  wget http://192.168.1.109/openwrt-ar71xx-generic-whr-g301n-squashfs-sysupgrade.bin                    在这里提示一下、①.可把固件名改为“1.bin”再挂载、这里的命令就可以简写了、②.这里的192.168.1.109应改为本机IP、像如图、我就应该改为192.168.36.2、  mtd -e linux -r write openwrt-ar71xx-generic-whr-g301n-squashfs-sysupgrade.bin linux

(附固件改名后菜鸟命令:

wget http://192.168.1.109/1.bin  mtd -e linux -r write 1.bin linux

等待画面显示失去主机连接后、

等待1分钟、待power和router亮起、说明刷机成功了、下面我来讲linux下刷路由教程、刷好后却不能打开配置页面我将在另一篇文章中详细描述、

<a href="http://zzsjlove.diandian.com/2012/04/whr-g300n-v2-openwrt-luci/" target="_blank">http://zzsjlove.diandian.com/2012/04/whr-g300n-v2-openwrt-luci/</a>

Ⅱ.Linux下(以ubuntu为例):

下载tftp版固件(上文有提供下载)、

同样还是建议把固件名改为1.bin

把固件放入ubuntu的主文件夹(home)、

先把ubuntu联网、怎么联网我就不赘述了、

安装tftp

在终端中输入:

sudo apt-get update  sudo apt-get install tftp

在终端中输入

ifconfig

查看你的网卡哪个是本地网卡、如果是虚拟机用户看清楚哪个是连接虚拟机与主机的网卡、哪个是直接连接路由器的网卡、

用网线连接电脑网口与路由LAN口、

在终端输入:

sudo service networking stop                                              Ubuntu 9.10用户用这个命令、  sudo service network-manager stop                                    Ubuntu 10.4或以上系统用这个命令、 
sudo ifconfig eth0 192.168.11.2                                     必须是这个IP段、即使你已经改了路由的IP、这里你还是必须要配置本地网卡为192.168.11.?、eth0是本地网卡、上文有提到要注意、  sudo ifconfig eth0 netmask 255.255.255.0                      (此步可以省略)  sudo arp -s 192.168.11.1  AABBCCDDEE5F                    ‘AABBCCDDEEFF’改为你的路由器mac地址(在路由器背面有标签)、可加冒号也可不加、

拔掉路由电源、

在终端输入

tftp  tftp&gt; verbose  提示Verbose mode on.  tftp&gt; binary  提示 mode set to octet.  tftp&gt; trace  提示 Packet tracing on.  tftp&gt; rexmt 1  tftp&gt; timeout 60  tftp&gt; connect 192.168.11.1  tftp&gt; put 1.bin

这时立即插上路由器电源、待ubuntu显示正在推送固件、然后推送完成、会等待输入、

输入

quit

退出tftp

exit

退出终端、

等待路由重启完成、亮起power与router、刷机完成、

刷机后在浏览器输入 192.168.1.1并不能正常打开、我会在另一篇文章中详细解说、

PS:ubuntu下tftp刷路由的方法可以刷回官方固件、

PS:openwrt下刷回官方只能用tftp的方法、而openwrt下刷回DD-wrt可以用这个固件:

<a href="https://skydrive.live.com/redir.aspx?cid=64ea5fcc7735e8c6&amp;resid=64EA5FCC7735E8C6!713&amp;parid=64EA5FCC7735E8C6!538&amp;authkey=!ALJuzmRII4XMO6Y" target="_blank">whr-g300nv2-openwrt-to-dd.bin</a>

用这个固件在op下页面升级到dd、

刷到DD后建议reset一次、或者再刷DD的更新版本即可、

继续阅读