|In this codelab, we are going to setup Ubuntu Core on your Intel Joule. We’ll flash the sd card with an Ubuntu Core image and then configure it.
|Didier Roche email@example.com
Welcome to the world of Ubuntu Core! We are going to show you how to flash your eMMC for your Intel Joule board, and finally turn your Intel Joule into a Ubuntu Core 16 system.
What you’ll learn
- Create a Ubuntu SSO (Single-Sign-On) account
- How to set up your hardware environment
- How to flash Ubuntu Core 16 for your Intel Joule board
- How to do console-conf for your Ubuntu Core 16 system
What you’ll need
- 1 Intel Joule Dev Kit
- 1 power supply for the Joule (12VDC 3A)
- 1 HDMI monitor
- 1 USB keyboard
- 1 USB mouse
- 1 USB hub (connecting both keyboard and mouse)
- 1 micro HDMI to HDMI cable (connecting HDMI monitor)
- 1 SD card adapter
- 1 Ubuntu Desktop (16.04) or Windows system
How will you use this tutorial?
- Only read through it
- Read it and complete the exercises
What is your current level of experience?
Getting set up
Register an Ubuntu SSO account
If you have already had an SSO account, you can skip this step and move to the next. The account is used for console-conf in the following steps.
- An Ubuntu SSO account is required to set up a user profile. A user needs to create an Ubuntu SSO account before using Ubuntu Core 16. To create an Ubuntu SSO account, go to [https://login.ubuntu.com]
- Complete account verification
- Create a SSH Key This step is only necessary if you don’t have an SSH key on your system. - On your Ubuntu desktop, here is how you would create it:
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ ssh-keygen -t rsa
You will be prompted for a location to save the keys, and a passphrase for the keys. This passphrase will protect your private key while it’s stored on the hard drive:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.
Your public key is now available as
.ssh/id_rsa.pub in your home folder.
- For Window users, please refer to the following link about how to generate SSH key: [https://support.rackspace.com/how-to/generating-rsa-keys-with-ssh-puttygen].
- Import SSH Key
Clicking “SSH keys" on the left side shows the following screen. You can now just copy and paste the content of
id_rsa.pub file into the field. Confirm your ssh key by clicking on “Import SSH key”.
Create a bootable Ubuntu Core 16 SD card
In this step, you are going to flash a bootable image into a Ubuntu Core 16 SD card.
- Firstly, build your own Ubuntu Core image
- Insert your SD card or USB flash drive (you need an SD card adapter)
- Identify its address by opening the “Disks” application and look for the “Device” line. If the line is in the
/dev/mmcblk0p1format, then your drive address is:
/dev/mmcblk0. If it is in the
/dev/sdb1format, then the address is
/dev/sdb. You may also use the following command to find out your device’s name:
- Unmount it by right clicking its icon in the launcher bar, the eject icon in a file manager or the square icon in the “Disks” application
- It’s time to copy the image to your removable drive
- If the Ubuntu Core image file you have downloaded ends with an .xz file extension, run:
xzcat <image_path>/<image_file.xz> | sudo dd of=<drive address> bs=32M
- Else, run:
sudo dd if=<image_path>/<image_file> of=<drive address> bs=32M
- Then, run the sync command to finalize the process
- You can now eject your removable drive from your desktop
Ubuntu Core initial setup
Boot Intel Joule with Ubuntu Core 16
Power on the Joule board for booting on your new image: 1. Insert your SD card into your Intel Joule board 1. Configure your Joule’s BIOS so that SD card has higher boot priority over eMMC (you may enter BIOS by pressing F2 hotkey during the boot) 1. The system will boot two times then become ready to configure 1. The device will display the prompt “Press enter to configure” 1. Follow the instructions on the screen to configure your device 1. Press enter then select “Start” to begin configuring your network and an administrator account
Enter user’s account on Ubuntu One. Select “Done” to complete.
The configuration is completed. On the screen, the Ubuntu SSO username and the device IP address will be shown. The SSH keys linked to the user will be shown as well.
The user can now login to the system with username and ssh key registered on Ubuntu One. Use ssh client to login the system from another machine which has the same network as your Intel Joule board.
NOTE: only remote access via ssh is enabled until a password is set via instructions in the next step. Use the command to login Joule via ssh:
$ ssh <username of Ubuntu One>@10.101.46.211
where “10.101.46.211” is the IP address of your Ubuntu Core Joule device. It is shown at the top-left corner of your HDMI monitor after booting.
Your device is now ready to be used. Enjoy! You can now play with snap commands and check that your image contains all desired snaps with ‘ snap list’ .
That’s all folks!
Easy, wasn’t it?
Congratulations! You made it!
By now you should have successfully flashed and configured your Intel Joule board. You now are running latest Ubuntu Core system. You did configure a personal account to connect to it, and prevented the need for a default user account like “ubuntu” due to security concerns.
- Log in to Ubuntu Core system and start exploring the snap commands.
- Join the snapcraft.io community on the snapcraft forum.