Contributing to COVID-19 Research from Home: Putting your Raspberry Pi to Work.

Robert Thorburn
Cyber Security Southampton
7 min readMay 4, 2020

Low power Single Board Computers (SBCs) like the Raspberry Pi are not generally associated with real-world high-performance computing. Usually, the only link is educational use or pet projects, but one initiative aiming to change that is Rosetta at home. Like other similar projects, it allows private citizens to donate some part of their home PC’s processing power to international researchers. The home user simply installs an app, and the rest is managed automatically. One thing that sets the Rosetta project apart though is that through the correct software it allows for ARM-based SBCs to be used. Although such systems are low power, there are millions of them in circulation. Cumulatively then, they can have a significant impact.

If you have an ARM-based SBC capable of supporting a 64-bit OS, then the steps needed to get Rosetta up and running are pretty straightforward. They are presented below using a Raspberry Pi 4, with OS installation from scratch, though this may not be needed if you have a compatible OS already installed. If so, just skip down to the Software Installation section. A Raspberry Pi 3 or 4 will do the trick but for other SBC’s you will need to check. If you are unsure of your OS’s suitability or that of your SBC, simply run the following command from the command line:

lscp

You will be presented with a lengthy output, but we are only interested in the first two items. The first item is “Architecture” and must be “x86_64”. The second item is “CPU op-mode(s)” and should read” 32-bit, 64-bit”. If it does not include “64-bit”, then your OS will not be suitable and must be overwritten for the needed software to work. If so, please make sure that you backup any important files before installing your new OS.

The Operating System

Technically any 64-bit OS should do the trick, but a lightweight or terminal only distribution will be preferred here since the SBC used will be dedicated to this single task. Our choice to meet these criteria is 64-bit Ubuntu server for Raspberry Pi. Please make sure to select the 64-bit OS for your Raspberry Pi model (3 or 4) from the download link here: https://ubuntu.com/download/raspberry-pi

Once you have downloaded the OS to a PC or laptop, you need to write it to a micro SD card for use in the Raspberry Pi. It is common practice for micro SD cards to be sold with a full-size SD card adapter allowing for it to be read by an SD card reader such as those found on many laptops. Alternatively, you can also use a USB card reader if your PC/Laptop does not support SD cards. Next, you need to use software to write the OS to the micro SD card. Our preferred solution is Belena Etcher, and you can download it here: https://www.balena.io/etcher/

Once installed, open up Etcher, insert the micro SD card into the card reader, and use Etcher’s simple interface to select first the Ubuntu OS you downloaded and secondly the micro SD card to write it to. Etcher will do the rest and notify you when the micro SD card is ready. Please make sure you have the micro SD card selected when writing the OS to it, since Etcher will overwrite whatever is in the target drive. With that done, we are ready to get the SBC running. If you need more help on the OS setup, especially if this is your first time doing it, please have a look at the Raspberry Pi guide located here: https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up

Remove the micro SD card from your computer and insert it into the card slot at the bottom of the Raspberry Pi or other SBC, connect an Ethernet cable and then power it on. At this point, you can plug a screen and keyboard into your SBC, or you can ssh into it. We will describe the ssh option below, but all other steps will be identical. Please note that if you are a novice user, the screen and keyboard option will be easier, and you can now skip to the setup section below.

To ssh into the SBC, you will need to connect it to your router via Ethernet, have ssh enabled on the SBC and know the login credentials. For Ubuntu server ssh will be enabled by default, while the username and password will both be “ubuntu”. We will also need to know the IP address of the SBC to ssh into it. You can use any network scanner to find a new device and its IP address on your network. For this task, I usually use Netdiscover due to its lightweight nature. If needed, you can get Netdiscover via your package manager or else here: https://github.com/alexxy/netdiscover

Once you have everything ready, go ahead and ssh into the SBC using your preferred tool. For this, I used PuTTY which you can download here: https://www.chiark.greenend.org.uk/~sgtatham/putty/

Setup

With your SBC has booted up you are either connected via ssh or have plugged in a screen and keyboard. You will be presented with a terminal window only (no graphical interface here) and asked for a username and then the password. Enter “ubuntu” for both (without the quotation marks, and assuming you are using Ubuntu server). You will now be logged in and the first order of business will be to change the system password. On Ubuntu server you will be prompted to do so as follows:

First login

The “(current) UNIX password” is “ubuntu” and the new password prompted for thereafter will be whatever you wish. Once this is done, you will need to ensure that your system is up to date. First run:

sudo apt-get update

Once this is done you need to run:

sudo apt-get upgrade
Update and upgrade

You will be prompted to install new packages and should select “Y” to proceed. Upgrading the system could take quite some time so while this is running, we need to create a Rosetta account. Head over to the Rosetta site at https://boinc.bakerlab.org/rosetta/ and click the “sign up” tab top right.

Sign up at top right

Follow the onscreen prompts to create your account. Once done look at the right top side of your account dashboard and under the “Community” heading locate the “member of team” section. Click the link to the right of it to join a team. This is not strictly necessary but since we are trying to show the utility of ARM-based SBCs, it would be good to join the “crunch-on-arm” team. Once done, your “Community” tab should look as follows:

Crunch-on-arm

Software Installation

Once your account is set up and the OS upgraded, we can proceed. To install the needed software, we will use the following command and select “Y” at the install prompt:

sudo apt-get install boinc-client boinctui
Install boinc

Once the installation is complete, we can launch the software using the following command:

boinctui

You will be presented with a configuration screen, simply hit enter to continue. One of the first things you will probably notice is the pretty awful interface. Hit F9 to enter the menu and from the “View” tab select “ASCII line draw” and hit “enter” as shown below:

Change the view

Now hit F9 again and from the “Projects” tab select “New Project” and then “Rosetta@home”. You will now be prompted to enter your email and password as you used to set up your account on the website.

Join Rosetta@home

That is all there is to it, from here you can just let it run and the software will take care of everything. To get a glimpse of what is going on though you can check the system display in the boinc software or else go to your profile on the Rosetta site and under “Computing and Credit” look for “Computers on This Account” and click the “view” link next to it. Please note that the display in the software shows running progress while the website is slower to update:

Let the results roll in!

As of the time of publication the crunch-on-arm team is in the top 1% of performers, showing how big a contribution a small computer can make!

--

--

Robert Thorburn
Cyber Security Southampton

Legal(ish) adventures in IoT and privacy! PhD student in Web Science at Southampton University. @WebSciGuy