Use tftp to write router firmware in Linux

Source: Internet
Author: User

(Take Ubuntu and Buffalo WHR-G300N V2 router as an example)

Install Ubuntu first (if you are in Windows, you can download the Ubuntu ISO file, and then use wubi to install Ubuntu, you can avoid the trouble of re-partitioning ), download Buffalo WHR-G300N V2 vro TFTP version of the firmware file, put in the/home Directory of Ubuntu, renamed rf. bin. The specific method of flashing is as follows:

1. In Ubuntu, find and access the "terminal" interface while ensuring normal access to Internet software sources;

2. Enter "sudo apt-get update" and press Enter. Enter the administrator password as prompted to update the software package information;
3. Enter "sudo apt-get install tftp" to install the tftp package;
4. Use a toothpick to hold the vro reset button for 10 seconds (if the firmware does not support the reset button, this step is meaningless );
5. Unplug the power of the router;
6. Use a network cable to connect the LAN port of the computer to the LAN port of the route (do not connect to the blue WAN port );
7. enter the "sudo service network-manager stop" (applicable to Ubuntu 10.4 or later) or "sudo service networking stop" (applicable to Ubuntu 9.10 or earlier) command, to disable the network management service of the system;
8. Enter "ifconfig" to check which Nic is connected to the vro, which is generally named "eth0;
9. Enter "sudo ifconfig eth0 192.168.11.2" and forcibly set the IP address of the NIC with the "eth0" code to 192.168.11.2 (because the default IP address in the bootloader of the Buffalo router is 192.168.11.1 );
10. Enter "sudo ifconfig eth0 netmask mask 255.255.0" and set the mask;
11. enter "sudo arp-s 192.168.11.1 XX: XX", "XX: XX, the MAC address can be found on the SSID on the label on the backend of the Buffalo router. Do not enter a colon.
12. Enter "tftp" and the prompt "tftp>" appears;
13. Enter "verbose" and the message "Verbose mode on." appears;
15. Enter "binary" and the "mode set to octet." prompt appears;
16. Enter "trace" and the message "Packet tracing on." appears;
17. Enter "rexmt 1" and try push once per second;
19. Enter "timeout 60". The push attempt time cannot exceed 60 seconds;
20. Enter "connect 192.168.11.1" to connect to the vro (in fact, there is no connection, just to prepare for the connection );
21. Enter "put rf. bin". A message indicating a failure is displayed, and a push attempt is made every second;
22. connect to the vro power, the vro will start, and the LED will light up. After about 10-20 seconds, the start push and transmission progress will be displayed. Generally, the upload will be completed soon, the system prompts push completion and transmission speed;
23. the vrorf starts to restart. The POWER and DIAG lights are on. After the DIAG lights are off, the ROUNTER lights of the vro flash and then the lights are on again. by default, WIRELESS is enabled in the bin firmware, and the WIRELESS indicator is also on.) This indicates that the firmware is successfully refreshed;
24. Enter "quit" to exit the tftp interface;
25. run the "sudo service network-manager start" command (applicable to Ubuntu 10.4 or later) or "sudo service networking start" (applicable to Ubuntu 9.10 or earlier ), to enable the system's network management service;
26. Enter "exit" to exit the terminal interface;
27. modify the IP address of the NIC to connect to the route (if RF. the binfile is from the official buffalo, the Route IP address is "192.168.11.1", the nic ip address must be "192.168.11.1xx" to connect, the user name is root, the password is blank; If RF. binfile comes from openwrt, gargoyle, DD-WRT, The Route IP is "192.168.1.1", Nic IP must be "192.168.1.1xx" to connect, DD-WRT user name and password custom, openwrt default no password, gargoyle's default password is "password ").

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.