Getting Started with Ubuntu Core on an Intel® IoT Gateway
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:
- Go to http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-desktop-amd64.iso and download the Ubuntu Desktop 16.04.2 LTS image
- Download Ubuntu Core image
- Bios update (see Updating Bios section below)
- Rufus USB installer (optional)
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:
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.
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
- Go to http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-desktop-amd64.iso and download the Ubuntu Desktop 16.04.2 LTS image
- Visit https://rufus.akeo.ie and download the Rufus USB installer. Using the Rufus USB installer to put the Ubuntu image onto the USB flash drive is one of the methods.
- Follow instructions in this link https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows to 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.
- 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 "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
- 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.
- Enter the Ubuntu One email address that was set up earlier.
First User login
- First, add RSA identities to the authentication agent by running ssh-add on the shell.
- Next, login with SSH into the Ubuntu Core from a different machine on the same network. The password is not required.
- Set a password in case you want to login from the local console on the IOT Gateway.
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:
- Run the 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
- Intel® Developer Zone: https://software.intel.com/en-us/iot/home
- GB-BXTB-3825 Product overview: http://b2b.gigabyte.com/Embedded-System/GB-BXBT-3825-rev-10#ov
- GB-BXTB-3825 Product: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
- Ubuntu Core: https://www.ubuntu.com/core
- Generate an SSH Key: https://help.ubuntu.com/community/SSH/OpenSSH/Keys
- Create a bootable USB stick on Windows*: https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows
- Download Rufus USB Installer: https://rufus.akeo.ie
- Get started with the snap command: https://developer.ubuntu.com/core/get-started/intel-nuc
- Build snaps: https://snapcraft.io/docs/build-snaps
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.