Skip to content

Ubuntu ​

Distro upgrade ​

bash
do-release-upgrade -c
do-release-upgrade

If tty session exits, resume with

bash
# ssh via port 1022
sudo screen -ls
sudo screen -r

Auto install drivers ​

bash
sudo ubuntu-drivers autoinstall

Upgrade OEM Kernel to Generic Kernel ​

Ex. from 6.x-oem to 7.x-generic

bash
# list installed kernels
dpkg -l | grep -E "linux-image|linux-headers|linux-oem"

# purge old oem kernels
sudo apt purge linux-image-6.x.x-xx-oem linux-headers-6.x.x-xx-oem

# cleanup orphan deps
sudo apt autoremove --purge

# verify that old kernels are removed
sudo grep -E "(menuentry|submenu) " /boot/grub/grub.cfg | cut -d "'" -f2

Purge packages ​

bash
sudo apt autoremove --purge
sudo apt purge $(dpkg -l | awk '/^rc/ {print $2}')

Continue apt upgrade ​

bash
sudo dpkg --configure -a

Ubuntu server headless setup ​

Alternatively, you can use raspberry-pi-imager

  1. Flash OS
  2. touch ssh at boot volume
  3. vi network-config and add following config for Wi-Fi at boot volume:
yaml
wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      $WiFiSSID:
        password: $PASSWORD # string

Change repository mirror on ARM ​

https://askubuntu.com/questions/428698/are-there-alternative-repositories-to-ports-ubuntu-com-for-arm

Specify Wi-Fi band ​

https://askubuntu.com/questions/183525/how-to-set-wifi-driver-settings-to-prefer-5-ghz-channel-above-2-4-ghz

Fix Wi-Fi keeps disconnecting ​

and

bash
sudo vi /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
# then change wifi.powersave to 2
# see code: <https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55>