GL.iNet router flashing openwrt 22.03.2 system

Flash the GL.iNet router and install the latest openwrt system

It is an artifact of system flashing, with low price, excellent performance and U-boot startup that is immortal after hundreds of flashes. It is more suitable for novice users to toss around.
When I first started flashing the router system, I was a little confused. I didn’t know which system and version I should flash! Later, after some exploration, I came up with an idea. In fact, flashing the router is not as difficult as imagined!
The router is built-insystem, because the router CPU is different, the system is also different. For example(MediaTek.Inc) MT7660 series CPU needs to be flashed with Linux system firmware that supports MT7660.

Download and install the openwrt firmware system

View firstFor the CPU model, you need to flash the corresponding Linux system firmware. The Linux system firmware is usually a .bin file.
Download the latest firmware from the official openwrt official website:https://openwrt.org/
As of October 30, 2022, the firmware version has been upgraded to,Click to download OpenWrt 22.03.2 firmware, to upgrade. The following uses OpenWrt 19.07 as an example. The methods of flashing firmware are similar. Download the latest version of the firmware and flash it.
Go to the firmware download page and find the appropriateThe latest firmware for your router.Click to enter the firmware download page of the openwrt system
Since there are many firmwares, press Ctrl+F on the browser page to search for keywords., there is the latest firmware download on line 326.

19.07.2 Firmware upgrade address:http://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/openwrt-19.07.2-ath79-generic-glinet_gl-ar150-squashfs-sysupgrade.bin

19.07.7 Firmware upgrade address:http://downloads.openwrt.org/releases/19.07.7/targets/ath79/generic/openwrt-19.07.7-ath79-generic-glinet_gl-ar150-squashfs-sysupgrade.bin

22.03.2 Firmware upgrade address:https://downloads.openwrt.org/releases/22.03.2/targets/ath79/generic/openwrt-22.03.2-ath79-generic-glinet_gl-ar150-squashfs-sysupgrade.bin

After downloading the firmware, start flashing the router!

Step 1: Connect the router to the computer

Set the network card on the computer to 192.168.1.2 gateway 255.255.255.0, no other settings are needed.
On the network connection page, select the network card you want to set, right-click Properties-Properties-Protocol version 4 (TCP/IPv4) attributes, confirm after modification!

Use a network cable to connect to the LAN port of the AR150 router. Note that it is a LAN port. Also, don’t plug in the wrong network card port of your computer. The network card port must be set to the IP of 192.168.1.2.
according toPress key + R key to switch out of the running window and enter ping 192.168.1.1 -t


Ping the router's IP in the command line window, and then start setting up the router. Here are some tips. I tried it several times at the beginning without success.
After the router is connected to the computer, do not turn on the power first. Press and hold the RESET button on the router. Note, be sure to hold it down and don't release it.
After pressing and holding the RESET button, plug in the power supply. After plugging in the power supply, the green light will turn on. Then the red light next to it started flashing regularly. Note here that immediately release the RESET button after the red light flashes 5 times. After the recovery is successful, the red light flashes quickly several times, then goes out, and the green light stays on.
After the red light flashes quickly and goes out, the address 192.168.1.1 on the screen can be pinged successfully.

Step 2: Flash the openwrt firmware into the router

Visit http://192.168.1.1 in the browser, and you can now enter the u-boot flash page.

Click Select File, select the firmware file you downloaded on your computer, and click Update firmware

Next, wait 2-3 minutes for the router firmware system to be flashed.
This is a brand new openwrt19.07 system. After installing the system, there are still many things that need to be set. Also install the software package.

In addition, a compiled OpenWrt firmware system is introduced

If you don't want to bother with this, there is also a firmware system compiled by a master, which is all set up.The software installation space of ar150 is relatively small, and it only provides entry-level technical exchanges. If you want to install other software, you need to mount USB storage.

OpenWrt R9.3.7 By Lean

The source code comes from Lean,address:https://github.com/coolsnowwolf/lede

Login information: 192.168.10.1 Username: root Password: password (I feel this is related to your flashing method. I used the original uboot to flash, the address is 192.168.1.1)
Use putty orWait until the router is connected and enter:
echo 0xDEADBEEF > /etc/config/google_fu_mode
To enable hidden functions, please refer to the picture below (screenshot taken from the USB150 version):

Just to selflessly share it with those in need. I haven’t used it personally at the moment. I just compiled it when a friend in the community left a message and asked me if I needed this.
Router model: GL-inet AR150 AR300M MT300N
Note: AR150 chip is AR9331, AR300M is AR9531, MT300N is 7628NN
The basic functions are as shown in the figure. I compiled the rosy theme version of several GL-inet routers by myself. Friends in need can download it.

Network disk link: https://pan.baidu.com/s/1nTqQ-NLqtp0PAHOOqzR7CA
Extraction code: avq9

How to use OpenWrt to mount USB and install software on the USB flash drive

Refer to the official documentation for mounting USB:https://openwrt.org/docs/guide-user/storage/usb-drives-quickstart

If the memory of your router is relatively small and the installation space is not that large, you can consider mounting a USB flash drive as system storage. In this way, you don’t have to worry about the size of the software when installing software packages on the USB flash drive.

First you need to update the software list:

Step 1: Install the software required to mount the USB

Install kmod-usb-ohci USB chip driver.kmod-usb2,kmod-usb3 USB2.0, USB3.0 driver.kmod-usb-storage,kmod-usb-storage-extraUSB,kmod-usb-storage-uasStorage driver.block-mount,blockedMounting program (after installation is completed and restarted, the mount point option will appear under the system in the LuCI interface).
kmod-fs-ext4,kmod-fs-vfat,ntfs-3g,kmod-fs-ntfsThey are ext4 partition format support, FAT partition format support, and NTFS partition format support.kmod-fs-ntfIt is the kernel driver for NTFS.

Software that needs to be installed:

  • kmod-usb-ohci
  • kmod-usb2
  • kmod-usb3
  • kmod-usb-core
  • kmod-usb-storage
  • kmod-usb-storage-extras
  • kmod-usb-storage-uas
  • block-mount
  • blocked
  • kmod-fs-msdos
  • kmod-fs-ext4
  • kmod-fs-vfat
  • kmod-fs-ntfs
  • ntfs-3g
  • e2fsprogs
  • cfdisk
  • hd-idle
  • luci-i18n-hd-idle-zh-cn
  • smartmontools

It can be installed in the system's operation interface or installed on the router through SSH. After the installation is completed, restart the router.

opkg update opkg install kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-usb-core kmod-usb-storage kmod-usb-storage-extras kmod-usb-storage-uas block-mount blockd opkg install kmod-fs-msdos kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs ntfs-3g e2fsprogs cfdisk hd-idle luci-i18n-hd-idle-zh-cn smartmontools

Step 2: Set mount point

First format the U disk, convert the U disk to the ext4 system, SSH to the router, and use the command to format the U disk into the ext4 system. If e2fsprogs has not been installed before, you need to install e2fsprogs to format the USB flash drive. Check the /dev/ directory to see the USB flash drive. If the USB disk has only one partition, the OpenWrt system will automatically identify it as /dev/sda1

ls -al /dev/sd* mkfs.ext4 /dev/sda1 block detect | uci import fstab uci set fstab.@mount[0].enabled='1' && uci set fstab.@global[0].anon_mount=' 1' && uci commit fstab /sbin/block mount && service fstab enable # Restart the router after setting up

Create a new mount point

In the LUCI interface of Openwrt, go to System -> Mount Point, click Add at the mount point, and mount using UUID. This ensures that the correct startup hard disk is always mounted after restarting. In this way, you can configure the U disk to be automatically mounted. Select /overlay as the mount point and confirm, click Save and Apply.

After restarting the router, the USB disk was mounted successfully. You can see that among the mounted file systems, /dev/sda1 has been mounted on /overlay.

The system enters the USB disk system mode. At this time, it is the factory settings of the system, and the required software sources and packages need to be reinstalled. Install the software under the U disk system, LUCI management interface and under the Linux system. Just install everything normally.

Regarding the swap partition, after the mount point is configured, a swap file can be generated on the parent system as a swap partition. Next, reboot and enter the new subsystem of the USB flash drive.

Enable swap partition

In the subsystem of the U disk, reinstall the mount point related software, then SSH the router and create a new swap file in the system, with a size of 200MB as the swap partition. Please wait patiently while creating a new swap partition.
SSH into the router and enter the following command to create a new swap partition:

# Create a new swapfile swap partition dd if=/dev/zero of=/overlay/swap bs=1M count=500 # Check whether the creation is successful du -sh /overlay/swap ls -lh /overlay/swap # empower chmod 600 /overlay /swap # Set swapfile as swap space mkswap /overlay/swap # Enable swap space swapon /overlay/swap # Check whether to add swap partition free -h # If the command is not installed, you need to install the sudo command okpg install sudo # Set up auto-start echo '/overlay/swap swap swap sw 0 0' | sudo tee -a /etc/fstab

If you want to delete the swap partition, you need to close the swap partition first and then delete it.

swapoff /overlay/swap rm /overlay/swap

Configure swap partition

On the OpenWrt management page, System->Mount Point, Swap Partition->Click New, select Custom in the device, and then enter our above generated swap file /overlay/swap , check the enable option above and save the application.

If the swap area of the virtual memory does not take effect after restarting and free -m does not display the swap partition, you can click System>Startup Items>Local Startup Script in the LUCI interface and add the command to open the swap partition.

swapon /overlay/swap

Okay, now we have completed mounting the USB flash drive and setting up the swap partition.

About the differences between "NTFS", "FAT32", "exFAT" and file systems

FAT32

The 32-bit file allocation table [File Allocation Table: FAT] is called "FAT32". There are also "FAT16" and "FAT12" depending on the number of bits, but the main FAT these days is 32bit.

This file system is primarily used in Windows 98/Me, but later operating systems continue to support it. It works with the latest version ofCan be used together withUsed with other operating systems such as Linux.

If you format a "64GB" USB flash drive as "FAT32", according to Windows specifications, only up to "32GB" capacity will be recognized. According to the "FAT32" standard, it can certainly handle 2TB, but if you want to format a storage device with a capacity larger than 32GB on Windows, you will have to use a third-party formatter.

NTFS

NT File System [NTFS] is the standard file system of the Windows NT series and is currently the mainstream file system of Windows.

Since it is an NT system, it can be used with Windows NT or higher operating systems (2000/XP or higher), but it cannot be used with Windows 95, Windows 98, etc.

NTFS can theoretically manage 2 64 -1 cluster volumes (up to 16 EB), but this is also limited by computer performance.

However, for a cluster size of "2048 KB", Version 1709 and later supports up to "8 Petabytes (PB)" (along with the file size). "Peta" is 1000 times stronger than "Tera". Supports extradimensional capabilities, albeit limited.

Some new recording devices support "4KB" sector sizes, allowing large-capacity devices to be managed more efficiently if both the operating system and storage device support 4K natively.

exFAT

exFAT [Extended File Allocation Table] is an improved file system based on traditional FAT.

File system optimized for flash memory devices such as USB flash drives and SD cards.

The biggest advantage is that it supports large disk and file sizes. If you're using the latest Windows, it supports "volumes up to 512TB" and "files up to 128PiB", so you can think of few practical limitations for general use.

If you want to use an external HDD/SSD (like an extended drive) on your computer without moving it, you can set it to "NTFS" without any problem. When connecting, formatting using "exFAT" instead of "NTFS" may manage data more efficiently.

However, despite being named FAT, it is not compatible with regular FAT32, so exFAT cannot be used on devices that only support FAT32.

"exFAT" is also compatible with Apple's MacOS, so "exFAT" is the most likely candidate when it comes to sharing storage devices with Windows and Mac.

If it's NTFS, MacOS may not read it well. "FAT32" is also supported, but as expected, the data capacity limit is strict, so if you deal with large amounts of data, "exFAT" will be a safe choice.

 

Configure OpenWrt operating system

Next, continue to install the official version of openwrt19.07. After the openwrt19.07 system is installed, start logging into the system. Enter http://192.168.1.1 in the browser to enter the system login interface.

The default password for the user name root is empty. Click login directly to log in to the management interface.
After entering the openwrt19.07 system management interface, the first step is to set a password. The system interface is still in English, and you need to download a language pack.
Click Administration under System to enter the password setting interface, enter the password you need to set after password, and then enter the password again to confirm. Click Save to save.

You can also use remote tools to log in to the router's system and use the passwd command to change the password.
Insert the network cable of the upper router into the WAN port of the AR150 and ensure that the network cable can connect to the Internet.
For example, if you have a Huawei router at home, connect the LAN port of the Huawei router to the WAN port of the AR150 using a network cable. The IP address obtains the internal IP of the Huawei router by default through DHCP.
Next, install the language pack. Click SoftWare under System to enter the software installation interface. After entering, click Update lista…

Install domestic software sources

Now we start to update the software sources. Since the software sources of OpenWRT are all abroad, the speed is extremely slow. It takes a long time to update the list. Fortunately, there are openwrt software source images in China, and they are images from famous universities. This one is not afraid of failure!
Use the mirror update address of domestic software sources instead. Click ConfigureOPKG and delete the contents of opkg/distfeeds.conf.

Copy the domestic software source into it:

Tsinghua University openwrt 19.07.2 software source

src/gz openwrt_core https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.2/targets/ath79/generic/packages src/gz openwrt_kmods https://mirrors.tuna.tsinghua.edu.cn /openwrt/releases/19.07.2/targets/ath79/generic/kmods/4.14.171-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.2/ packages/mips_24kc/base src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.2/packages/mips_24kc/luci src/gz openwrt_packages https://mirrors.tuna.tsinghua. edu.cn/openwrt/releases/19.07.2/packages/mips_24kc/packages src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.2/packages/mips_24kc/routing src/ gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/19.07.2/packages/mips_24kc/telephony

After clicking save, click Update lista... to update the software source. Now you can use domestic software sources to install software packages.

4.14.171-1-342af9e4f67b3447c53216ab8e3b12a1 and 4.14.171-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d are different versions of the kernel. If a kernel error is prompted during software installation, please change the corresponding software source! Here we introduce the software source of another famous university, which you can choose to use based on the system kernel.

Tsinghua University openwrt 21.02.1 software source

Software source address:https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/

src/gz openwrt_core https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.1/targets/ath79/generic/packages src/gz openwrt_kmods https://mirrors.tuna.tsinghua.edu.cn /openwrt/releases/21.02.1/targets/ath79/generic/kmods/5.4.154-1-79c5dc6db69102eb2943a96b9bec8b63 src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.1/ packages/mips_24kc/base src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.1/packages/mips_24kc/luci src/gz openwrt_packages https://mirrors.tuna.tsinghua. edu.cn/openwrt/releases/21.02.1/packages/mips_24kc/packages src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.1/packages/mips_24kc/routing src/ gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/21.02.1/packages/mips_24kc/telephony

University of Science and Technology of China openwrt 19.07.2 software source

Software source address:https://mirrors.ustc.edu.cn/openwrt/releases/

src/gz openwrt_core https://mirrors.ustc.edu.cn/lede/releases/19.07.2/targets/ar71xx/generic/packages src/gz openwrt_kmods https://mirrors.ustc.edu.cn/lede/releases /19.07.2/targets/ar71xx/generic/kmods/4.14.171-1-342af9e4f67b3447c53216ab8e3b12a1 src/gz openwrt_base https://mirrors.ustc.edu.cn/lede/releases/19.07.2/packages/mips_24kc/base src /gz openwrt_luci https://mirrors.ustc.edu.cn/lede/releases/19.07.2/packages/mips_24kc/luci src/gz openwrt_packages https://mirrors.ustc.edu.cn/lede/releases/19.07. 2/packages/mips_24kc/packages src/gz openwrt_routing https://mirrors.ustc.edu.cn/lede/releases/19.07.2/packages/mips_24kc/routing src/gz openwrt_telephony https://mirrors.ustc.edu. cn/lede/releases/19.07.2/packages/mips_24kc/telephony

Coolsoft openwrt software source

Install the Kusoft software source under ssh, download the Kusoft certificate and install it!

wget -O kuoruan-public.key http://openwrt.kuoruan.net/packages/public.key opkg-key add kuoruan-public.key

Add the following cool software source code to the custom software source in the openwrt background

src/gz kuoruan_packages https://openwrt.kuoruan.net/packages/releases/mips_24kc/ src/gz kuoruan_universal https://openwrt.kuoruan.net/packages/releases/all/

During the process of switching software sources, sometimes you will encounter an error that the software cannot be updated.

Collected errors: opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.

Could not lock /var/lock/opkg.lock solution:

echo "nameserver 114.114.114.114">/tmp/resolv.conf rm -f /var/lock/opkg.lock opkg update

Fat House Garden software source v21.02.1

openwrt default software source

src/gz openwrt_core https://downloads.openwrt.org/releases/21.02.1/targets/ath79/generic/packages src/gz openwrt_kmods https://downloads.openwrt.org/releases/21.02.1/targets/ath79 /generic/kmods/5.4.154-1-79c5dc6db69102eb2943a96b9bec8b63 src/gz openwrt_base https://downloads.openwrt.org/releases/21.02.1/packages/mips_24kc/base src/gz openwrt_luci https://downloads.openwrt.org /releases/21.02.1/packages/mips_24kc/luci src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.1/packages/mips_24kc/packages src/gz openwrt_routing https://downloads.openwrt.org /releases/21.02.1/packages/mips_24kc/routing src/gz openwrt_telphony https://downloads.openwrt.org/releases/21.02.1/packages/mips_24kc/telephony

Modify feed source address:

cp /etc/opkg/distfeeds.conf /etc/opkg/distfeeds.conf_bak sed -i 's/downloads.openwrt.org\/releases/repository.pangzhai.xyz/g' /etc/opkg/distfeeds.conf

Copy the following content to /etc/opkg/distfeeds.conf in OPKG Configuration, pay attention to the version number.

src/gz openwrt_core https://repository.pangzhai.xyz/v21.02.1/targets/ath79/generic/packages src/gz openwrt_kmods https://downloads.openwrt.org/releases/21.02.1/targets/ath79/generic /kmods/5.4.154-1-79c5dc6db69102eb2943a96b9bec8b63 src/gz openwrt_base https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/base src/gz openwrt_kenzo https://repository.pangzhai.xyz/v21 .02.1 /packages/mips_24kc/kenzo src/gz openwrt_luci https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/luci src/gz openwrt_packages https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc /packages src/gz openwrt_routing https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/routing src/gz openwrt_small https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/small src/ gz openwrt_telephony https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/telephony
# add the public key to the router cd /tmp/ wget https://repository.pangzhai.xyz/public_key/pangzhai.pub opkg-key add pangzhai.pub # After the public key is added, update the list opkg update

The software source has been installed. Now install a passwall2 software and give it a try.

opkg list | grep passwall2 opkg install luci-app-passwall2 opkg install luci-i18n-passwall2-zh-cn

You can install the required software in openwrt's management interface, or on an SSH router. Personally, I suggest that it is safer to install it on the router. Sometimes installing larger software at the front desk will cause an error over time.

openwrt 21.02.1 software repository: https://repository.pangzhai.xyz/v21.02.1/packages/mips_24kc/

Software repository:https://op.supes.top/packages/

LUCI Chinese language pack installation

opkg update opkg install boost opkg install boost-system opkg install boost-date_time opkg install boost-program_options opkg install coreutils-base64 opkg install coreutils-nohup opkg install libltdl7 opkg install liblua5.1.5 opkg install liblua5.3-5.3 opkg install kmod-nft -compat

Enter the name of the software package to be installed under Filter:. The system will automatically search for the software in the software source. Openwrt has currently removed it.software package. The v2ray software package can be installed in Coolsoft. Install first. Enter luci-i18n-base-zh-cn under filter:, or enter zh to search to find the relevant language pack installation. Then click install next

Click install to install the language pack.
The Chinese language pack has been installed successfully. After the language pack is installed, refresh the interface and it will display in Chinese. Click System-System-General Settings

System time and time zone settings

Synchronize the time on the router with the local time and click Synchronize with NTP server. The host name can also be customized, modify the time zone of the router operating system, select the time zone as Asia/Shanghai, save and apply

Return to Software. There are software packages that need to be updated in Updates. Manually update the software inside and click Upgrade behind the software package. Make sure every package is up to date.

After all software packages are updated, turn on wireless WIFI. It is turned off by default. After setting the wifi name and password. It’s time to install v2ray. Because the system does not support the download of v2ray, it needs to be downloaded and installed manually. To install manually, you need to enter the system, and you need to use SSH to enter the system.
Just use one that can connect remotely, such as putty, xshell, etc.

Successfully logged in to the router system interface. Next is Linux time. The Linux system commands of openwrt are basically the same. Installation commandThere are yum and dnf inside, and opkg inside openwrt.

FTP server installation

Next, you may use FTP. When you use the FTP tool to connect, an error occurs suddenly.
It turns out that the system is missing the SFTP software package. Go back to the management background and install the sftp server software package in Software. Enter SFTP to check if there is such a software package.

I found the openssh-sftp-server software package. After installation, the FTP service is normal and can be connected. FTP is SFTP connected through port 22. Make sure you don't mistake this port.

The configuration of the Openwrt router can now come to an end, and the next step is to install various software packages.

score

Leave a Reply

Your email address will not be published. Required fields are marked *