MiFi - Install package on external storage (USB or SD card)

  1. install fdisk and e2fsprogs.
    opkg update
    opkg install fdisk e2fsprogs

  2. insert usb stick /sd card into MiFi.

  3. log on web portal ( to check if usb/sd card is available, under [Settings]. MiFi has pre-installed packages to work with usb/SD card Plug and Play.

  4. format usb or sd card with ext4. NOTE: tried format it with FAT, python packages can be installed on usb, but not able to run python after installation. with ext4, it works.
    umount /mnt/sdb1
    mkfs.ext4 /dev/sdb1

  5. connect to MiFi with Putty, log on, run command df. you should see below output. For my case, it is /dev/sdb1, and /mnt/sdb1. Write it down.

root@GL-MIFI:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 8192 8192 0 100% /rom
tmpfs 30088 788 29300 3% /tmp
/dev/mtdblock5 6400 424 5976 7% /overlay
overlayfs:/overlay 6400 424 5976 7% /
tmpfs 512 0 512 0% /dev
/dev/sdb1 2066144 39616 2026528 2% /mnt/sdb1

  1. edit /etc/profile, add below lines to existing export lines. Replace sdb1 in the first line to yours, per your df output.
    export USB=/mnt/sdb1
    export PATH=$PATH:$USB/usr/bin:$USB/usr/sbin # This PATH is dependent on existing $PATH
    export LD_LIBRARY_PATH=$USB/lib:$USB/usr/lib

  2. edit /etc/opkg.conf, add one line:
    dest usb /mnt/sdb1

  3. reboot.

  4. once reboot, you can use below command to install new packages.
    opkg update
    opkg install -d usb YOUR_PACKAGE_NAME

MiFi firmware 2.271 tested.
credit: Nixor IDS: Installing packages into USB on TL-WDR4300 OpenWRT


Thanks very much for sharing

使用 3.203 版本固件,是否还支持 external storage 安装应用?
安装到 sd卡中就看不到效果了。