How to install Ubuntu Desktop on Raspberry Pi 4

Changing the pi to boot from SSD does not work as stated if the USB adapter is not recognised by the installer. To get this to work I used an SD card and completed the install fully as specified and changed the boot order on the PI.
I then removed the SD card and put it into another Linux computer with the USB SSD plugged. The SSD partitions need to be re-sized (using gparted) to match the SDcard and then the dd commaned used ( “dd if=sdcard-partition of=ssd-partition”) to copy both the boot partition and the “writeable” partition to the SSD. Once copied the “writeable” partition on the SSD can then be expanded to the size of the SSD.
If the USB SATA adapter for the SSD is not recognised by the boot loader, the SSD will fail to be read correctly and you will get block errors. If this is the case, the boot partition of the SSD needs to be mounted on a different Linux computer and the cmdline.txt file edited to use usb-storage.quirks. There is an excellent article on this here: https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/

1 Like

Suggestion for a change:
Then set your keyboard layout. For British vs American keyboards you can use the ‘@’ and ‘  ‘ keys to check that they are in the right place for you.

2 Likes

Great article, I chose to install Ubuntu Server 20.04 and everything booted correctly except for one small detail. I was being prompted for a password which I did not know. Just wanted everyone to know that the default username and password are ubuntu/ubuntu . That information will save you the effort of googling an answer for that. Thanks!!

1 Like

This is given in another tutorial specifically for the Ubuntu Server install :smile: I’ll make sure that’s flagged here too though in case people find their way here looking for the server tutorial, thanks for your comment :slight_smile:

Hi, thanks for enabling my favorite desktop for my favorite platform! It installed very nicely. I installed using the rpi-installer v1.5 which has some changes in the UI - you may want to consider updating the screenshot instructions accordingly.

1 Like

Before picking a timezone and after setting the keyboard layout, there is another screen for connecting to a network. But the corresponding text (and screenshot) are missing in the set of steps shown in the tutorial.

The USB Boot step is way more complicated than it should be.
In the official documentation it’s mentioned that all you need to do is:

sudo -E rpi-eeprom-config --edit

then set the BOOT_ORDER option to 0xf41 (that part is correct), then reboot. The rest of the commands ( vcgencmd, sudo rpi-eeprom-update etc.) are pretty much useless.
I was setting this up with a brand-new Pi 4 (8 Gb), which had BOOT_ORDER set to 0x1 by default (no idea why), but it was in fact really easy to fix it with a single command above.

password ubuntu and login ubuntu are not working… any update on this?

Need a section on when it doesn’t work. No graphical interface just ‘user ubuntu login’

so long ubuntu

USB Boot Information for older Raspberry Pi models

:warning: This is a subsection from a previous version of the tutorial aimed at older Raspberry Pi 4s (more specifically 4GB Pis released prior to 2021) posted here for reference.

You can also now boot from a USB attached hard-drive or SSD with no microSD card involved. You have to do this after booting from an SD card however because all Raspberry Pi 4 models ship with an EEPROM configuration that boots from SD cards only. But we can change that.

The first check you’ve got an up to date EEPROM version on your Pi 4:

sudo apt install rpi-eeprom

Extract the current bootloader configuration to a text file:

sudo vcgencmd bootloader_config > bootconf.txt

Next we need to set the BOOT_ORDER option to 0xf41 (meaning attempt SD card, then USB mass-storage device, then repeat; see pi4 bootloader configuration for more information).

Alternatively vim bootconf.txt and make the edits yourself if you don’t like sed-hacking

sed -i -e '/^BOOT_ORDER=/ s/=.*$/=0xf41/' bootconf.txt

Now we generate a copy of the EEPROM with the update configuration:

rpi-eeprom-config --out pieeprom-new.bin --config bootconf.txt /lib/firmware/raspberrypi/bootloader/critical/pieeprom-2020-09-03.bin

Set the system to flash the new EEPROM firmware on the next boot

sudo rpi-eeprom-update -d -f ./pieeprom-new.bin

To apply any changes (the EEPROM is only updated during the early stages of boot)

sudo reboot

Now we need to get the image onto a hard drive. That’s the easy part. If you roll this tutorial back to “Prepare the SDcard” and go through it replacing “SD card” with “Hard Drive” you’ll have it.

You should now be able to boot from your hard-drive. Congratulations.

:warning: Warning
Be aware that some drives have issues being used to boot the Pi. In particular:

  • Spinning hard-disks required a lot more power than SSDs and will very likely require a powered USB hub.
  • Hubs themselves can cause compatibility issues, so you’re better off with an SSD to boot off (typically no need for a hub and no spin-up time issues).

There’s lots of good information on both the Pi forums and various GitHub issues for debugging boot issues; here’s a selection of links in a rough “look at this first” order from our top Pi guy:

3 posts were split to a new topic: RPi4 takes too long to boot

On a raspi 4 8gb I installed 20.04 on SD-Card following the manual. It’s great working. The next step is the change to a bootable ssd. The described instruction I can follow. But there is a problem with the last step.

“Now we need to get the image onto a hard drive. That’s the easy part. If you roll this tutorial back to “Prepare the SDcard” and go through it replacing “SD card” with “Hard Drive” you’ll have it.”

There can I find “Hard Drive”? I find only “SD-Karte”.


Could you give a instruction step by step for beginner. Thanks!

Hey @saxonian, if you plug the hard drive you want to use with the PI into your laptop/PC USB port, then in the middle of that menu where it says ‘SD Card’ and you click ‘Choose SD Card’ you should have an option to select the Hard Drive instead (be careful not to select your PC’s own hard drive!). On my machine the imager actually says ‘choose storage’ as that option. Let me know if this solves your problem!

Hoping to install Ubuntu on a new pi 400 4GB. Does this tutorial apply to 400 as well? Any exceptions? Thank you in advance.

thanks for your tips. I was two weeks ill. That’s why i can’t give you a feedback. Last weekend I installed according your guideline Mate 21.10 on Raspi 4 8GB with SSD 240 GB. It works smooth and at the first impression the operating system is very well thought out. Now I’m just getting an better overview of the operating system. For the most W-Program’s are good alternatives available. If I have enough experience, then I’ll install later Mate 22.04 on my PC for CAD and Video-processing.

1 Like

Great, thanks for letting us know you got things working! Hope you enjoy your experience!

Hey @wacojohn it should work exactly the same, just flash the SD card and insert it into the 400. One of our engineers actually used a 400 with Ubuntu as his development machine for a while… Let us know how you get on!

Thank you SO much for the reassurance. I’m finding confusion on what Ubuntu image. One instruction says (simply) choose it with the Rasp. Installer. Another says download it from the Rasp. site. I’m also concerned about the 4GB of memory on the 400. Once I know exactly what and where the image is, I won’t worry about 4GB though.

By golly, … it’s right chere!

Screenshot 2022-01-17 10.07.17 PM

found at:

https://ubuntu.com/download/raspberry-pi

Grab that and burn to SD … right?? thank you again.

Hey @wacojohn the best way is not to download that but to open your Pi Imager and click ‘Choose OS’ then choose ‘Other general purpose OS’ then ‘Ubuntu’ then ‘Ubuntu Desktop 21.10 (RPi 4.400)’ then choose your sd card and away you go :slight_smile: you can do it with the version from the site using the ‘use custom’ option but it’s easier doing it all in the imager app!

1 Like

Yes Sir. I figured two ways to go. D/L the pkg, and burn it to SD Card. So I did. Wasn’t sure I could burn a xxxxx.img.xz file, so I ‘FELL BACK’ to use Pi Imager just exactly as you said, and I’m ready to use the SD Card in my 2nd and still in the box Pi 400. Thank you Sir. Peace and prosperity to you and yours.

1 Like