Instantly share code, notes, and snippets.

What would you like to do?
HOWTO: Install entware on Shibby TomatoUSB


This howto describes installing entware for the Tomato open-source router firmware.


  • USB stick - 1G or more in size
  • USB-capable router running TomatoUSB.

This Howto Was Tested With

  • Shibby's fork of TomatoUSB version 1.28 build 121
  • ASUS RT-N66U

Install entware

Pick a USB stick that you can dedicate to your router since it will be completely erased by the following process.

Configure the GUI for entware

In the web GUI, go to the "USB and NAS->USB Support" section and tick the following options:

[x] Core USB Support
[x] USB 2.0 Support
[x] USB Storage Support
[x] Ex2/Ext3 File Systems Support
[x] Automount

Paste this text into the "Run after mounting" box:

/opt/etc/init.d/rc.unslung start

Paste this text into the "Run before unmounting" box:

/opt/etc/init.d/rc.unslung stop
sleep 15
for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
  mount -o remount,ro $i

Click the "Save" button and then check the "USB Status" at the bottom of the screen. If your USB stick is mounted, click "Unmount". In subsequent steps, we are going to format the USB stick, so we don't want it mounted.

Go to the "Administration->Scripts->Init" page. Paste the following into the "Init" script section:

echo "LABEL=ENTWARE /opt ext3 rw,noatime 1 1" >> /etc/fstab

Click the "Save" button.

For reference, most of the above is taking from the entware USB setup instructions.

Prepare the USB stick

Plug the USB stick in and ssh to the router. Remember, the next steps will completely erase the USB stick!

Find the device name for your USB stick

Run "fdisk -l" to display all the block devices and their partitions. Here is an example:

# fdisk -l

Disk /dev/sdb: 16.2 GB, 16231956480 bytes
64 heads, 32 sectors/track, 15480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1       15480    15851504  83 Linux

You can see that the disk /dev/sdb is a 16GB block device. Since there are no other 16GB devices on my router, I can be pretty sure that the 16GB stick that I plugged in is mapped to /dev/sdb.

Partition the USB stick

Use fdisk to delete all the partitions on your USB disk. Then create a single partition spanning the entire drive and set its type to 83 (Linux). Write the partition table and exit fdisk.

Format the USB stick

Replace the /dev/sdb1 below with the path to your newly created partition.

mkfs.ext3 -L ENTWARE /dev/sdb1

Perform the entware install

mount /opt

Install useful packages (optional)

There are a number of useful, general purpose packages that you might want to install. ssh to the router and run the following (these on the list are just some examples):

opkg install bash
opkg install bind-dig
opkg install binutils
opkg install bzip2
opkg install coreutils-sha1sum
opkg install coreutils-sort
opkg install curl
opkg install diffutils
opkg install file
opkg install gawk
opkg install gdb
opkg install hdparm
opkg install less
opkg install lsof
opkg install objdump
opkg install patch
opkg install perl
opkg install procps
opkg install procps-top
opkg install rsync
opkg install sed
opkg install strace
opkg install tar
opkg install tcpdump
opkg install vim
opkg install vim-runtime
opkg install wget
opkg install unzip

Verify the installation

Reboot the router by clicking the "Reboot..." option in the web GUI. Once it restarts, ssh to the router and run "opkg list". You should get a list of possible packages that you can install. If you don't, something went wrong. Make sure that /opt is mounted (use the df command).



This comment has been minimized.

Copy link

remlei commented Dec 17, 2014

you also need to perform

opkg upgrade
opkg update

to be able to install new packages on newly installed entware environment.


This comment has been minimized.

Copy link

Echani commented Sep 28, 2015

for some reason I'm getting a 401 on the wget at first, and a 403 on the second one.

Is this not a public repo?


This comment has been minimized.

Copy link

ryzhovau commented Nov 8, 2015

Great How-To. I borrowed it to use here if you don't mind.


This comment has been minimized.

Copy link

alexey-krylov commented Nov 23, 2018

Here is entware installation script:
wget -O - | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment