Install Ubuntu Core on Raspberry Pi 3
In this post we’re going to walk you through installing Ubuntu Core on a Raspberry Pi 3.
Raspberry Pi is a prime target for Ubuntu Core. And it’s a great platform to get started with as it has great support. Much of this post was adapted from this tutorial.
Step 0: Before you start
In this post we are assuming that you are running linux on your machine, but you should be able to adapt it easily enough if you’re running a Windows or OSX.
Make sure you have for following before you get started:
- A Raspberry Pi 3
- Micro SD card (2GB or larger, if you’re buying one why not go big, 64GB?)
- Internet connection to download >350MB
- Monitor with HDMI
- HDMI Cable
- USB Keyboard
- USB-to-SD dongle IF the machine where you will write the SD does not have an SD slot
- Local network (wifi or ethernet) connection with access to the internet. The raspberry pi and your laptop will need to both be connected on this network at the same time.
Step 1: Step up your Ubuntu SSO account
The way we will set up Ubuntu Core in this post will require you to associate the device with an Ubuntu SSO account. If you don’t have an account you can created one here. Once you have an account, you’ll want to upload your public ssh key. To find your ssh public key open a terminal and run the command:
ls -l ~/.ssh. If you see a file ending in
.pub that’s the file we’re looking for. Otherwise run the
ssh-keygen command (when you do you can just hit enter and accept all the defaults). Finally, run the command
cat ~/.ssh/id_rsa.pub and copy the output of that command. Below is an example:
Step 2: Download
Start by downloading the following files
- The ubuntu core image for raspberry pi 3 (255MB)
- Etcher (If your comfortable with writing sd cards and you have a preferred method you can skip this step) (81MB)
Step 3: Flash the microSD card
- Open zip file of Etcher that you downloaded in the previous step.
- Extract the file to your desktop (or anywhere that’s easy to find). It should be named something like “balenaEtcher-1.5.59-x64.AppImage”.
- Insert you SD into your laptop (If you’re using a usb dongle connect it with the sd card inserted)
- Now navigate to the file you extract and open it. The Etcher UI will appear.
- Click “Select Image” and find the Ubuntu Core image that you downed in step 2.
- Etcher should automatically select SD card you insert. Verify it chose the correct one.
- Click “Flash!”
- You’ll be prompted to insert your password.
- It will take a couple minutes to flash your sd. When it’s finished close Etcher and eject your sd card.
First boot setup
Now you’re ready to boot your raspberry pi. Insert the sd card. Attach the usb keyboard and monitor. Then connect the power. When it boots simply follow the instructions on the screen. It should walk you through the following steps:
- The Ubuntu logo should appear on the screen. Then it will go blank for several minutes. This can take awhile, but don’t worry it’s working.
- Press enter to begin the configuration
- Select the network you’re using. (It should be the same network as your laptop)
- If you’re using wifi, you’ll select ‘wlan0’
- Then choose configure network.
- Then choose “Choose a visible network”
- Find your wifi network in the list
- Then use the arrow keys to navigate to the password field and enter the wifi password
- Choose done. Then choose ‘done’ two more times.
- It will ask you to hit enter to configure the device again. Press enter. Then press enter again.
- Enter your email address associated with your Ubuntu SSO account.
If all worked well you’ll see a message like below. It should also display the ip address of your device.
This device is registered to <Ubuntu SSO email address>. Remote access was enabled via authentication with the SSO user <<Ubuntu SSO user name> Public SSH keys were added to the device for remote access. <Ubuntu SSO email address> can connect to this device via SSH:
ssh <<Ubuntu SSO user name>@<ip-address>
Press enter to exit the configuration.
Connect over SSH
Now your device is fully set up and you can begin using it. To connect to the pi. Run the command below: