Skip to content

ArchlinuxARM

Moses Narrow edited this page Jan 23, 2022 · 1 revision

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

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


Clone this wiki locally