How to run Ubuntu Snappy Core in Raspberry Pi 2

Source: Internet
Author: User

How to run Ubuntu Snappy Core in Raspberry Pi 2

The Internet of Things (IoT) era is approaching. Soon, in a few years, we will ask ourselves how we were able to survive without the Internet of Things, just as we now suspect that there was no mobile phone in the past. Canonical is a fast-growing but open-market competitor of Iot. The company claims to place its bet on IoT, just as they have done on the cloud. At the end of January this year, Canonical started a small Ubuntu Core-based operating system named Ubuntu Snappy Core.

Snappy represents two meanings. It is a new packaging format used to replace deb, and also a front-end used to update the system, the idea of atomic update was borrowed from CoreOS, red hats, and other systems. Since Raspberry Pi 2 was put into the market, Canonical soon released the Snappy Core version for Raspberry Pi. The first generation of Raspberry Pi is based on ARMv6, And the Ubuntu ARM image is based on ARMv7, so it cannot run ubuntu. However, this situation has changed. Canonical, by releasing the Snappy Core RPI2 image, seized the opportunity to prove that Snappy is a system for cloud computing, especially for Iot.

Snappy can also run on other clouds such as Amazon EC2, Microsoft Azure, and Google's Compute Engine. It can also be virtualized on KVM, Virtuabox, and vagrant. Canonical Ubuntu has embraced heavyweight players such as Microsoft, Google, Docker, and OpenStack, and has reached partnerships with small projects. In addition to some startups, such as Ninja Sphere and Erle Robotics, there are also some development board manufacturers, such as Odroid, Banana Pro, Udoo, PCO, Parallella, quanzhi, and Snappy. Snappy Core also hopes to run on the vro as soon as possible to help improve the policy that the router manufacturer rarely updates firmware.

Next, let's see how to run Ubuntu Snappy Core on Raspberry Pi 2.

Snappy images for Raspberry Pi 2 can be downloaded from the Raspberry Pi website. The extracted image must be written to an SD card of at least 8 GB. Although the original system is small, the atomic upgrade and rollback functions occupy a large amount of space. After starting Raspberry Pi 2 With Snappy, you can use the default username and password (both ubuntu) to log on to the system.

You can use sudo directly after it is configured. For security reasons, you should use the following command to modify your user name.

  1. $ sudo usermod -l <new name><old name>

Or you can useadduserAdd a new user for you.

Because RPI lacks the hardware clock and the Snappy Core image does not know this, the system has a small bug: many errors will be reported when processing some commands. However, this is easy to solve:

Use this command to check whether the bug is affected:

  1. $ date

If the output is similar to "Thu Jan 1 01:56:44 UTC 1970", you can correct it as follows:

  1. $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015"

Change to your actual time.

Now you may want to check whether there are any available updates. Note that Common commands cannot be used:

  1. $ sudo apt-get update && sudo apt-get distupgrade

At this time, the system won't let you pass, because Snappy uses its own streamlined, dpkg-based package management system. The reason for this is that Snappy runs many embedded programs, and you will try to simplify everything as much as possible.

Let's take a look at the most important part and understand how the program works with Snappy. The SD card running Snappy has three partitions besides the boot partition. Two of them constitute a duplicate file system. These two parallel file systems are mounted in read-only mode and only one is activated at any time. The third partition is a partially writable file system that allows users to store data. By updating the system, the partition marked as 'System-a' will maintain a complete file system, known as the core, while another parallel file system will still be empty.

If we run the following command:

  1. $ sudo snappy update

The system will update the image as a whole on 'System-B ', which is a bit like updating an image file. Next, you will be notified to restart the system to activate the new core.

After the restart, run the following command to check whether your system has been updated to the latest version, and which core is activated?

  1. $ sudo snappy versions -a

After two steps: update and restart, you can see that the activated core has been changed.

We have not installed any software so far, so we can use the following command to update it:

  1. $ sudo snappy update ubuntu-core

If you plan to update a specific OS version, this is enough. If something goes wrong, you can use the following command to roll back:

  1. $ sudo snappy rollback ubuntu-core

This will roll back the system status to the update.

Let's talk about the software that makes Snappy useful. I will not talk much about how to build software and add software to the Snappy app store. But you can learn more through the IRC channel # snappy on Freenode, there are a lot of people involved. You can access http: // <ip-address>: 4200 in a browser to browse the App Store, install software from the store, and then access the http://webdm.local in the browser to start the program. It is not difficult to build software for Snappy, and there are also ready-made reference documents. You can also easily migrate the DEB installation package to Snappy in Snappy format.

Although Ubuntu Snappy Core attracts us to study the new Snappy installation package format and the Canonical atomic update operation, it is not very useful in the production environment due to limited availability. However, since building an Snappy environment is so simple, it seems to be a good opportunity to learn new things.

Install NodeJS on the (Raspberry Pi) Raspberry Pi

Install Weston on Raspberry Pi

Linux OS for Raspberry Pi is available

Raspberry Pi (Raspberry Pi) trial note

Introduction to Raspberry Pi (Raspberry Pi) installation, IP configuration, and software source

Via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html

Author: Ferdinand Thommes Translator: Ezio Proofreader: wxy

This article was originally translated by LCTT and launched with the Linux honor in China

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.