Skip to content

Node OS Setup Guide Armbian Orange Pi

Matt Magoffin edited this page Oct 29, 2018 · 2 revisions

SolarNode OS Setup Guide - Armbian Orange Pi

This guide describes the steps I took to create a "minimal" Armbian based system on an Orange Pi computer. The steps are very similar to what is described in the SolarNode OS Setup Guide for Debian 9. This guide just documents the Orange Pi specific differences from that guide.

Armbian comes pre-configured as an OS disk image already, so our tasks mainly consist of removing packages not meeting our requirements and tweaking some settings a bit.

Note: Binary images for the SolarNode Armbian OS are also available here: https://sourceforge.net/projects/solarnetwork/files/solarnode/orange-pi/ These are great if you are after a quick OS setup (but they do not always contain the latest updates), if you want the latest and greatest you should continue reading below.

Download Armbian and copy to SD card

Download the Armbian Stretch image from https://www.armbian.com/orange-pi-zero/.

Boot the Orange Pi

Insert your freshly minted SD card into the Pi, plug in an ethernet cable, and power the device on. The Orange Pi will boot up and get an IP address via DHCP. Use your local router to discover the IP address, or if your router supports DNS resolution the Pi will use a hostname like orangepizero. Access the Pi via ssh as the root user. You will be prompted to change the root password and create a new user. Create a solar user. This user will be automatically added to the dialout and sudo groups.

OS setup tasks

  1. Configure the local time zone

    Run the dpkg-reconfigure tzdata command to set the time zone appropriately.

  2. Label the root partition

     e2label /dev/mmcblk0p1 SOLARNODE
    
  3. Edit /etc/fstab to mount the SOLARNODE label, and specify /run size:

LABEL=SOLARNODE / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
tmpfs /run tmpfs defaults,size=50% 0 0
tmpfs /tmp tmpfs defaults,nosuid 0 0
  1. Disable the root account.

    Note execute this from the solar user's account!

     sudo passwd -dl root
    

zram setup

Edit /etc/default/armbian-zram-config to decrease zram use:

ZRAM_PERCENTAGE=10
MEM_LIMIT_PERCENTAGE=10
ZRAM_MAX_DEVICES=1

Software setup

Now I manually removed and added the software I deemed appropriate for the node, as described in the SolarNode OS Setup Guide for Debian 9 Software setup section.

Armbian comes loaded with development tools (gcc, g++, python, etc) and X11 stuff (x11, lxde, etc) that are of no use to a SolarNode. They can all be removed. Further savings can be found by installing the deborphan and debfoster packages. Use those to identify non-essential packages and remove them.

Clone this wiki locally