Michael Bergeron

Getting Started with Armbian on Rock64

For a few months I’ve had a Rock64 sitting around and I’ve started embarking on a project which will combine a few of my interests: single-board computers (like Rock64 and Raspberry Pi), software defined radio, aviation (in this case ADS-B), and whatever else I feel like adding to the project as time goes on.

This post will focus on getting Armbian up and running on the Rock64.

The Hardware

If you want to find out more about the specifics of the Rock64 (or R64 as I may start calling it below) you can do so on their website. I haven’t had a chance to play with all of the GPIO pins, etc., but as far as single board computers (SBCs) go it is pretty capable.

The quick pros for me right now:

  • Quite powerful; noticeably faster than RPi; even 3B+
  • 1G, 2G, and 4G RAM options
  • 1xUSB3 and 2x USB2
  • Gigabit ethernet on board

And some cons:

  • Software support not as robust as RaspberryPi
  • No built-in wireless
  • Power over a barrel; 5V3A (we’ll be using a PoE+ splitter to provide a single power & data connection to the system)
  • If you want to use eMMC make sure you plan on hot-gluing the chip down. It is VERY easy to dislodge while handling.

The Operating System

I’ve used some of the other operating systems designed for the R64 previously, but Armbian actually makes things really easy. For most of my applications I prefer headless systems, and Armbian allows you to SSH in remote from the first boot which is great. (You can get this functionality for RPi with just a tiny bit of “hacking.”) So, this tutorial is based on the Armbian Bionic legacy kernel 4.4.y release. Note: “desktop” is not mentioned in the name so we will not have a GUI.

Downloading and Imaging

If you’re familiar with creating bootable USB images this section probably won’t add much to your knowledge-base. If you’re relatively new to the process, the easier pointers to give are:

  1. Download the Armbian image using your preferred method. Bittorrent was quite fast for me.
  2. Decompress the image. If you’re on Ubuntu you’ll want to install the p7zip package: sudo apt install -y p7zip
  3. Download Etcher
  4. Run Etcher
  5. Select the decompressed .img file on the leftmost icon
  6. Insert and select your microSD card in the middle. (If you only have one USB mass storage device plugged in to your device it may automatically select it for you.)
  7. Hit ‘flash’ on the right.
  8. Wait for it to image and verify your media.

Etcher interface

First Boot

If you want to see the whole “consolecast” of the first boot process, it is posted below. I’ll also provide the brief overview below as well for easier copy pasting.

If it weren’t apparent, remove the microSD card from your host machine, and insert it in to the Rock64. Then plug in the power cord to the R64. The device should automatically boot. (Make sure you don’t have the eMMC jumper in place. If one was not put one there specifically, there shouldn’t be anything for you to worry about.)

The first thing to note is that booting Armbian on the R64 takes a long time. Boots / reboots routinely take 40-50 seconds on my device. Not great, but hopefully we won’t be rebooting the device too much.

My network (Google WiFi) automatically allows me to access new devices on the network based on their hostname plus the “.lan” TLD. So, logging in to the R64 is as simple as:

ssh root@rock64.lan

If rock64.lan doesn’t work consider trying rock64.local (this has worked for me in the past on Apple-backed networks), or Googling to see if your route provides DNS services for local hostnames. If all else fails you’ll have to manually find the IP address, or login to the device locally.

If you’re logging in over the console (monitor and keyboard) the process looks basically identical.

The default root password for Armbian is 1234, but it will make you setup a new root password, and a non-root user account immediately after you login.

Once you’ve logged in you’re going to want to update the software on the system, clean up anything that isn’t needed anymore, and reboot. If you’re familiar with Ubuntu or Debian this will be very familiar to you. If not, the next four steps:

  1. Update the available packages
  2. Download and install the latest package updates
  3. Remove any unneeded software
  4. Reboot the system
    apt update
    apt dist-upgrade -y
    apt autoremove -y

After that decently lengthy boot cycle you should be able to login to the system again as either root or your user account.

Extra Credit - Further Security Hardening

While you can certainly start using your Rock64 right away, I highly recommend adding some security hardening measures to your system. Why?

  • Root login is enabled via SSH. This is widely regarded as a bad move.
  • The default SSH port is easily exploitable by scripted attacks
  • SSH provides a very convenient, and more secure, method of authenticating by leveraging public key cryptography.

I won’t try to overly complicate the article, but I will link to a few quick fixes I recommend you make below: