How to upgrade Ubuntu to 20.10 and kernel to 5.9

Sypalo.com

page.title

In this article, I will show you how to upgrade Ubuntu to 20.04 (LTS) or 20.10 (latest). As a bonus, we will also update the kernel to the latest mainline 5.10-rc6 or stable version 5.9.12 or 5.8.18, which contain the following improvements:

  • WireGuard Support
  • New processor cooling driver
  • USB4 support
  • Amazon Echo Support
  • Improved hardware support
  • VirtualBox Folder Sharing
  • F2FS data compression using LZO/LZ4

And here is a short list of what's new in Ubuntu 20.04:

  • Best and fastest GNOME 3.36 desktop with dark theme support
  • Improved support for 4K monitors and zoom
  • New themes and visual settings
  • Quick install, fast boot
  • Global do not disturb
  • Best Thunderbolt Support
  • Best support for nVidia graphics cards

To perform Ubuntu upgrade to 20.10/20.04 you will need 2 hours to follow these steps:

Preparation

  1. Update packages list
    sudo apt-get update
  2. Upgrade packages
    sudo apt-get upgrade
  3. Install update-manager-core package
    sudo apt-get install update-manager-core

Upgrade Ubuntu

  1. Upgrade distro
    sudo apt-get dist-upgrade
  2. Upgrade Ubuntu to the latest LTS release

    It's recommended to upgrade your Ubuntu to the latest LTS (long term supported) release to avoid any issues with packages upgrade jumping on too new release compared to currently installed one.
    Personally I've tested upgrade from 18.04 to 20.10 with little issues, but if you have 16.x or lower release please run the next command, otherwise if you are already on 18.04 or 20.04 and experienced Linux user you might skip this step and jump straight to 20.10 Groovy Gorilla release

    sudo do-release-upgrade
  3. Change default branch from lts to normal
    sudo sed -i 's/lts/normal/g' /etc/update-manager/release-upgrades
  4. Change default distro from your current

    18.04 - bionic
    18.10 - cosmic
    19.04 - disco
    19.10 - eoan
    20.04 - focal
    20.10 - groovy
    in the example below, we are upgrading from ubuntu 18.04 (bionic) to 20.10 (groovy)

    sudo sed -i 's/bionic/groovy/g' /etc/apt/sources.list
  5. Update packages list
    sudo apt-get update
  6. Upgrade packages
    sudo apt-get upgrade
  7. Run full upgrade
    sudo apt-get dist-upgrade
  8. If any error re-run
    sudo apt-get update
    sudo apt-get dist-upgrade
  9. Run cleanup
    sudo apt-get autoremove
    sudo apt-get clean
  10. Reboot the system
    sudo shutdown -r now

Upgrade kernel

  1. Change current directory to /tmp
    cd /tmp
  2. Download latest mainline kernel from 5.10.x branch
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc6/amd64/linux-headers-5.10.0-051000rc6_5.10.0-051000rc6.202011291930_all.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc6/amd64/linux-headers-5.10.0-051000rc6-generic_5.10.0-051000rc6.202011291930_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc6/amd64/linux-image-unsigned-5.10.0-051000rc6-generic_5.10.0-051000rc6.202011291930_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.10-rc6/amd64/linux-modules-5.10.0-051000rc6-generic_5.10.0-051000rc6.202011291930_amd64.deb
    						
  3. or latest stable kernel from 5.9.x branch
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.12/amd64/linux-headers-5.9.12-050912_5.9.12-050912.202012020835_all.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.12/amd64/linux-headers-5.9.12-050912-generic_5.9.12-050912.202012020835_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.12/amd64/linux-image-unsigned-5.9.12-050912-generic_5.9.12-050912.202012020835_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.12/amd64/linux-modules-5.9.12-050912-generic_5.9.12-050912.202012020835_amd64.deb
    						
  4. or older stable kernel from 5.8.x branch
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8.18/amd64/linux-headers-5.8.18-050818_5.8.18-050818.202011011237_all.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8.18/amd64/linux-headers-5.8.18-050818-generic_5.8.18-050818.202011011237_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8.18/amd64/linux-image-unsigned-5.8.18-050818-generic_5.8.18-050818.202011011237_amd64.deb
    wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8.18/amd64/linux-modules-5.8.18-050818-generic_5.8.18-050818.202011011237_amd64.deb
    						
  5. Install new kernel
    sudo dpkg -i *.deb
  6. Reboot the system
    sudo shutdown -r now

Finishing up

  1. Update packages list
    sudo apt-get update
  2. Upgrade packages
    sudo apt-get upgrade
  3. Reboot the system if needed
    sudo shutdown -r now
  4. Check the OS distro
    lsb_release -a
  5. Check kernel version
    uname -r

That's it, now you should be running on the latest best-looking Ubuntu 20.10 and most secure Linux Kernel.