Skip to content

Skybian User Guide

Moses Narrow edited this page Jan 22, 2022 · 31 revisions

Skybian User Guide


Introduction

The Skybian (version >0.5.0) image for the official Skyminer makes use of the Skywire package and the Official Skycoin APT repo.

The skybian image no longer requires the skyimager to generate any configuration file or static IP setting. The ip configuration (if any) happens automatically on the first boot of the image. On the second boot, the skywire configuration is generated and skywire is started as either hypervisor or with remote hypervisor. Thus, the same image can now be used for every board in the official skyminer with the procedure outlined below.

The login data for Skybian images is as follows:

  • Orange Pi Prime & Orange Pi 3:
    • username: root
    • password: skybian
  • Raspberry Pi
    • username: pi
    • password: raspberry

Please note that the skyraspbian image does not have the exact same auto-configuration functionality as the Skybian image currently. This article will be updated when such functionality is achieved.

Supported Boards

Skybian:

  • Orange Pi Prime
  • Orange Pi 3

Skyraspbian & ArchlinuxARM

  • Raspberry Pi 1, 2, 3 and 4 (32-bit and 64-bit versions are provided)

Skyminer setup - Skybian

Prerequisite

The first image will attempt to assign itself the .2 ip address on the current subnet. Make sure that the .2 ip address on the network provided by the skyminer router is not occupied.

Procedure

  • 1) Download the skybian image and extract it from the archive
  • 2) Use balena etcher, or the dd / dcfldd command on linux, to write the image to a microSD card
  • 3) Power off every board in the skyminer with the individual switches
  • 4) Insert the card into the board which you designate as hypervisor, and power on that board. The board will reboot once during this process.
  • 5) Wait until the hypervisor interface appears at the ip address of the skyminer router (assumes port forwarding) port :8000.
  • 6) repeat step 2 with the next microSD card, insert it in the next pi, and power on the board
  • 7) wait until the visor appears in the hypervisor user interface. The board will reboot once during this process
  • 8) Repeat steps 6 and 7 for every node in the skyminer
  • 9) After you have your cluster set up, be sure to whitelist your public keys

If you prefer instead to use a different computer as the hypervisor of your cluster, the easiest way is to connect that machine to the skyminer router and assign it the .2 ip address. Make sure your hypervisor is running and the RPC server is enabled in your configuration file (delete localhost but leave the port :3435)


Skyminer setup - Skyraspbian

The procedure for using the Skyraspbian image is very similar. The notable difference is that a static IP is not set for the hypervisor.

Every board will start a hypervisor instance, which may be manually configured to point at a remote / one hypervisor if desired.

Procedure

  • 1) Download the skyraspbian image and extract it from the archive
  • 2) Use balena etcher, or the dd / dcfldd command on linux, to write the image to a microSD card
  • 3) Insert the card into the board and apply power
  • 4) Log into your router interface and look for the list of DHCP Clients. Identify the board you just booted in the list.
  • 5) Check with a web browser for the hypervisor interface at the IP address you identified in the previous step, port :8000.
  • 6) repeat steps 2-5 with the next board.

Set Remote Hypervisor

  • 1) Access the hypervisor UI that you want the other boards to use as their hypervisor and copy the public key
  • 2) Access the next board (via ssh) and run skywire-autoconfig <pk> replacing <pk> with the public key you copied from the hypervisor
  • 3) Check the designated hypervisor to see that the additional visor appears in the list
  • 4) Repeat steps 2 and 3 for each additional board

After you have your cluster set up, be sure to whitelist your public keys


Skyminer setup - ArchlinuxARM

An archlinuxARM image for rpi has been included for advanced users.

Currently the archlinuxARM image requires a linux host to correctly set up the microSD card

  • 1) Download the archlinuxARM image and extract it from the archive
  • 2.1) determine the block device which represents the microSD card with the lsblk command
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 111.8G  0 disk
├─sda1   8:1    0   512M  0 part
└─sda2   8:2    0 111.3G  0 part /
sdb      8:16   0   1.8T  0 disk
├─sdb1   8:17   0   512M  0 part
└─sdb2   8:18   0   1.8T  0 part /node
sdX      8:16   0   16G   0 disk

in this example, 'sdX' is the microSD we want to write the image to. It will be something else for you.

  • 2.2) Writing the image to the microSD

ALWAYS DOUBLE CHECK TO MAKE ABSOLUTELY CERTAIN THE BLOCK DEVICE YOU ARE WRITING TO IS THE INTENDED TARGET OR RISK OVERWRITING YOUR OTHER DISKS!!!

substituite the block device representing your microSD card in one of the commands below using dd

sudo dd if=/path/to/rpi-4-arch-linux-20211017.img of=/dev/sdX

or, using dcfldd (faster?)

sudo dcfldd if=/path/to/rpi-4-arch-linux-20211017.img of=/dev/sdX

Note: the fastest writes will be achieved by accessing the TTY as root (Ctrl+Alt+F2) and omitting sudo from the above command

Do not close the terminal or remove the microSD card until the command has completed

When the command has completed, the image is written to the disk.

  • 2.3) Expand the root filesystem partition to occupy the remaining space on the microSD.

This can be done with any one of several tools: parted, gparted, gnome-disks, etc.

Using gnome-disks (a.k.a. gnome-disk-utility) is an easy graphical method.

Launch gnome-disks, select from the left column the "disk" which represents the microSD.

Select the root filesystem partition from Volumes

Below the selection are three buttons, the rightmost is a button with two gears

Click the button with the gears to see additional partition options

Select the fifth option from the top which says "Resize..."

A window will appear with a slider. Drag the slider all the way to the right, then click "resize" in the top right corner of the window.

The partition will be resized, but it is mounted in doing so.

Click the square (first button) in the row underneath the Volume selection to unmount it. The icon on the button will change to a triangle.

It should now be safe to remove the microSD card

  • 3.1) Boot and establish the SSH session

Insert the microSD card, ssh to the board.

in the ssh command below, substituite the IP address of the board on the network.

To determine the IP address, check your router's web interface.

It is typically one of the following:

if it is not one of these two ip addresses, the label on the router should tell you what the default interface address is.

Another way to determine the IP address of the router, if you are connected to it, check the IP address of your machine.

For example, if your computer's IP address is 192.168.254.115, it is likely that you will find the router's interface at 192.168.254.1

ssh alarm@192.168.0.2

if your router can work with hostnames, you can use this:

ssh alarm@alarm
  • Login as the default user alarm with the password alarm.
  • The default root password is root.

Change to the root user

su - root
  • 3.2) Initial OS config

run the following commands as root:

pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu git libnewt wget

To make downloading packages faster:

nano /etc/pacman.conf

Scroll down to

#ParallelDownloads = 5

Uncomment this line by removing the leading # and if desired, change 5 to 8 or however many parallel downloads you want to run.

For my ISP 8 works well.

Save the file (ctrl X, type y, press enter) then

systemctl reboot
  • 4.1) installing EndeavourOS-ARM

To avoid errors caused by not setting the time and other basic things, it is recommended to install endeavourOS-ARM.

SSH to the board again when it has booted and log back in with root.

Install EndeavourOS on the device with the following commands:

git clone https://github.com/endeavouros-arm/install-script.git
cd install-script
chmod +x *.sh
./endeavour-ARM-install-V2.X.sh

You will be greeted with a graphical installer session; similar to any linux installer.

Complete the steps. You only need a server installation for skywire, but if you have a board with more ram you can install a desktop if desired.

Reboot once you have finished the installation and log in as the user you created.

  • 4.2) installing skywire

All the tools of endeavourOS are at hand and the system is updated and ready to install skywire from the Arch User Repos (or any other skycoin software), which can be done with just one command:

yay -S skywire-bin

When the postinstall script is executed, skywire will be configured and started as hypervisor with no additional configuration necessary.

  • 4.3) Setting Remote Hypervisor

Text is printed out when the package is installed which provides the exact command used to set remote visors to use that instance as their hypervisor


Updates & Troubleshooting

See the Skywire Package Installation article for details about updating and troubleshooting.

Clone this wiki locally