Getting Started with Ubuntu* Core on an Intel® IoT Gateway

Introduction

This article demonstrates to new users how to install Ubuntu* Core on an Intel® IoT Gateway GB-BXTB-3825. The GB-BXTB-3825 is powered by an Intel® Atom™ E3825 dual-core processor which would be ideal for industrial applications such as data generation, data aggregation, and data analysis. Ubuntu* Core is a lightweight, transactional version of Ubuntu* designed for deployments on IoT devices. Snaps are universal Linux packages that are available to install on Ubuntu* Core to work on IoT devices and more. More information on the Gateway GB-BXTB-3825 is available here. You can get detailed information on the Ubuntu* Core here.

Hardware Requirements

The hardware components used in this project are listed below:

  • An Intel® IoT Gateway: GB-BXTB-3825
  • 2 USB 2.0 or 3.0 flash drives with at least 2GB free space available
  • USB keyboard and mouse
  • A monitor with VGA or HDMI interface
  • A VGA or HDMI cable
  • A network connection with Internet access
  • An existing Linux* system is required to generate the RSA key (see Figure-1 below) and to login with SSH into the Ubuntu Core (Figure-11 and Figure-12 below).

Software Requirements

The software requirements used in this project are listed below:

Generate a Host SSH Key

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

  • Click on the Personal details to fill out your information.
  • Generate an RSA key

Use an existing Linux system to generate the RSA key by running ssh-keygen-trsa on the Linux shell:

 Generate an SSH key on the Linux shell

Figure 1: Generate an SSH key on the Linux shell

Your public key is now available as .ssh/id_rsa.pub in your home folder /home/Ubuntu/.ssh/id_rsa.pub.

  • Click on the SSH keys and insert the contents of your public key /home/Ubuntu/.ssh/id_rsa.pub.

 Submitted the SSH keys successfully

Figure 2: Submitted the SSH keys successfully

 

Updating the BIOS

The Gateway should have its BIOS updated to the latest version. To check your Gateway BIOS version:

  • Go to Start -> Run -> type “msinfo32.exe” or
  • Turn on your Gateway and press F12 to enter the BIOS

Download the latest BIOS version and for instructions on how to install.

Create a Live USB Ubuntu* Flash Drive

Booting from the Live USB Flash Drive

  • Connect the USB hub, keyboard, mouse and the monitor to the Gateway GB-BXTB-3825.

 Gateway GB-BXTB-3825

Figure 3: Gateway GB-BXTB-3825

 

  • Insert the Live USB Ubuntu Desktop flash drive you created earlier in to the Gateway GB-BXTB-3825.
  • Turn on your Gateway GB-BXTB-3825 and press F12 on the key board to enter the boot menu.
  • Select the USB flash drive as a boot option.

 Select boot device

Figure 4: Select boot device

  • Select "Try Ubuntu without installing”.

 Try Ubuntu without installing

Figure 5: Try Ubuntu without installing

Install Ubuntu* Core Image

  • Insert the second USB flash drive containing the Ubuntu Core image file.
  • Open a terminal and type:
xzcat /media/ubuntu/<name of the second USB flash drive>/ubuntu-core-16-amd64.img.xz | sudo dd of=/dev/sda bs=32M status=progress; sync

 Flash Ubuntu Core

Figure 6: Flash Ubuntu Core

  • Reboot the Gateway. The Gateway will reboot from the internal memory where the Ubuntu Core has been flashed.

Configure the Gateway

  • After the Gateway has rebooted, you will see a prompt to Press enter to configure.
  • Select start to configure your network. Below is an example of the network configuration.

 Configure IPv4

Figure 7: Configure IPv4

 After network configuration

Figure 8: After network configuration

  • Enter the Ubuntu One email address that was set up earlier.

 Profile setup

Figure 9: Profile setup

 Configuration complete

Figure 10: Configuration complete

First User login

  • First, add RSA identities to the authentication agent by running ssh-add on the shell.

 ssh-add command

Figure 11: ssh-add command

  • Next, login with SSH into the Ubuntu Core from a different machine on the same network. The password is not required.

 ssh into Ubuntu Core

Figure 12: ssh into Ubuntu Core

  • Set a password in case you want to login from the local console on the IOT Gateway.

 Set a password

Figure 13: Set a password

Run Hello World Snap on LocalHost

Now the Gateway is ready for the snaps. Snaps are self-contained application bundles that contain most of the libraries and runtimes needed. It is a squashFS filesystem containing your app code and a snap.yaml file.

  • Sign in to a Snap store using an Ubuntu SSO account:

 Sign in to a snap store

  • Install the Hello Snap using the snap name:

 Install hello snap

Figure 15: Install hello snap

  • Run the Hello Snap:

 Run hello snap

Figure 16: Run hello snap

Summary

We have described how to install Ubuntu* Core on an Intel IoT Gateway GB-BXTB-3825 and also how to run the Hello World Snap. Visit the Snapcraft site to make your own snap and enjoy the power of the Intel® IoT Gateway GB-BXTB-3825.

Snap Documentation

Key References

 

About the Author

Nancy Le is a software engineer at Intel Corporation in the Software and Services Group working on Intel Atom® processor enabling for Intel® IoT projects.

For more complete information about compiler optimizations, see our Optimization Notice.