Happy to see Ubuntu Core 16 finally released today. Ubuntu Core 16 is a snap-based system. It includes Foundation, Applications, kernel, Core operating systems and gadgets. All of this is installed and updated by a tool called Snapd that runs in the background. The latest Ubuntu Core Image is available at the following address:

Releases.ubuntu.com/ubuntu-core…

The latest image can be found at the following address:

Cdimage.ubuntu.com/ubuntu-core…

You can also find bubblegum-96 image: github.com/uCRDev/Bubb…

It currently includes distributions for PC (AMD64, I386), and support for Raspberry PI2/3 and QualComm’s DragOnboard 410C. Once the image is decompressed, it can be started directly. The PC version can run directly on QEMU-KVM, VirtualBox, or a true x86 machine (such as Intel’s NUC).

 

Create an Ubuntu One account

 

Before doing any installation, we must create an Ubuntu One account. See the article “Creating an Ubuntu Core Account and adding a new account for Ubuntu Core Devices” for detailed steps. This account will be used in the setup console-conf below. When creating an account, you must remember to check in the Launchpad account with a key from SSH on your computer.

 

 

Test Ubuntu Core on the Ubuntu Desktop

 

To facilitate testing on a PC, we can perform the following operations on our Ubuntu Desktop system:

1) Install qEMU-KVM

 

$ sudo apt-get install qemu-kvm ... say yes and install the packages...Copy the code

Let’s check if our PC supports hardware virtualization:

 

$ kvm-ok  
INFO: /dev/kvm exists  
KVM acceleration can be used  
Copy the code

 

If you see the results above, congratulations! This is for the best – it means Snappy will run fast on your system and take full advantage of hardware acceleration. If you do not see the above results, you can try enabling hardware virtualization in your COMPUTER’s BIOS. If KVM is not supported on your system, we recommend that you try Ubuntu running on the cloud

 

2) Download Ubutu Core Image

 

We use the following command to download the image we need (using 64bit as an example)

 

$ wget http://releases.ubuntu.com/ubuntu-core/16/ubuntu-core-16-amd64.img.xz
Copy the code

 

After downloading, we use the following command to decompress:

 

$ unxz ubuntu-core-16-amd64.img.xz 
Copy the code

 

3) Start the KVM

 

You can now start the VIRTUAL KVM from Terminal in the directory where the image is located:

 

$ kvm -smp 2 -m 1500 -redir tcp:10022::22 ubuntu-core-16-amd64.img
Copy the code

 

Here we have redirected the virtual machine’s port address:

 

-10022 Local port will point to port 22 on the VM (SSH)

 

During startup, the message “SSH [email protected]” displayed by console-conf is a bit misleading. In fact, we can use the following command to log in to our KVM:

 

 

$ ssh -p 10022 USER@localhost
Copy the code

 

Of particular note: we had to replace the USER above with our own Ubuntu One USER name. In my case:

 

$ ssh -p 10022 liu-xiao-guo@localhost 
Copy the code

 

If you add the following content to your Desktop directory ~/.ssh/config, and it says:

 

Host kvm.snappy
     Hostname localhost
     Port 10022
     User USER
     UserKnownHostsFile /dev/null
     StrictHostKeyChecking no
Copy the code

 

Again, we need to replace the USER above with our own Ubuntu One USER name. Then you can use the following command to start:

 

$ ssh kvm.snappy
Copy the code

 

Once you’re in Ubuntu Core, you can familiarize yourself with snap commands by reading the article “Ubuntu Core and Its Use.”

 

If you want to install Ubuntu Core 16 into Virtualbox, you can refer to my other article “Installing Ubuntu Core 16 in Virtualbox”.

 

Install on the Raspberry PI2/3 DragOnboard

 

 

You can refer to my previous article “How to Install Ubuntu Core for Raspberry PI and compile it in Snap” to install Ubuntu Core on our supported development boards. For developers with good English, see the link to install our Ubuntu Core system on the development pad. Hao Jianlin, an avid Ubuntu Core developer, has also created his own post on how to install Ubuntu Core on QualComm’s DragOnboard. Please refer to the link.

 

Here’s another method you can use:

 

1) Install Snapd

 

If you haven’t already installed snapd on your Ubuntu Desktop (16.04), use the following command to install it. So my system can support the installation of snap application:

 

$ sudo apt update  
$ sudo apt install snapd  
Copy the code

 

 

2) Brush the image into the Ubuntu Core hardware

 

We can write the image to the SD card we want by using the following command:

 

$ sudo snap install --devmode --beta godd
$ sudo /snap/bin/godd ubuntu-core-16-pi2.img.xz
[this will print a message showing what devices are removable]
$ xzcat ubuntu-core-16-pi2-rc2.img.xz | sudo /snap/bin/godd - /dev/sdXX
Copy the code

Remember that in the actual operation, we need to replace the above sdXX with our own SD card device. We can view our devices by command:

 

$ lsblk
Copy the code


 

In my case, FOR example, I need to switch to MMCBLk0.

 

 

We inserted the image-copied SD card into our Raspberry PI board and launched it. We need a monitor with HDMI and a keyboard. For raspberry PI, we can also use a serial cable by default. Please refer to my article “How to Install Ubuntu Core for Raspberry PI and Compile it in Snap.”

 

For Qualcomm’s DragOnboard, since it doesn’t have an Internet connection port, we can sell a USB network adapter on Taobao. The specific connection diagram is as follows:

 

 

In order to enable our Dragon board to start from SD card, we must set the switch on the board to 0-1-0-0. If you still prefer to use WiFi to connect to your own board, you can configure your own WiFi on Ubuntu Core by referring to “How to Configure Your own WiFi on Ubuntu Core”.

We can use SSH to log in:

 

$ ssh <your-launchpad-account-name>@your_device_ip
Copy the code

 

When we log in, we can create a password for our device account, so that if our device is connected to the monitor and keyboard, we can also log in with a common username and password:

 

$ sudo passwd <your-launchpad-username> <your-password>
Copy the code

 

At startup, you need to enter the email address of your Ubuntu One account and it will automatically produce the appropriate SSH keys that match your account. If you do not already have an Ubuntu SSO (Single Sign On) account, please apply at the following address:

 

login.ubuntu.com/

 

After creating your own account, don’t forget to add your own public SSH keys to your account. This account will be used to launch our Ubuntu Core system setup for the first time. If you don’t know how to create your own Ubuntu One account, please refer to my article “Creating an Ubuntu Core Account and adding a new account for Ubuntu Core Devices”.

 

If you compile slowly on your device (due to redownloading packages from the web every time), we can improve our build speed by referring to the article “How to Build Snap Apps Faster”.

 

3) Pack our Ubuntu Core application

 

I can use the following command:

$snapcraft $snap pack <==== Modify /meta/snapCopy the code

More information about Ubuntu Core development can be found at “Introduction to Ubuntu Core Development (Video)”.