How to install Ubuntu Server on your Raspberry Pi

This tutorial doesn’t work on my Raspberry Pi 3 B+

  1. On Windows 10, use Raspberry Pi Imager to flash Ubuntu 20.04.1 LTS for ARM 64-bit
  2. Attempt to boot Raspberry Pi from SD card

When I tried to boot up the device, I’m just getting errors like:

Bad Linux ARM64 Image magic!
missing environment variable: bootfile

Finally after failing about 20 times, I get a prompt that looks like:

U-Boot> 

I finally got this working, after several wasted hours. Skip using the image built-in to the Raspberry Pi Imager tool, and download the “preinstalled” image directly. I wrote up a brief about my experience.

https://trevorsullivan.net/2020/10/30/install-ubuntu-20-04-1-lts-64-bit-on-raspberry-pi/

Hey :slight_smile:

Thanks for the tutorial! The example code for “network-config” seems to be incorrect. The lines below “wlan0” should be indented one more level. This is how the real “network-config” looks like and it would make more sense because those lines are the configuration for “wlan0”.

Cheers
Fred

Doing a headless install and trying to ssh via ethernet I’m getting publickey authentication required.

according to this post https://askubuntu.com/questions/1255343/20-04-headless-on-raspberry-pi-4-re-install-will-not-allow-password-authenticati

It seems YAML parser will not deal with the space in ': ’ required by cloud-init for the ssh_pwauth: yes thereby causing the server to default to non-password authentication.

Can this be addressed?

This was using LTS - I have since tried with 20.10 and it is working ok

I was able to boot up to the login prompt. I’ve read other posts about the login and password as “ubuntu”. That has not worked always getting the incorrect password. I’ve checked the wan0 script half a dozen times to make sure I’ve entered the wifi name/password correctly with the quotes. Still not able to login. Also, trying to get the IP using arp command yields nothing as well. Am I missing something???
Thanks,
Don

Thanks for the note on the 5GHz on your article. I was tearing my hair out with it not working for RP3 B+. And the issue was the 5GHz Wifi network. That apparently is not an issue on RP4 though

I’m installing a server that needs a static IP address on ethernet. Can you include an example of how that should be configured, please?

1 Like

I would like to propose some changes to this guide, especially when talking about server use cases:

  • For Raspberry Pi 3 Model B+ and above, power cable is optional if the PoE HAT is installed, and an 802.3af PoE switch or power injector is used.
  • For Raspberry Pi 3 and above, the microSD card and card reader is optional if the network is set up for net-booting the Pi.

While the netboot process is fairly different from the standard process, the PoE process is highly similar, so I would like to see it being reflected in the tutorial.

I’ve also got this problem, as well as ethernet seems to not be working.

Hi.
Please consider splitting the “What you’ll need” section into hardware & software sub-sections.

In the “What you’ll need” section, there is no mention of

  • Ubuntu ISO / image file
  • Raspberry Pi imager
  • SSH client (dependent on OS used)

For the newer Raspberry Pis ssh is turned off by default, perhaps we should add a note describing how to address that? I believe the solution is to add a file named ssh to the boot partition.

adding an “ssh” file to the boot partition is a hack to the openssh package the pi foundation added for their PiOS, I do not think this hack exists in any official ubuntu image.

1 Like

I just installed on a raspberry pi 4. 2 short comment:
i, HDMI is switched off default, so only ssh access is working. It could be mentioned somewhere
ii, unattended upgrade is installed, so ‘sudo apt upgrade’ fail by default, because auto update is in progress.

HDMI is working fine here on all my test installs (and it would indeed be odd (and a blocking bug) if it would not)…

well, it does that once per day (you can adjust it) so i guess you had some bad timing … but after all it is just doing what you just wanted it to do anyway with that command, isnt it ? :wink:

1 Like

after some debugging, hdmi “work”. it does on for a half second, than blank for 2 second …

Yes it does. But it would be great if the tutorial say it :slight_smile: I just did what the tutorial say, and get an error message

2 posts were split to a new topic: Pi Wifi Help

The example provided:

wifis:
  wlan0:
  dhcp4: true
  optional: true
  access-points:
    <wifi network name>:
      password: "<wifi password>"

Did not work on my fresh install of 20.04.2 server. Fortunately what was provided at netplan.io worked fine:

wifis:
    wlan0:
        dhcp4: true
        access-points:
            "wifi network name":
                password: "wifi password"
1 Like

The arp -a command does not return any information on Ubuntu 20.04.

A suggestion is to include the following command:

$ sudo apt-get install arp-scan

$ sudo arp-scan --interface=enp0s3 --localnet
Interface: enp0s3, type: EN10MB, MAC: 08:00:27:xxxx:xx, IPv4: 192.168.0.226
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
...
192.168.0.249	dc:a6:32:xx:xx:xx	Raspberry Pi Trading Ltd

The indention is the problem:

  network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      optional: true
      dhcp4: true
      access-points:
        "WIFI_123":
          password: "WIFI_123_PW"

After the indention is correct you are able to restart the networkings service with

sudo netplan apply

It seems to be that the structure and indention of the file network-config is destroyed while import.

1 Like