Install Ubuntu Server 64 bit OS in Raspberry Pi

AliExpress.com Product - Latest Raspberry Pi 4 Model B with 1/2/4GB RAM BCM2711 Quad core Cortex-A72 ARM v8 1.5GHz Support 2.4/5.0 GHz WIFI Bluetooth 5.0

Raspberry Pi comes out with a default OS choice which appears logical to all people: Raspbian. Raspberry Pi Foundation is behind both products, so everyone supposes that this pair assures the best compatibility and performances. However, Raspbian is currently available only in 32 bit configuration while new RPI processor are 64 bit enabled. Some people refer to have strong performance improvements in using 64 bit OS on RPI, so I decided to test it installing what is the most common linux OS: Ubuntu. The version that we are going to install is the server one (without Desktop Environment), release 19.04.

So, this article is going to provide a guide to install Ubuntu Server OS in Raspberry Pi 3 model B+, but should work also on newer RPIs (for example RPI4).

What do you need

HARDWARE

  • Raspberry PI 3 model B+ kit (including at least also case and power supply)
  • 1 micro SD card (I use a 16 GB, at least class 10) with an SD adapter
  • 1 HDMI cable
  • a USB/wireless keyboard

I strongly suggest to evaluate to buy a case with cooling system (fans) if you are thinking to use your raspberry for resources intensive applications (for example cryptocurrency mining).

You also need a PC (notebook or desktop) to flash images.

SOFTWARE

  • Ubuntu Server disk image. I will use the preinstalled-server image, which allows you to unpack a preinstalled version of Ubuntu onto a target device. Official image for RPI 3 can be downloaded from here
  • an image flashing software like, for example, Etcher

Step-by-Step Guide

Download and install in your PC Etcher (if not available).
Download Ubuntu disk image (img.xz compressed file).
Insert your SD card in your PC/SD card reader.
Run Etcher in you PC.

Etcher
Click “Select Image” and select Ubuntu disk image previously downloaded. Now Etcher should also have recognised your SD card. Otherwise, click change and select correct SD card.
Etcher Ubuntu Install
Click on “Flash! button and wait for operation to be completed.Etcher_3

Now extract SD Card from PC and insert it in your Raspberry Pi (that must be already connected also via HDMI to a monitor/TV). Power on the RPI and wait for boot till login prompt.

Login with default ubuntu credentials (please wait a while if it returns authentication error):

user: ubuntu
password: ubuntu

First login will require to change ubuntu password. Change it at your choice:

Ubuntu change password

Networking Setup

For those who use RPI via Ethernet connection, you can go ahead to the next paragraph (SSH Setup).

If we wantto use WiFi connectivity, we must create a new yaml file, named 01-netcfg.yaml:

sudo nano /etc/netplan/01-netcfg.yaml

Netplan is quite strict about indentation and spacing; proofread carefully. Configure as following:

network:
 version: 2
 renderer: networkd
 wifis:
  wlan0:
   dhcp4: yes
   dhcp6: no
   access-points:
    "network_ssid_name":
     password: "**********"

change network_SSID_name and password with yours one. Note that both are enclosed in quotation marks (“). Save and exit. Activate the new networking setup by typing following commands:

sudo netplan generate
sudo netplan apply

Test if all is working with a simple ping:

ping -c3 www.ubuntu.com

Find your RPI IP address with the single command:

ifconfig

looking at wlan0 section. This IP will be used to connect remotely via SSH at the end of next step.

SSH Setup

Reboot to have a clean environment:

sudo reboot

Before all, update your installation:

sudo apt-get update

Ubuntu Server doesn’t come with ssh enabled, so we need to install related package:

sudo apt-get install openssh-server

After this operation you are able to connect remotely via SSH to your RPI server.

Final Check

Type the following command:

dpkg --print-architecture

that will show you have an arm64 (64 bit) OS:

arm64

BONUS

Booting Ubuntu Server may require more time than Raspbian Lite. A way to improve it is avoiding the boot check on Ethernet connection if you use only WiFi. This also fixes warning “A start job is running for wait for network to be configured.” on booting, that wastes time if no Ethernet cable is plugged (WiFI only networking). The goal can be achived by editing 50-cloud-init.yaml:

sudo nano /etc/netplan/50-cloud-init.yaml

and commenting all networking section (inserting # before each line), so that the file will appear like the following:

# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init’s network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}

#network:
# version: 2
# ethernets:
# eth0:
# dhcp4: true
# match:
# macaddress: xx:xx:xx:xx:xx:xx
# set-name: eth0

Final Considerations

Having a 64 bit OS on RPI can give a great help for those people using Raspberry with CPU intensive applications. This doesn’t help if you need more RAM, that is limited by hardware sizing. Other performance improvements can come from some shrewdness regarding the correct Power Supply use, high performance SD Cards and other listed in 4 tricks to improve Raspberry Pi performance and power consuption article.

Enjoy!

Please, share with your friends in your social network if you like this article!

If you found this article useful, please consider offering me a coffee with Donation button on top of his page. Maintaining a blog has costs (Domain registration, hosting hardware, power supply, etc) and also 50 cents can make the difference in helping a blogger.

AliExpress.com Product - Raspberry Pi Zero W (Wireless) (new 2017 model)AliExpress.com - best prices for drastically improve RPI performance with SAMSUNG Genuine Microsd Cards
Please follow and like us:
error