~clarkema >_

Running RouterOS on a PC Engines APU

06 June 2020

This post is setup for a larger project; I’m trying to build a small homebrew router using OpenBSD and a MikroTik LTE card. Unfortunately documentation for this card is rather sparse; OpenBSD does recognise it on boot as a urndis device and a couple of serial ports, but to get it working requires configuring the card with AT commands over the first serial port. This process is not documented.

Fortunately, it’s possible to enable LTE logging within RouterOS, so you can see how MikroTik themselves configure the card.

I don’t have any official MikroTik hardware that accepts the card in question, so the plan is to take advantage of the fact that you can also run RouterOS on commodity x86 hardware. If I can get RouterOS running on the PC Engines APU board that I’m using for the project, I can configure the modem, verify that I can get network access through it, and then reproduce the setup myself.

It turns out this is possible, but it requires jumping through a few hoops to get everything working.

First, you’ll need an mSATA disk and a USB-mSATA adapter. I initially tried installing RouterOS onto a microSD card and booting the APU both from USB and from its SD card slot, but neither of these worked. Something strange is going on there, because I used exactly the same card to successfully boot a Soekris net6501 I had lying around. Anyway, long story short, use an mSATA disk in the APU, with a USB-mSATA adaptor to connect the disk to the VM for initial installation.

  1. Download the latest stable RouterOS CD image for x86. Currently that’s version 6.47.

  2. There is no “live image” or anything else along those lines. The CD image is exactly that; an ISO without the ability to boot from a USB drive or SD card. It’s designed as an installer from CD only.

    The easiest way to get it running turned out to be using a virtual machine on a second Linux computer.

    Make a new virtual machine with no harddisk and the ISO attached as the first CD-ROM drive. Attach the mSATA disk that you want to use to the VM via USB, and then boot. The ISO will install RouterOS on the first HDD it can find, so to avoid confusion we ensure there are no candidates other than the USB mass storage device we connected.

  3. Select all of the packages you want and then hit i to install. When the installation is complete, shut down the VM and swap the mSATA disk over to the APU.

  4. Power on and you’re ready to go!

  5. When RouterOS has booted, connect via the serial console (9600, 8N1) and log in using the default account (admin, no password).

As a side-note, this installation is not exactly useful for anything except the LTE reverse engineering that I have in mind for it, since RouterOS doesn’t recognise the APU’s Ethernet ports. For the curious, the four Ethernet ports on the Soekris net6501 do show up fine, but the Soekris board has no SIM card support so is no good for LTE work without additional adapters.

Anyway, we now have RouterOS running on the APU. Extracting LTE configuration logs will have to wait for a post of its own.