Installing Ubuntu on Raspberry Pi
My Raspberry Pi 4 cluster is currently 32-bit. It’s got a 32-bit kernel with a 32-bit userland. But I need to run 64-bit software on it. I looked into upgrading it in place, but that’s infeasible. So I need to reinstall it.
This time I’m going to use Ubuntu 20.10 rather than Raspbian / Raspi OS.
Since there’s nothing of value on my cluster, I simply re-flashed the USB storage of each node with Ubuntu Server by following the instructions on the Ubuntu website.
I installed the nodes one at a time, because I’m using
ssh, and it would be easy to mix the nodes up.
So, for each one:
- Insert the USB stick and turn the node on.
- Wait for a few minutes while the installer does its thing.
- Log in and reset the password.
- Change the hostname; reboot.
- Copy my SSH public key.
Log in; reset password
The installer uses the name
ubuntu, so log into the node:
ssh email@example.com # password is 'ubuntu'
It immediately prompts to change the password, so do that.
I generated a random password by using the following:
env LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 16 ; echo
I used the same password for each node. I’m going to use SSH with public keys, so I’ll never need to enter it again.
Change hostname; reboot
echo 'rpi405' | sudo tee /etc/hostname sudo shutdown -r now
Copy my SSH public key
Then repeat, for each of the other nodes, one at a time.
Upgrade them all
Finally, update all of them (
synchronize-panes is your friend here):
sudo apt update && sudo apt upgrade sudo shutdown -r now # new kernel; reboot
ubuntu@ubuntu:~$ uname -a Linux ubuntu 5.13.0-1008-raspi #9-Ubuntu SMP PREEMPT Wed Sep 29 08:27:44 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux ubuntu@ubuntu:~$ dpkg --print-architecture arm64
Install some basics
sudo apt-get install \ --no-install-recommends \ vim-nox silversearcher-ag sudo update-alternatives --set editor /usr/bin/vim.nox mkdir "$HOME/bin" echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
Next: reinstall k3s.