Oleg Atamanenko

thoughts about programming

Configuring Wi-Fi on Ubuntu Server 64-bit on Raspberry Pi 4

After discovering that by default Raspberry installs 32-bit Raspbian OS, I wanted to reinstall it with a 64 bit - this would allow to run Kubernetes on Raspberry

Decided to go with Ubuntu Server 64.

Installed it on SD Card with Raspberry Pi Imager.

After boot found out that need to connect it to WI-FI.

Configuring wpa_supplicant didn’t help, still had issues with not getting IP Address from DHCP.

Finally, did the following:

  1. Create /etc/netplan/01-netcfg.yaml and put the following content there:
network:
  version: 2
  renderer: networkd
  wifis:
    wlan0:
      dhcp4: true
      dhcp6: true
      optional: true
      access-points:
        "<replace with your wifi network name/SSID>":
          password: "<replace with your password>"
  1. Change permissions to make file accessible only to root user:
chmod 600 /etc/netplan/01-netcfg.yaml
  1. Configure Linux wireless central regulatory domain agent. Put your country code in /etc/default/crda
REGDOMAIN=US
  1. After that, need to generate and apply netplan:
sudo netplan --debug generate
sudo netplan --debug apply