OpenWRT installation instructions for APU2 and APU3 boards

OpenWRT (now known as LEDE) doesn't have a typicall installation process like pfSense or IPFire. OpenWRT needs to be "flashed" on the disk.

Easy, step by step instructions:

  1. Prepare debian bootable USB
  2. Connect your debian USB to APU board and boot
  3. download OpenWRT image onto the debian USB
  4. Flash the SSD drive with the OpenWRT image
  5. Resize the OpenWRT partition to use entire disk space
  6. Boot OpenWRT from the SSD



Prepare bootable debian USB

It doesn't need to be debian, you can use Ubuntu or any other linux distribution. We are recoomending debian because we have already prepared debian installation instructions for APU board. Any bootable USB with linux will work for this step.

Download OpenWRT image onto the debian USB

Now you should boot the debian USB and login either via ssh or through the serial cable. Make sure you have the WAN cable connected so you have connection to the internet.

Here are the latest LEDE/OpenWRT images as of writing this article. we need the image called "combined-ext4.img.gz". Make sure you get the ext4 image, otherwise you won't be able to resize the partition and use the entire disk space.

From the debian console run:

root@debian:~# wget

This should go relatively quickly since the image is only 273M.

Once it's downloaded, unpack it with 

root@debian:~# gunzip openwrt-18.06.4-x86-64-combined-ext4.img.gz

This should produce a file named "openwrt-18.06.4-x86-64-combined-ext4.img" (without the .gz extension).

Flash the SSD drive with the OpenWRT image

Once you have the image downloaded, you can flash it on the SSD with the following command:

root@debian:~# dd if=openwrt-18.06.4-x86-64-combined-ext4.img of=/dev/sda bs=4M; sync;

This will take only a second or two because the SSD is relatively fast.

Output you are looking for looks like this:

root@debian:~# dd if=openwrt-18.06.4-x86-64-combined-ext4.img.gz of=/dev/sda bs=4M; sync;
4+1 records in
4+1 records out
19852146 bytes (20 MB, 19 MiB) copied, 0.73956 s, 26.8 MB/s

At this point you have a bootable OpenWRT installation. Power off, remove the USB and boot your APU.

Rezise the OpenWRT partition to use the entire disk space

This is an optional step, but you probably want to do this. When we flashed the OpenWRT image, the partition table was already set to about 270M partition for system. Since we have a 16G disk, we would like to use the entire space.

Make sure you have parted installed (apt-get install parted) . 

Boot your debian USB and issue the following command to see your patition table:

root@debian:~# parted /dev/sda print
Model: ATA SATA SSD (scsi)
Disk /dev/sda: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      262kB   17.0MB  16.8MB  primary  ext2         boot
 2      17.3MB  286MB   268MB   primary

There are 2 partitions, one for boot and the other one for the data/system. We want to resize the latter partition to use the entire space. 

Issue the following command to resize the partition:

root@debian:~# parted /dev/sda resizepart 2 16G
Information: You may need to update /etc/fstab.

One this completes, run the previous command again to verify that the entire space is now allocated to the partition

root@debian:~# parted /dev/sda print
Model: ATA SATA SSD (scsi)
Disk /dev/sda: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      262kB   17.0MB  16.8MB  primary  ext2         boot
 2      17.3MB  16.0GB  16.0GB  primary

And now the last step is to extend the filesystem on this partition. Run:

root@debian:~# resize2fs /dev/sda2 
resize2fs 1.43.4 (31-Jan-2017)
Resizing the filesystem on /dev/sda2 to 3902026 (4k) blocks.
The filesystem on /dev/sda2 is now 3902026 (4k) blocks long.



LEDE/OpenWRT sometimes gets confused during the installation and detects WAN on port 1, and LAN on port 0. If you are unable to connect, switch the cables around and see if that helps. You can reconfigure the network interfaces through the web once you are able to connect.

LEDE/OpenWRT screenshots

Tip: check out many similar articles in our Knowledge Base.

TekLager specializes in selling open source hardware for building routers, firewalls and other network appliances.


wle200nx wireless WiFi kit

TekLager Compex wle200nx wireless WiFi kit for routers. Qualcomm Atheros AR9280. Works well with pfSense
374 SEK 2099-01-01 374 SEK
467.50 SEK incl. vat

APU2D0 Router and 802.11ac 3×3 MIMO Access Point

TekLager OpenWRT router, 5 Ghz access point
2,358 SEK 2099-01-01 2,358 SEK
2947.50 SEK incl. vat

APU4C4: 4x Gigabit LAN, Quad Core CPU, 16GB SSD, 4GB RAM

TekLager APU4C4 Router/Firewall. 4x Gigabit NIC, Quad Core CPU, 16GB SSD, 4GB RAM. Compatible with pfSense, IPFire, OPNSEnse and others.
2,387 SEK 2099-01-01 2,387 SEK
2983.75 SEK incl. vat

TLSense i7 6P: 6x Gigabit LAN, Intel i7 CPU, 128GB SSD, 16GB RAM

TekLager TLSense Intel i7, 6LAN pfSense Router. 1 Gigabit throughput speed. 700+ Mbits/sec encrypted OpenVPN throughput. Compatible with pfSense, OPNSense, OpenWRT and others
6,618 SEK 2099-01-01 6,618 SEK
8272.50 SEK incl. vat