Install Ubuntu on the Raspberry Pi Compute Module 3

Install Ubuntu Core

We will walk you through the steps of flashing Ubuntu Core on a Compute Module 3. At the end of this process, you will have a board ready for production or testing snaps.

Minimum requirements

  • An Ubuntu SSO account with an SSH key
  • A Compute Module 3
  • A Compute Module IO board
  • A microSD card
  • An Ubuntu Core image
  • Two micro USB to USB cables (one for power, one to setup the CM from the host)
  • An HDMI cable and a display
  • A USB keyboard
  • A USB to RJ45 adaptor or a WiFi dongle
  • A USB hub to attach the keyboard and the RJ45 adaptor/WiFi dongle (note that the keyboard and display can be replaced with a serial cable connected directly to pins of the IO board)

Installation instructions

  1. 1 Setup an Ubuntu SSO account

    An Ubuntu SSO account is required to create the first user on an Ubuntu Core installation.

    1. Start by creating an Ubuntu SSO account.
    2. Import an SSH Key into your Ubuntu SSO account. (instructions)
  2. 2 Download Ubuntu Core

    Get the correct Ubuntu Core image for your board:

  3. 3 Setup USBboot on your host system

    On the host system: Ubuntu Desktop 16.04 or above:

    1. In a terminal, download the USBboot tool you will use to setup the board, and install its build dependencies:

      git clone --depth=1
      sudo apt install libusb-1.0-0-dev
    2. Then cdmake and start the resulting binary as root:

      cd usbboot
      sudo ./rpiboot
    3. Once started, it will wait for the Compute Module to be attached to the machine.
  4. 4 Setup the Compute Module IO board

    On the Compute Module IO board:

    1. Position the Compute Module on the IO board.
    2. Attach the USB hub, RJ45 adaptor, keyboard and monitor (HDMI) to the board.
    3. Ensure the J4 switch (USB SLAVE BOOT ENABLE) on the IO board is in the EN position.


    4. With the first micro USB to USB cable, plug the hose machine into the IO Board USB slave port (J15).


    5. With the second micro USB to USB cable, power on the IO board.
  5. 5 Flash the board from your host system

    On your host system:

    1. The USBboot tool should have recognized the attached Compute Module and mounted the EMMC partition as a new device.
    2. Identify the device by opening the "Disks" application:
      • Locate the EMMC partition of the Compute Module in the left pane.
      • Note down its "Device" address on the right pane.
      • If the partition is mounted, unmount it by clicking the square icon below the partition diagram or the eject icon in a file manager
    3. Download the Ubuntu Core image. When this is done you should have an ubuntu-core-16-cm3.img.xz file in your ~/Downloads directory
    4. Flash Ubuntu Core on the EMMC partition with:

      xzcat ~/Downloads/<image file .xz> | sudo dd of=<device address> bs=32M; sync
    5. This process will take some time. After completion, you can reboot your Compute Module IO board and follow the first boot process with the display, keyboard and RJ45/WiFI dongle attached to it.
  6. 6 First boot setup

    1. The system will boot then become ready to configure.
    2. The device will display the prompt “Press enter to configure”.
    3. Press enter then select “Start” to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials.
    4. At the end of the process, you will see your credentials to access your Ubuntu Core machine:

      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.
  7. 7 Login

    Once setup is done, you can login with SSH into Ubuntu Core, from a machine on the same network, using the following command:

    ssh <Ubuntu SSO user name>@<device IP address>

    Your user name is your Ubuntu SSO user name, it has been reminded to you at the end of the account configuration step.

First boot tips

  • During setup, console-conf will download the SSH key registered with your Store account and configure it so you can log into the device via ssh <Ubuntu SSO account name>@<device IP address> without a password.
  • There is no default ubuntu user on these images, but you can run sudo passwd <account name> to set a password if you need a local console login.

Install and develop snaps

Your board is now ready to have snaps installed — get started with the snap command

You can install a classic Ubuntu environment on top of Ubuntu Core to have a fully-fledged development environment and develop snaps on target

Before you start, get your IoT security story straight

A recent Canonical survey of 2,000 consumers suggests that a shockingly high percentage of connected devices may be vulnerable to botnets, hackers and cyber attacks:

  • Only 31% of consumers update the firmware on their connected devices as soon as updates become available.
  • 40% of consumers have never performed firmware updates on their connected devices
  • 40% of consumers believe that performing firmware updates on their connected devices is the responsibility of either software developers or the device manufacturer
  • All information provided will be handled in accordance with the Canonical privacy policy.