Monday, May 18, 2015

How to Install Snappy Ubuntu Core to Raspberry Pi 2

While it isn’t a distribution for everyday use, Ubuntu Core is being positioned by its creator Canonical as the future of mobile and embedded computing. As a result, it can’t hurt to have a play ahead of time and, if you’re planning on creating and distributing packages for Ubuntu smartphones, Ubuntu Core on a Raspberry Pi offers a cheap way to start experimenting.

1. Download Ubuntu Core 

At the time of writing, Ubuntu Core wasn’t available through the NOOBS installer. As a result, the only way to get it up and running is to manually download the image file. Head to [www.raspberrypi.org/downloads] and download the latest release, which at the time of writing was Ubuntu Core Alpha 02. Note that, as Ubuntu requires at least the ARMv7 architecture, it’s incompatible with the ARMv6 original Raspberry Pi hardware. When the download has completed, extract the image file somewhere convenient.

2. Write image to micro-SD card 

As with Open ELEC, the Ubuntu Core image needs to be written to a micro-SD card, completely wiping any data currently on the card. Connect your card to your PC via a reader, then download Win32 ImageWriter from Google and use it to write the uncompressed image file. Users of Linux, OS X and other Posix-style operating systems can instead use the dd command line to write the image as with the following command, where XXX is the device ID of your SD card:

dd if=pi-snappy.img of=/dev/XXX

3. Update via Snappy

If you’re wondering why Ubuntu Core is often called ‘Snappy’ Ubuntu Core, it’s a reference to its new package manager. While the mainstream Ubuntu distribution uses the apt package manager, just like Raspbian, Ubuntu Core uses Snappy. For embedded use, Snappy has numerous benefits, including the ability to roll back any package to any point in time, but it will take time to get used to it. To make sure your Ubuntu Core installation is fully up to date, insert the micro-SD and plug in a keyboard, display, network cable and power, then log in with the username ‘ubuntu’ and password ‘ubuntu’. Type the following command:

sudo snappy update-versions

If you’re told that there are upgrades available, you can view and install them with:

snappy versions
sudo snappy update packagename

If you receive a certificate error, you’ll need to manually set the date and time on your system:

sudo date -s “Wed Apr 1 09:00:00 GMT 2015”

Naturally, change the date for the actual date and time of when you run the command, in 24-hour format.

4. Install WebDM

While most work on Snappy Core takes place at the command line, you can make your experience a little easier by installing WebDM – a package manager that’s accessible over the Raspberry Pi’s network port. Depending on the current release version and defaults selected, WebDM may or may not already be installed. To check, simply attempt to install it:

sudo snappy install webdm

Once the package has installed, if it wasn’t previously installed, you can verify it’s working by visiting http://raspberryip:4200 on the browser of any machine on the same network as the Pi, replacing ‘raspberryip’ with the Pi’s IP address. If you don’t know its IP address, go back to the terminal and type the following command:

ifconfig | grep inet\ addr

You can browse and install Software packages on this interface, but be aware that Ubuntu Core is in a very early alpha stage, so there isn’t much to see at present.

5. Experiment

As Ubuntu Core is in a very early alpha stage, it needs plenty of people to experiment with developing and using Snappy-packaged applications. The best way to get a handle on doing so is to visit the official tutorial at http:// developer.ubuntu.com/en/snappy, where you can take a tour of the operating system’s various features. You can also learn how to port Ubuntu Core to devices other than the Raspberry Pi 2, build or port existing apps to the Snappy package format, and even participate directly in the development of the open source Ubuntu Core.


Previous Page Next Page Home

Related Posts: