Configuring a TP Link MR3040 into a MiniPwner - nicholasadamou/minipwner GitHub Wiki
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
- Download OpenWRT Barrier Breaker - found here.
- Boot your TP-Link MR3040 and login at http://192.168.0.1 (default credentials are admin/admin).
- Select System Tools and then Firmware Upgrade.
- Use the Choose File button to select the OpenWRT Barrier Breaker image.
- Use the Upgrade button to apply the image.
- Wait for the image to be applied.
- After the TP-Link reboots it will now be at 192.168.1.1
The Setup
- Telnet to the TP-Link @ 192.168.1.1
- Set a root password with the
passwd
command.
- NOTE: You will need to get the TP-Link onto the Internet to download packages.
- 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
- Plug the USB drive into the 3G port and reboot the TP-Link
- Log back into the TPLink via
ssh
using the user root
and the password you just set.
- 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'
- 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
- You now need to modifiy the
/etc/config/fstab
again, so it will boot off the USB drive.
- Reboot the TP-Link (and now it becomes a MiniPwner).
- Verify the USB drive is mounted correctly by issuing the
df -h
command.
- Choose one of the two methods listed under Install to install and configure the
MiniPwner Overlay
.
- Make sure the three position switch is in the middle position (WISP) and then reboot the MiniPwner