Increasing WR703N flash memory with ExtRoot on OpenWRT 14.07 with usb stick(Easy way)

There are one million awesome things you can do with small router and an OpenWRT firmware on it. I have been surprised how mature, easy to use and community driven it has become.  The WR703N is an awsome device and I have probably never seen such a small device (smaller than a smartphone) with so many features, an USB, Ethernet, Wifi and Linux running for just under 25$.

However 4 Mb is very few, even to run OpenWrt, and you quickly run into flash memory limits. But you can easily work around this limitation using ExtRoot, which allows you to include external USB devices or even network mounts. However the collection of instructions on how to setup ExtRoot makes it look more complicated than it is, and it can be (almost) performed completely by LuCi, OpenWRTs GUI interface in the latest stable release (Breaking Barrier 14.07).

This guide will instruct you you to install an ExtRoot on OpenWRT. The description is for the TP-LINK WR703N router but should work for any other router. This describes how to mount an external usb stick as an overlaid partition, leaving your original settings and files visible. (Recommended)

Do this first before installing ANY other packages, otherwise there is not enough space for the required packages.

Prerequisites:
-You are connected to the Internet on the OpenWRT.
-Ext3 formatted usb memory / hdd (ext4 is possible too, but ext3 is recommended)

Barrier Breaker 14.07 with ubox:

With BB attaching usb stick works out of the box. Be aware that this method might break when you install and use block-mount.

Go to Settings -> Software, and install:

kmod-fs-ext4 kmod-usb-storage block-mount

Do not be confused by the warning if it appears. The modules will be properly included after a restart!

kmod: failed to insert /lib/modules/3.10.49/ext4.ko

Next you have to mount your disk partition to  /overlay mounting point. There is two ways to achieve this simply.

Go to System – Startup:

Enable fstab

wr703n_startup

 

Now reboot. After reboot there is a new menu.

Go to System – Mount Points

Here, in theory, you can select your usb devices and create an overlay storage and save your settings.  However the GUI creates an invalid /etc/config/fstab file in my release (which would be valid for previous release versions) as can be found out when reading the OpenWRT wiki.

Therefore edit the fstab file manually through ssh.

Save current OpenWRT settings (optional)

At this point you can send save your settings to the usb stick.

mkdir /mnt/sda1
mount /dev/sda /mnt/sda1
tar -C /overlay -cvf – . | tar -C /mnt/sda1 -xf –

Edit the fstab file

vi/etc/config/fstab

Update the file, to look like this:

config mount
option target /overlay
option device /dev/sda1
option fstype ext3
option options rw,sync,noatime
option enabled 1
option enabled_fsck 0

wr703n_freespace

 

If you did not update your settings your router will after reboot appear “clean”, e.g. your previous settings are gone and you have to enter a new password and your settings.