Table of Contents

Ubuntu Core

RPi 2 UBUNTU core

Ubuntu core is a so called embedded Linux used to host SNAP apps and Microk8s. It is not designed for development of SNAPs, only their deployment.

This guide is for the UBUNTU core 22 on the RPi version 2.

The initial problem with this is that it requires a monitor and US keyboard to setup.

If WiFI is required, then it must be supported and the only supported USB wireless adapter at hand was a Broadcom type BCM43143/2. Neither a RALINK or Atheros USB adapter were supported.

The integrated WiFi on the RPi3 and RPi4 should also be supported but I have not tested this.

It is necessary to setup the system using supported hardware at the outset and UBUNTU core can be considered to be a SNAP appliance.

Install

Download Ubuntu Core from here.

Eg. for Raspberry Pi 2.

wget https://cdimage.ubuntu.com/ubuntu-core/22/stable/pending/ubuntu-core-22-armhf+raspi.img.xz

Write the image to a microSD card.

xzcat ubuntu-core-22-armhf+raspi.img.xz | dd if=/dev/stdin of=/dev/sda bs=4M

The official RPi install guide can be found here.

Setup

After booting the RPi with UBUNTU core for the first time very little happens except for a flashing cursor. Do not be concerned, just wait for the following to appear at a later time:

Press enter to configure.

After enabling DHPCv4 on the network interface and it will ask for an email address (remember that the @ symbol is SHIFT-2 with the US keyboard layout).

The e-mail address must be registered on UBUNTO ONE at https://login.ubuntu.com/ and you must have created an SSH key and imported the public key on the website. This will be download to the RPi 2.

SSH keygen

If you need to create an SSH key compatible with UBUNTU one, it can be done like this.

ssh-keygen -t rsa -b 4096 -f  ~/.ssh/id_rsa_ubuntu
SSH login

With the private key created above, login to the SNAP appliance.

ssh username@hostname -i  ~/.ssh/id_rsa_ubuntu
...
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1008-raspi armv7l)

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

 * Ubuntu Core:     https://www.ubuntu.com/core
 * Community:       https://forum.snapcraft.io
 * Snaps:           https://snapcraft.io

This Ubuntu Core 22 machine is a tiny, transactional edition of Ubuntu,
designed for appliances, firmware and fixed-function VMs.

If all the software you care about is available as snaps, you are in
the right place. If not, you will be more comfortable with classic
deb-based Ubuntu Server or Desktop, where you can mix snaps with
traditional debs. It's a brave new world here in Ubuntu Core!

Please see 'snap --help' for app installation and updates.

`username' above is what was created on the UBUNTU one or UBUNTU launchpad site.

SNAPS

List installed SNAPS
snap list
Name       Version        Rev    Tracking       Publisher   Notes
core22     20220706       278    latest/stable  canonical✓  base
pi         22-2           133    22/stable      canonical✓  gadget
pi-kernel  5.15.0-1008.8  479    22/stable      canonical✓  kernel
snapd      2.57.1         16781  latest/stable  canonical✓  snapd