65.9K
CodeProject is changing. Read more.
Home

Getting Started with Ubuntu Core on an Intel® IoT Gateway

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Jul 21, 2017

CPOL

5 min read

viewsIcon

14177

This article demonstrates to new users how to install Ubuntu* Core on an Intel® IoT Gateway GB-BXTB-3825.

Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.

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 at http://b2b.gigabyte.com/Embedded-System/GB-BXBT-3825-rev-10#ov. You can get detailed information on the Ubuntu* Core at https://www.ubuntu.com/core.

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 from https://login.ubuntu.com. 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:

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.

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

Visit http://www.intel.com/content/www/us/en/support/boards-and-kits/000005850.html to 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.

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.

Figure 4: Select boot device
  • Select "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

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.

Figure 7: Configure IPv4

Figure 8: After network configuration
  • Enter the Ubuntu One email address that was set up earlier.

Figure 9: Profile setup

Figure 10: Configuration complete

First User login

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

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.

Figure 12: ssh into Ubuntu Core
  • Set a password in case you want to login from the local console on the IOT Gateway.

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:

  • Install the Hello Snap using the snap name:

Figure 15: Install hello snap
  • Run the 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 https://snapcraft.io/docs/build-snaps to make your own snap and enjoy the power of the Intel® IoT Gateway GB-BXTB-3825.

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.