« Back to overview

Boot Ubuntu Server 20.04 from USB on Raspberry Pi 4

Well, Raspbian is nice but it's so... 32 bit.
For some purposes, we'd want Ubuntu 64 bit, 20.04 LTS to boot to make full use of the RPI's resources.

Moreover, we want to boot from an USB connected SSD drive, the SD Cards just don't do.

While Raspbian boots nicely from an USB, the problem with Ubuntu is the kernel is in compressed format (which is not supported [yet?] by booting from USB.

To boot Ubuntu, you need to uncompress the vmlinuz kernel and rename the uncompressed kernel to vmlinux (on your ssd drive):

cp vmlinuz vmlinuz.bk
mv vmlinuz vmlinux.gz
gunzip vmlinux.gz

Then, you need to modify the config.txt file in your boot drive:

initramfs initrd.img followkernel

Uncompress again after updates

The first time you boot now it should work. The problem is that after updates (which may occur automatically at the second boot), you may end up with a new uncompressed kernel.

So after you upgraded packages, decompress the kernel again using the above steps.

Automatic decompression of kernel

At first I wasn't very enthusiastic about automatic decompression of new kernels after upgrade, but I modified the solution at this resource a little bit.

You can find a gist here for a slightly modified decompression of the kernel.

Also see: