Extroot (manual)

How to install Openwrt software on U disk


This method is officially provided to me by Gl.iNet support.

Due to high amount of users who want to use it, I am posting it here, to reduce questions quantity.

Note: This case takes MT1300 product as an example, the software is 3.211, other products or other software may be slightly different, please flexibly change according to the following information.

1. Confirm the USB flash drive path

Plug the USB flash drive into the router, log on to the router command line using ssh protocol, and run the df -h command to confirm the Mount path of the USB flash drive. For example, /mnt/sda1 confirm your own path and record it.

2. Modify the /etc/opkg.conf file (change the USB flash drive path to your own)

Run the following command:

sed -i '/dest root/a\dest usb /mnt/sda1' /etc/opkg.conf
cat /etc/opkg.conf

After the execution, as follows:

3. Modify the/etc/profile file (the USB flash drive path is changed to your own)

sed -i '/export PATH/i\export LD_LIBRARY_PATH="/mnt/sda1/usr/1ib:/mnt/sda1/1ib"' /etc/profile
sed -i '/export PATH/a\export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/mnt/sda1/usr/bin:/mnt/sda1/usr/sbin" ' /etc/profile
cat /etc/profile

After the execution, as follows:

4. Make/etc/profile take effect

Run the following command:

source /etc/profile

5. Test and install software package

When installing the software, add-d usb at the end so that the software can be installed on the usb flash drive. Example: install tcpdump

Install the tcpdump package and run the following command:

opkg update
opkg install tcpdump -d usb

After the execution, as follows:

Check the tcpdump package installation command and run the following command:

which tcpdump

After the execution, the effect is shown in the following figure, indicating that tcpdump is installed in the U disk


P.S: I did NOT modify this guide. I provided it as it was provided to me by support

1 Like