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 boom. 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 the NetXin Cloud Old Mother Hen and Raspberry Pi. As of 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 chosen carefully.
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-port physical machine
Installation process:
1. Enter the PE environment: - Open WeiPE, install it into 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. Different motherboards have different keys to enter the BIOS, so it is recommended to try them all if unsure.
2. Format the hard drive and write the image
- Enter the PE environment, you can see a software called "Partition Assistant", open it and format the target host's hard drive; 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 image writing tool and write the openwrt package to the hard drive, 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 environment; the system will start running at this time.
Note that Esir firmware does not run codes, 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.
Postscript: The open-source world also has systems such as DD-WERT 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