Can you upgrade your Raspberry Pi 4-powered k3s cluster to arm64 without rebuilding everything? The short answer is no. This guide explores the challenges and considerations for such an upgrade.

Upgrading RaspiOS to arm64 on Raspberry Pi

Can you upgrade your Raspberry Pi 4-powered k3s cluster to arm64 without rebuilding everything? The short answer is no. Here’s why.

Current System Information

First, let’s check the current system information:

uname -a

Example output:

Linux rpi405 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux

Updating the System

Update the system and modify the boot configuration:

sudo rpi-update
sudo vi /boot/config.txt

In the [pi4] section, add arm_64bit=1. Then reboot.

Verifying the Kernel Upgrade

Check the system information again:

uname -a

Example output after reboot:

Linux rpi405 5.10.87-v8+ #1502 SMP PREEMPT Fri Dec 17 15:15:12 GMT 2021 aarch64 GNU/Linux

Check the architecture:

dpkg --print-architecture

Output:

armhf

This indicates a 64-bit kernel with a 32-bit userland.

Upgrading the Userland to 64-bit

While it is technically possible to upgrade the userland to 64-bit, it is not recommended. The process is complex, time-consuming, and error-prone.

Why It’s Not Worth the Hassle

The process of upgrading the userland to 64-bit can be difficult and time-consuming. Although it can be done, it often results in numerous issues and is not worth the effort.

A much better approach is to perform a fresh reinstall. This method is easier, cleaner, less error-prone, and more likely to result in a working system. Use the usual --get-selections and --set-selections commands, along with a backup of /etc.

Alternative Approach

For those interested in a 64-bit system, consider using 64-bit Ubuntu. Vladimir over at rpi4cluster.com opted for 64-bit Ubuntu 20.10.

In conclusion, while upgrading to a 64-bit userland on RaspiOS is technically feasible, it is not practical. A fresh reinstall or switching to a 64-bit distribution like Ubuntu is a better option.