Initial Setup of hardware with Armbian - monkeymia/orangepizero GitHub Wiki

Initial Setup of hardware with Armbian

Prerequisites

  1. Hardware (Orange Pi Zero)
  2. Power Supply (5V DC, 2 Ampere) with USB Type B (micro) Note: Supply via USB works for the Getting Started, but is no long term solution.
  3. Ethernet cable
  4. Dynamic Host Configuration Protocol (DHCP) Server
  5. micro SD-Card (4+ GByte) (and SD-card adapter)
  6. PC with software to flash a image to a SD-card
  7. Armbian image. Currently Armbian provides pre-build images:
    • Armbian Bionic (based on Ubuntu 18.04 code name "Bionic Beaver")
    • Armbian Stretch (based on Debian 9 code name "Stretch"/ Ubuntu 16.04 code name "Xenial Xerus")
  8. Software to uncompress 7-zip archive; Armbian recommends: http://www.7-zip.org/
  9. PC with software to login on target with secure shell (ssh)

Setup

  1. Download Armbian Bionic Armbian_5.59_Orangepizero_Ubuntu_bionic_next_4.14.65.7z
  2. Put image on SD-Card
  3. Insert SD-Card
  4. connect Ethernet to DHCP server
  5. connect PC with ssh to DHCP server
  6. Power on target. The green onboard LED should be on. Both LED of Ethernet Port should be on.
  7. Wait 1 minute
  8. lockup assigned IP-address
  9. login via ssh on target.
  10. change settings (see below)

Troubleshooting

  • If the red LED starts blinking then indicates heartbeat i.e. the target has booted and the kernel is running. = The SD-card was detected.
  • If no Ethernet link then double check if you have downloaded the correct image. If it does not match the hardware then the Ethernet is not initialized.
  • Check sha256sum of the image and flash the image again to the SD-Card. Please do not forget to do a safe eject/remove of the SD-Card.

First login on Target

In short the steps are:

  1. Check Connection i.e. ping <ip-address>

  2. ssh <ip-address>

    username name: root

    password: 1234

  3. change password (US-Keyboard setting)

Example Output

Assuming the DHCP server has assigned IP-Address 192.168.2.11 then you can connect with command :

ssh [email protected]

The target executes the configuration wizard. The user has to specify :

  1. A new root password
  2. name of the user (for example "demonstrator")
  3. password of the user

The terminal output looks like :

[email protected]'s password:
You are required to change your password immediately (root enforced)
  ___                               ____  _   _____
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_) |__  /___ _ __ ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |   / // _ \ '__/ _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| |  / /|  __/ | | (_) |
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_| /____\___|_|  \___/
                       |___/

Welcome to ARMBIAN 5.59 stable Ubuntu 18.04.1 LTS 4.14.65-sunxi
System load:   0.08 0.02 0.01       Up time:       29 min
Memory usage:  10 % of 493MB        IP:            192.168.2.11
CPU temp:      44°C
Usage of /:    5% of 15G

[ General system configuration (beta): armbian-config ]

New to Armbian? Check the documentation first: https://docs.armbian.com
Changing password for root.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:

Thank you for choosing Armbian! Support: www.armbian.com

Creating a new user account. Press <Ctrl-C> to abort

Please provide a username (eg. your forename):
Please provide a username (eg. your forename): demonstrator
Trying to add user demonstrator
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = (unset),
    LC_MEASUREMENT = "de_AT.UTF-8",
    LC_PAPER = "de_AT.UTF-8",
    LC_MONETARY = "de_AT.UTF-8",
    LC_NAME = "de_AT.UTF-8",
    LC_ADDRESS = "de_AT.UTF-8",
    LC_NUMERIC = "de_AT.UTF-8",
    LC_MESSAGES = "en_US.UTF-8",
    LC_TELEPHONE = "de_AT.UTF-8",
    LC_IDENTIFICATION = "de_AT.UTF-8",
    LC_TIME = "de_AT.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Adding user `demonstrator' ...
Adding new group `demonstrator' (1000) ...
Adding new user `demonstrator' (1000) with group `demonstrator' ...
Creating home directory `/home/demonstrator' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Adding user `demonstrator' ...
Adding new group `demonstrator' (1000) ...
Adding new user `demonstrator' (1000) with group `demonstrator' ...
Creating home directory `/home/demonstrator' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for demonstrator
Enter the new value, or press ENTER for the default
    Full Name []:
Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n]
Dear demonstrator, your account demonstrator has been created and is sudo enabled.
Please use this account for your daily work from now on.

root@orangepizero:~#

Configure target

Date

It seems the system date is wrong. The root can change it with command

date +%Y%m%d -s "20180831"

or

sudo date -s "5 SEP 2018 12:24:00"

Example output :

root@orangepizero:~# date
Tue Aug 21 20:35:41 UTC 2018
root@orangepizero:~# date +%Y%m%d -s "20180831"
20180831
root@orangepizero:~# date
Fri Aug 31 00:00:04 UTC 2018
root@orangepizero:~#

Static Ethernet IP Address

Steps to assign static Ethernet 192.18.2.240 with Network Monitor Command Line Interface :

nmcli con add con-name "static-eth0" ifname eth0 type ethernet ip4 192.168.2.240/24 gw4 10.10.10.1
nmcli con mod "static-eth0" ipv4.dns "192.168.2.1,8.8.8.8"
nmcli con up "static-eth0" iface eth0
reboot now
ping 192.168.2.240

Example output :

root@orangepizero:~# nmcli con add con-name "static-eth0" ifname eth0 type ethernet ip4 192.168.2.240/24 gw4 10.10.10.1
Connection 'static-eth0' (10bfb697-f23b-48ea-bfcd-86077890aca9) successfully added.
root@orangepizero:~# nmcli con mod "static-eth0" ipv4.dns "192.168.2.1,8.8.8.8"
root@orangepizero:~# nmcli con up "static-eth0" iface eth0
Unknown parameter: iface
Unknown parameter: eth0
⚠️ **GitHub.com Fallback** ⚠️