Ubuntu-14.04 Server on Raspberry Pi 2, Model B

The default server distro for the Raspberry Pi 2 (Model B) is Raspbian, which is a slightly modded version of Debian-stable. In this tutorial we’ll install Ubuntu-14.04 server.

Ref: https://wiki.ubuntu.com/ARM/RaspberryPi

Download the image: http://www.finnie.org/software/raspberrypi/2015-04-06-ubuntu-trusty.zip

Unzip the zip file, it will contain 2 files:

This distribution includes a bmap (.bmap) file. If you are installing to the microSD card from Linux (which I use), you may use the bmap-tools package to save some time by writing only the non-zero blocks.

Ref – bmap-tools:

If you don’t have the bmap-tools package, install it:

$ sudo apt-get install bmap-tools

In this example, when I insert a blank, 8-GB microSD card into my system, it gets picked up as “/dev/sde”. To use bmap-tool to write the disk image to my microSD card:

$ sudo bmaptool copy --bmap 2015-04-06-ubuntu-trusty.bmap 2015-04-06-ubuntu-trusty.img /dev/sde

This takes a few minutes. Afterwards you will want to remove and reinsert the microSD card so that you system re-registers it.

On my system the microSD card was picked up as “/dev/sde” with 2 partitions:
sde1 –> a 64M FAT32 partition that holds all the boot files, mounted as /boot/firmware
sde2 –> a 1.7G ext4 partion, mounted as /

$ sudo fdisk -l /dev/sde
Disk /dev/sde: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sde1 * 2048 133119 65536 c W95 FAT32 (LBA)
/dev/sde2 133120 3670015 1768448 83 Linux

I’m using an HDMI-to-VGA adapter to hook the RBPi2 to my monitor (which uses a VGA port). It’s common to have trouble getting the HDMI-to-VGA display to come up using the default RBPi2 display configuration. When I booted, it booted to a blank screen. So you’ll need to modify the “config.txt” file, so that the Raspberry Pi 2 will use “HDMI safe” mode.

You can use a file manager to open up the FAT32 partion (boot) “sde1” to find the config.txt and open it. I’m using Kubuntu (KDE) which by default comes with the Dolphin file manager. To edit the “config.txt” file I use Kate (text editor).

In Dolphin I open the “config.txt” file with Kate.

Uncomment the “hdmi_safe=1” configuration

Ref: http://elinux.org/R-Pi_Troubleshooting#No_HDMI_output_at_all

Save the file, remove the microSD card and place it in your Raspberry Pi 2. Plug it in to boot it. You should get the fail-save 800×600 display. We are only interested in getting the command-line interface up so that we can make the initial configurations. After that our Raspberry Pi 2 will run head-less.

If the above config does not work, then you can use the “config.txt” settings generated by NOOBs:

Note: NOOBS is the GUI that the Raspberry Pi 2 boots to.  From the NOOBS GUI you can choose the distro you want installed on the microSD card.  Most users opt for Raspbian (Debian).  These are the default, auto-generated “config.txt” settings that NOOBS is set to to ensure that the GUI always boots.

NOOBS Auto-generated Settings (config.txt):

From there you can “sudo apt-get update && sudo apt-get -y dist-upgrade” to get your server going.

Note: default user → ubuntu, ubuntu