“Factory” resetting an OpenWRT router

There are many reasons to re-flash your  home router with a different OS than the one the manufacturer has cobbled together, the Misfortune Cookie attack (US-CERT) is just one of them, Having been involved in the testing of a number of domestic xDSL routers, I have a rather low opinion on the amount of care put into the default security levels of consumer devices (but that is not what this post is about).

Image Credit: commons.wikimedia.org
Image Credit: commons.wikimedia.org

I have chosen to utilise OpenWrt on one of my internal wireless access points, and – during a reconfiguration of the network, I managed to bork the settings by not paying attention. With an out-of-the-box device, there is usually a ‘Reset’ button you can hold in while powering up the device which will clear all settings and return you to the initial un-configured state. This is not quite the case with OpenWrt, but it is still a fairly easy process to return your router to a known state, and begin the configuration process again.

  • Disconnect WAN cable
  • Unplug power to router
  • Set your computers IP address to:
    • IPv4 Address: 192.168.1.2
    • Netmask: 255.255.255.0
    • Gateway: 192.168.1.1
  • Re-power your router, pressing the ‘reset’ button when the status light begin blinking (fast)
  • Using PuTTY (or your favourite *TELNET* client), connect to 192.168.1.1 and you should see the OpenWrt prompt. Type the commands below (in red) to reset the router to it’s initial, preconfigured state:
-----------------------------------------------------
root@(none):/# mount_root
jffs2 is ready
jffs2 is ready
switching to overlay
root@(none):/# firstboot
This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
/dev/mtdblock3 is mounted as /overlay, only erasing files
root@(none):/# reboot –f
  • Unset your static IP and have fun reconfiguring your router.

Reflashing a Rooted Router

I have a couple of Open Mesh Indoor Access Points that I’ve used for various projects, the most recent of which being the provision of WiFi for our Teenage Subnet.

Open Mesh - Indoor Access Point
I have the OM1 version, not the OM2 pictured here – they are similar however.

These devices have a very cool history. Originally created under the banner of Meraki (since sold to Cisco and thenceforth diverging from its open source roots), the Open Mesh has a really strong community behind it both in the development and the after-market support camps.

Long story short, one of the nodes decided to pack a sad and nothing I could do from the control panel would get the dang thing to talk to the network again.. so that’s when I rolled out the big guns.
It was to these guys that I turned my web browser, and true to form was soon rewarded with this very good HOWTO explaining the step by step of reflashing an open mesh device.

While I have archived a copy of the article in case the original gets moved, I would caution the visiting reader to seek their fortunes in the community forums updated documentation should you stumble across this page at any great length time after it is initially published.

FlashThe one edit I would make would be to ensure that, in Windows, you open the command prompt as an Administrator. For me, the flash program would not detect any interfaces until I did this.

Happy flashing!

ASUS Garmin A10

I got one of these phones when they first came out – they were pretty awesome back then, however over time they have been orphaned on older, vulnerable iterations of Android and they simply don’t have what it takes to be a primary device any longer.

Because of this – I’m currently looking to root the phone and install upon it a modified ROM which will give me *just* what I need to turn this into a useful device for sitting in the car.

I got one of these phones when they first came out – they were pretty awesome back then, however over time they have been orphaned on older, vulnerable iterations of Android and they simply don’t have what it takes to be a primary device any longer.

Because of this – I’m currently looking to root the phone and install upon it a modified ROM which will give me *just* what I need to turn this into a useful device for sitting in the car.

Step #1 – Hard Reset to Factory Defaults.

  • Turn the phone OFF
  • While holding the volume UP button, press and HOLD the power button
  • Keep holding the buttons until ‘Clear User Data’ is displayed in text on the phone’s screen.

The phone will continue to boot after factory resetting the device (note, items on the Micro SD card will NOT be affected – you would need to reformat that independently yourself.

Step #2 – Find a ROM.

  • The new firmware needs to enable the more recent features of Android without overtaxing the processing power or battery capacity of the aging device…
  • Suggestions?