Ubuntu 24.04 on Raspberry Pi has intermittent installation issues

 Ubuntu 24.04 on Raspberry Pi 5.
Ubuntu 24.04 on Raspberry Pi 5.

The recent release of Ubuntu 24.04 has seemingly gone well for most platforms, but on the Raspberry Pi there is one big issue which has come to light. The OS can be easily installed to the microSD cards, including the best microSD cards, but it appears that users using a combination of USB drives, micro SD cards and for some, NVMe SSDs are encountering installation issues. Ubuntu 24.04 is the first Long Term Support (LTS) release for the Raspberry Pi 5.

So we took a look for ourselves and the picture isn't too rosy.

At the time of writing there are workarounds which come from a Canonical software engineer, more information should appear later this week. Hat tip to @makerbymistake for alerting us to this issue.

A bug listed on Launchpad (Canonical's preferred software collaboration platform) shows that there appears to be an issue with using USB SSD / HDD and Ubuntu 24.04 on the Raspberry Pi 4.

If you are lucky, then the installer will boot and the new install slideshow will play. However, the images in the slideshow will be corrupted. We asked Dave Jones a software engineer at Canonical for more information on this bug. Jones pointed us to another bug, linked to the corrupted install slideshow. According to Jones, the new installer runs under Xorg, resetting into Wayland when the install process is complete. Jones believes that the issue is Xorg specific as this issue does not appear under Wayland.

We tried to recreate the issue on a Raspberry Pi 4 8GB using the latest 20th April bootloader, but we were met with a hung system. The circle was spinning, but we never booted beyond the Ubuntu splash screen.

Could it be an issue with how we flash images to devices? No, Jones is adamant that this is not the issue. Jones tried Raspberry Pi Imager and dd (a Linux terminal command) and the issue could be replicated across both tools. Approximately six weeks ago, Jones tested a USB install on a Raspberry Pi 4, and it worked. It seems that something has happened between then and now.

USB install tests are not part of the what Jones calls "ISO tests", so it may be that this issue slipped through the testing phase. Jones assures us that this will be rectified for future releases.

In the bug report, Jones offers a possible workaround which should enable Ubuntu 24.04 to boot. The first workaround for the Pi 4 involves editing the config.txt before the drive is used to boot a Pi.  This workaround does not offer a 100% success rate. So depending on your USB SSD / micro SD / NVMe combination, you may still hit an error.

Raspberry Pi 5 is also having issues

While this story has been forming we have seen a YouTube video from LeePSPVideo which states that there is an issue using Ubuntu 24.04 on the Raspberry Pi 5 via NVMe. LeePSPVideo encountered the same graphical corruption during the install, and subsequently was unable to log in.

In the video LeePSPVideo successfully uses Balena Etcher, an alternative tool to write disk images to drives, to write Ubuntu 24.04 to an NVMe drive, and boot from the Pi 5. They then use Gnome Disks, a disk management tool that is part of the Ubuntu install, to write to another NVMe drive via a USB to NVMe adapter. This time though, LeePSPVideo was not as lucky, and encountered an "Installation failed" error message. This dropped them to the login screen, but their freshly created user account would not work, nor would the default Ubuntu user account.

The problem that we face here is that in our tests, the Ubuntu installation process on the Raspberry Pi 5 was inconsistent. Using Raspberry Pi Imager for all of our tests, we managed to install Ubuntu 24.04 on to an NVMe SSD and USB SSD and it worked perfectly. However, a microSD card failed with the "Installation failed" error message that LeePSPVideo also hit.

Jones refers to another workaround in the bug report, this time editing the config.txt to reduce the PCIe interface speed to x1. Boot, and install. Then revert the changes to get the best speed from the PCIe interface. Just as with the Pi 4 workaround, success is not guaranteed.

From our tests, here is what works, and what doesn't.

  • What works

    • Raspberry Pi 5

      • NVMe

      • USB HDD

    • Raspberry Pi 4

      • Micro SD

  • What doesn't work

    • Raspberry Pi 5

      • Micro SD

        • Crashed on boot in one test, booted to installer then "Installation Failed" error.

    • Raspberry Pi 4

      • USB HDD

We tested installing Ubuntu 24.04 on a Raspberry Pi 5 8GB and a Raspberry Pi 4 8GB.  Both machines were updated to the latest bootloader (April 20). Images were written to the devices using Raspberry Pi Imager. The devices used were a Cytron MakerDisk 120GB SATA3, Phison PS5013-E13-35 256GB NVMe SSD and a Cytron Makerdisk 128GB micro SD card.

It appears that different combinations of drives could exacerbate the situation. The root cause is not clear, and we've shown our testing to Jones via a video call and they have spotted areas where the installer it failing.

Where does this leave Raspberry Pi 4 and 5 owners eager to try out Ubuntu 24.04 on their Pi? For now the advice is to try it out on a spare micro SD card / USB SSD / NVMe, but we wouldn't replace a working Raspberry Pi OS or Ubuntu install as yet.