Introduction: openwrt is a free and highly compatible embedded Linux distribution. As an essential tool for software router players, it can achieve various functions such as ad blocking, multi-dialing, and circumventing censorship. This article uses the installation of openwrt on the X86 platform as an example to introduce its deployment process.
Why X86?
Whether as a main router or a side router, traditional routers are not suitable for use as software routers due to their low frequency and small memory. NAS-software router integrated devices also have the risk of all-in-one failure. Therefore, it is recommended to use the X86 platform as a physical machine. Of course, you can also use the armbian platform or development boards such as WNC's old mother hen or Raspberry Pi. At the time of writing this article, the prices on the second-hand market are not very favorable: the price of a J1900 platform is often around 200, and dedicated multi-port industrial control machines range from 200 to 1000. Raspberry Pi has become a financial product, so it needs to be carefully selected.
Preparation
- Compilation package of openwrt, three classic versions compiled by eSir:
https://drive.google.com/drive/folders/1uRXg_krKHPrQneI3F2GNcSVRoCgkqESr - PE boot disk, here I recommend WeiPE: https://www.wepe.com.cn/download.html
- Image writing tool: https://www.roadkil.net/program.php?ProgramID=12#google_vignette
- A USB flash drive and a dual NIC physical machine
Installation process:
1. Enter the PE environment: - Open WeiPE, install it on the USB flash drive, and put the ing tool and openwrt package into it after installation.
- Insert the USB flash drive into the target host, enter the BIOS-boot to set the USB flash drive as the priority boot device. The key to enter the BIOS varies for different motherboards. If unsure, it is recommended to try them all.
2. Format the hard disk and write the disk
- Enter the PE environment, you can see a software called "Partition Assistant", open it and format the hard disk of the target host; be careful not to partition! Do not partition! Do not set the file system! Otherwise, compilation may not be possible in the future!
Click the submit and execute button in the upper left corner
- Open the img writing tool and write the openwrt package to the hard disk, be careful not to write it to the USB flash drive.
3. Enter the configuration interface
- Restart the system and quickly remove the USB flash drive to avoid re-entering the PE; the system is now running.
Note that Esir firmware does not require activation, so there is no need to worry.
- When you see the prompt "please press Enter to activate this console", the system installation is complete. You can use the passwd command to set a password. The software router will automatically obtain an IP address, and then we can open the address in a browser to see the Lucl interface.
Afterword: The open-source world also has systems such as DD-WRT and Tomato. Just as the development of the Internet is not smooth sailing, OpenWRT has also experienced setbacks, such as core developers leaving and launching LEDE and other twists and turns. After the merger of LEDE and OpenWRT in 2018, through the unremitting efforts of many developers, OpenWRT now has a rich and complete ecosystem.
Official Wiki: https://openwrt.org/zh/start