IT Cooking

Success is just one script away

DD-WRT Step 7 Install Entware

DD-WRT Step 7 – Install Entware on the ext2/exFAT formatted flash drive you setup in Step 6 – Format USB Flash Drive with ext2. Setup automated reinstall at reboot and automated updater cron jobs.

Which router does this post cover?

This post will cover exclusively the one I have, but same principles apply for any other: Netgear® AC1900 – Nighthawk® Smart WiFi Router aka R7000:

Install Entware
Netgear® AC1900 – Nighthawk® Smart WiFi Router R7000

AC1900 Features:

  • AC1900 WiFi—600+1300 Mbps speeds
  • 1GHz Dual Core Processor
  • Dynamic QoS prioritizes network traffic for uninterrupted video streaming for applications like YouTube®, Netflix® & others
  • ReadyCLOUD® USB Access allows you to enjoy personal and secure cloud access to USB storage anytime, anywhere


Step 1 – Basic Configuration

Step 2 – Wireless Configuration

Step 3 – Upgrade Firmware

Step 4 – Miscellaneous Settings

Step 5 – SSH Access DDwrt

Step 6 – Format USB Flash Drive with ext2/exFAT

Why Do You Need A Linux Format Flash Drive?

You need it to install Entware. Entware is a software repository for embedded devices like routers or network attached storages (NAS). 2000+ packages are available at moment of writing this article.

This repository will be used to install third party tools on your router via a packager called opkg. To do so, you are advised not to use the router’s internal flash drive but instead, use an external flash drive.

You don’t have to choose ext2 at all costs. Any Filesystem handled by DD-wrt will do, including NTFS! However if you want to keep your flash drive running for more than a year, you are advised to use ext2. exFAT is not a good alternative since it does not support symlinks or permissions.

Step 1. Make Sure /opt is Mounted

Follow Step 6 if needed. Log in to the router’s GUI, go to the USB page (Services > USB), make sure Core USB Support, USB Storage and Automatic Drive Mount are all enabled.

Flash drive requirements:

  • 1 GB minimum
  • UUID enabled (good quality flash drive)
  • expendable: it will eventually die once you reach its maximum write cycle lifespan
  • Volume label should be Optware so it auto-mounts /opt without specifying the UUID

Then, make sure there is a partition mounted as /opt:

Install Entware
Whatever Filesystem is your partition, it will auto-mount as /opt is the label is “Optware”

Step 2. Choose The Right Installer

In case of a doubt, choose the standard installer. The list of Entware-compatible Linux kernels is available here:

ArchitectureSetup scriptSetup script
aarch64 (kernel >= 3.10)standardalternative
armv5 (kernel >= 3.2)standardalternative
armv7 (kernel >= 3.2)standardalternative
armv7 (kernel >= 2.6.36)standardalternative
mips (kernel >= 3.4)standardalternative
mipsel (kernel >= 3.4)standardalternative
x64 (kernel >= 3.2)standardalternative

Connect via SSH to your router or execute uname -a from DDwrt UI in the Administration > Commands section:

Install Entware

The compatible installer for Netgear AC1900 R7000 is armv7 (kernel >=3.2):

Install Entware
Linux kernel version for DD-WRT v3.0-r42617 std (03/05/20)
NOTE: Technical differences between standard and alternative installations is simple. In standard case /opt/etc/passwd is a symlink to /etc/passwd file. In alternative case it is a separate file that belongs to Entware. This rule also applies to group, shadow and some other files.

Step 3. Install Entware

Make sure your rebooted your router after Step 6.

[ebstoggles class=”yourcustomclass”][ebstoggle title=”Option 1 – From SSH” class=”in”]Connect to your router via SSH with Putty or whatever terminal you like. Then execute these commands:

cd /opt
chmod +x ./
sh ./
[/ebstoggle][ebstoggle title=”Option 1 Logs”]
root@ddwrt:/opt# wget
Connecting to (
saving to '' 100% |***********************************************************************| 2205 0:00:00 ETA
'' saved
root@ddwrt:/opt# chmod +x ./
root@ddwrt:/opt# sh ./
Info: Checking for prerequisites and creating folders...
Warning: Folder /opt exists!
Info: Opkg package manager deployment...
Connecting to (
saving to '/opt/bin/opkg'
opkg 100% |***********************************************************************| 135k 0:00:00 ETA
'/opt/bin/opkg' saved
Connecting to (
saving to '/opt/etc/opkg.conf'
opkg.conf 100% |***********************************************************************| 190 0:00:00 ETA
'/opt/etc/opkg.conf' saved
Connecting to (
saving to '/opt/lib/' 100% |***********************************************************************| 135k 0:00:00 ETA
'/opt/lib/' saved
Connecting to (
saving to '/opt/lib/' 100% |***********************************************************************| 1218k 0:00:00 ETA
'/opt/lib/' saved
Connecting to (
saving to '/opt/lib/' 100% |***********************************************************************| 50840 0:00:00 ETA
'/opt/lib/' saved
Connecting to (
saving to '/opt/lib/' 100% |***********************************************************************| 92648 0:00:00 ETA
'/opt/lib/' saved
Info: Basic packages installation...
Updated list of available packages in /opt/var/opkg-lists/entware
Installing entware-opt (227000-3) to root...
Installing libgcc (8.3.0-9) to root...
Installing libc (2.27-9) to root...
Installing libssp (8.3.0-9) to root...
Installing libpthread (2.27-9) to root...
Installing librt (2.27-9) to root...
Installing libstdcpp (8.3.0-9) to root...
Installing entware-release (1.0-2) to root...
Installing zoneinfo-asia (2019c-1) to root...
Installing zoneinfo-europe (2019c-1) to root...
Installing findutils (4.7.0-1) to root...
Installing terminfo (6.2-1) to root...
Installing libpcre (8.43-2) to root...
Installing grep (3.4-1) to root...
Installing locales (2.27-9) to root...
Installing opkg (2019-06-14-dcbc142e-2) to root...
Installing entware-upgrade (1.0-1) to root...
Configuring libgcc.
Configuring libc.
Configuring libssp.
Configuring libpthread.
Configuring librt.
Configuring terminfo.
Configuring libpcre.
Configuring grep.
Configuring locales.
Entware uses separate locale-archive file independent from main system
Creating locale archive /opt/usr/lib/locale/locale-archive
Adding en_EN.UTF-8
Adding ru_RU.UTF-8
You can download locale sources from
You can add new locales to Entware using /opt/bin/
Configuring entware-upgrade.
Upgrade operations are not required
Configuring opkg.
Configuring zoneinfo-europe.
Configuring zoneinfo-asia.
Configuring libstdcpp.
Configuring entware-release.
Configuring findutils.
Configuring entware-opt.
Info: Congratulations!
Info: If there are no errors above then Entware was successfully initialized.
Info: Add /opt/bin & /opt/sbin to your PATH variable
Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware services to start
Info: Found a Bug? Please report at
[/ebstoggle][ebstoggle title=”Option 2 – From the web UI”]


Step 4. Update System

Let’s update the repository and download updates to validate Entware is installed correctly!

opkg update
opkg upgrade
Install Entware
No error? All is good!

Step 5. Setup Startup Scripts

We will now setup init.d by adding a call to an rc.unslung script at reboot. Under Administration > Commands insert this code and hit Save Startup:

sleep 10
/opt/etc/init.d/rc.unslung start
Install Entware
The sleep value can be adjusted, but 10 is long enough for most USB Harddrives/routers

This script will scan the /opt/etc/init.d/ folder for which name starts with capital S*

Install Entware
init.d folder

This is where you want to place your startup scripts after you create your custom applications. Scripts sould be named with 00 being adjusted to prioritize order of each script.

In the future, if you crash your router at reboot or it becomes unresponsive because of some untested scripts you added in this folder, don’t panic! Unplug the USB flash drive and reboot. Then plug it back in and edit the faulty script! As simple as that!!

Wrapping up

You can now install any of the 2600+ packages available for Entware. To list packages available:

opkg list [name]
Install Entware

As of April 17th, 2020 there are 2619 packages available:

Install Entware
2619 Entware packages are available as of April 2020

Default shell is sh from busybox. Let’s try install bash!

opkg list bash
opkg install bash
Install Entware

You router is now a complete Linux system, with package manager, repositories, and a recent kernel. You can do whatever you want with it!

Keep in mind that routers have limited RAM and some have a weak CPU, do not expect a $10 or $20 device to be able to handle torrenting (Transmission) for example.

Leave a Reply

Your email address will not be published. Required fields are marked *