USB flash drive and openWRT

Standard

If you own a router that uses openWrt as firmware, sometimes you’ll need more memory space for packages and configurations.

Almost all the new routers we find on the market now, have 4 or 8 megabyte of internal flash and openWrt will use a big part of that. What you can do, is using a method called “external root”: this involves a USB mass memory (8gb USB flash drive in my case) and some tricky configurations . Just a couple of months ago, you would have been required to do all the work by hand, but now there is a better, safer and quicker way.

This is the minimum you will need:

  • Router with openWRT (you will need Attitude Adjustment!) on it. (ouch!)

  • USB mass storage (formatted in ext4)

  • a way to connect to your router through ssh

  • espresso

Let’s start!

First, you’ll need to connect to the router and update the list of package with:

opkg update

Then, you’ll have to install the basic modules for the USB:

opkg install kmod-usb-storage block-mount kmod-fs-ext4 kmod-usb2

After that, in the web interface, in the mount tab you should see something like this:

usb-storage-samba-webinterface-mountpoint

Under “mount point” you should now have your USB disk. If not, just click on “add” and add your disk from there.

Now click on “edit” and check on “use this device as root partition”.

Save, apply and reboot the router.

After the reboot you can check under system>software and your free space will have increased!

Enjoy

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s