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.
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).
The software requirements used in this project are listed below:
- 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. 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
Download the latest BIOS version and for instructions on how to install.
Create a Live USB Ubuntu* Flash Drive
- 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 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.
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
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.
- 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.