Skip to content

Configuring a TP Link MR3040 into a MiniPwner

Nicholas Adamou edited this page May 5, 2018 · 6 revisions

What You'll Need

Format USB Drive

  • Setup two partitions on the USB drive, 1 500 MB partition for swap space and the rest of the space for storage.
  • This can be done on a Linux system using fdisk or gparted
    • Partition 1 = 500 MB SWAP
    • Partition 2 = 15.5GB ext4

Install OpenWRT

  1. Download OpenWRT Barrier Breaker - found here.
  2. Boot your TP-Link MR3040 and login at http://192.168.0.1 (default credentials are admin/admin).
  3. Select System Tools and then Firmware Upgrade.
  4. Use the Choose File button to select the OpenWRT Barrier Breaker image.
  5. Use the Upgrade button to apply the image.
  6. Wait for the image to be applied.
  7. After the TP-Link reboots it will now be at 192.168.1.1

The Setup

  1. Telnet to the TP-Link @ 192.168.1.1
  2. Set a root password with the passwd command.
  3. NOTE: You will need to get the TP-Link onto the Internet to download packages.
  4. Install the following packages to enable USB support
    • kmod-scsi-core
    • kmod-usb-storage
    • block-mount
    • kmod-lib-crc16
    • kmod-crypto-hash
    • kmod-fs-ext4
  5. Plug the USB drive into the 3G port and reboot the TP-Link
  6. Log back into the TPLink via ssh using the user root and the password you just set.
  7. Modify the /etc/config/fstab to match the following:
config 'global'
        option    anon_swap    '0'
        option    anon_mount   '0'
        option    auto_swap    '1'
        option    auto_mount   '1'
        option    delay_root   '10'
        option    check_fs     '0'

config 'swap'
        option    device       '/dev/sda1'
        option    enabled      '1'

config 'mount'
        option    target       '/'
        option    device       '/dev/sda2'
        option    fstype       'ext4'
        option    options      'rw,sync'
        option    enabled      '1'
        option    enabled_fsck '0'
  1. Run the following commands to "pivot root" to the USB drive:
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
mkdir /mnt/sda2
mount /dev/sda2 /mnt/sda2
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda2 -xf -
umount /tmp/cproot
  1. You now need to modifiy the /etc/config/fstab again, so it will boot off the USB drive.
  2. Reboot the TP-Link (and now it becomes a MiniPwner).
  3. Verify the USB drive is mounted correctly by issuing the df -h command.
  4. Choose one of the two methods listed under Install to install and configure the MiniPwner Overlay.
  5. Make sure the three position switch is in the middle position (WISP) and then reboot the MiniPwner