Contents

Fixing my Ubiquiti EdgeRouter Lite

For the price-to-performance ratio, you can’t really beat Ubiquiti. Over the past couple of years they’ve been releasing some fantastic products which are clearly aiming to disrupt the ‘enterprise’ market.

One downfall, however, can be their quality. Prior to purchasing the EdgeRouter, I had a UAP-LR, which unfortunately started exhibiting strange performance issues after about 6 months. Luckily, Ubiquiti support were very helpful and organised for me to return the defective unit and then upgrade to a UAP-AC-PRO (which is fantastic might I add).

Just recently, my EdgeRouter Lite locked up and completely stopped responding. Up until this point the device had been rock-solid, with no reboots for well over 6 months. Having Googled the problem, I certainly wasn’t alone with my issue, and without a warranty I decided to take matters into my own hands.

Requirements
To start, you’re going to need a RJ45 serial ‘rollover’ cable.
As a Mac user, I purchased this USB to Serial cable here on Amazon.

Step 1 – Connect to the EdgeRouter via the console port

Connect the rollover cable to the console port of the EdgeRouter and your PC/Mac. Once connected, we can use the ‘screen’ command on OS X to dial-in without any additional software.

Type:

1
2
cd /dev_  
ls -ltr /dev/*usb*  

In the list you should see something similar to tty.usbserial-XXXXXXXX. Substitute the X’s with your unique device ID and use this command to connect to the device:

1
screen tty.usbserial-XXXXXXXX 115200

Step 2 – Finding the problem

Once connected, I could see the error messages rolling in. There was a problem trying to mount the file system.

VFS: Cannot open root device “sda2” or unknown-block(8,2): error -17
Please append a correct “root=” boot option; here are the available partitions

Kernel panic – not syncing VFS: Unable to mount root fs on unknown-block(8,2)

I was going to need to install a new operating system from scratch.

Step 3 – Downloading the recovery tools

Ubiquiti has made a special tool available to assist with the recovery of EdgeRouter devices. Download it here: emrk-0.9c.bin

You will also need the latest EdgeRouter Lite firmware from here.

Once downloaded, move both of the files to /private/tftpboot

A quick way of getting to the folder is to press Command+Shift+G to reach the ‘Go to folder’ prompt.

Step 4 – Starting the TFTP Server

Now the recovery EMRK recovery tool is on your Mac, we need a way to serve it to the EdgeRouter. For this, we’ll use OS X’s built-in TFTP server.

To enable, type this:

1
2
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd

The first command will probably ask for your password as it’s starting up a system service.

Step 5 – Starting recovery

Now back to the console connection. Press the enter key a few times, and the device will stop rebooting and instead present you with a basic CLI. From here we can set an IP address, and crucially the TFTP server address (your Mac) to download a fresh firmware image.

Type:

1
2
3
4
set ipaddr 192.168.0.99
set netmask 255.255.255.0
set serverip 192.168.0.3  
set bootfile emrk-0.9c.bin

Here we’ve set the EdgeRouter to use the IP address 192.168.0.99, and to seek an image on the server 192.168.0.3 (my Mac). Make sure to change the IP addresses to suit your network.

We will now download and boot the EMRK tool on the EdgeRouter. Connect the ethernet port on your Mac directly to eth0 on the EdgeRouter and after a few seconds type:

1
tftpboot

After a small delay, you should end up here:

EdgeRouter EMRK Kit

Type ‘Yes’ and press enter, which will now bring you here:

EdgeRouter EMRK Recovery

I went straight in with a emrk-reinstall command. Answer ‘yes’ to any prompts and you will eventually be prompted to enter the address of the .TAR firmware file, as we can see here:

EdgeRouter Lite EMRK TFTP Restore

In my case I typed tftp://192.168.0.3/ER-e100.v1.9.0.4901118.tar and pressed enter.

Given a few minutes, the EdgeRouter will restore itself to a factory default image of the uploaded firmware and return to normal operation.

Voila! A working EdgeRouter Lite.

Comments