On the weekend I’ve been hacking a TP-Link MR3220 for my friend Penya. The router has a USB port and I wanted to use a USB flash drive to expand the storage space available on the router. I had two flash drives, one noname 1GB and a Sandisk Cruzer 8GB. I had problems with the noname drive, random disconnects during data writing etc. so I used the Sandisk one.

First I formatted the drive to ext4 under Ubuntu, then plugged it in the router. After logging in with SSH, I installed the needed USB storage modules: opkg update; opkg install kmod-usb-storage kmod-fs-ext4. After that I was able to mount the drive under /mnt/pendrive1 (I had to create that directory to mount to): mount /dev/sda1 /mnt/pendrive1

If it says that there’s no /dev/sda1 device, look at dmesg to find out the newly attached flash drive’s device name. I wanted automount, so I installed the needed packages: opkg install blkid block-mount e2fsprogs
I edited /etc/config/fstab:

Note that I set the UUID instead of the device name. It’s useful if the drive comes up under a different device name. UUID uniquely identifies it. To find out your drive’s UUID, run blkid. If you have a swap partition on your drive and want to use it as swap space, you can set it here.

Hi, I just followed your tutorial! thanks a lot! But I’m having a small dificultie, all the packages that I install, when I try to run them I get Permission denied! Also to try to run them I must go to /etc/mc for instance. Am I doing anything wrong?