Skip to content

Upgrade to Ubuntu 18.04 for ROCm3.7 or later releases

Shucai Xiao edited this page Feb 23, 2021 · 1 revision

The support of Ubuntu 16.04 for ROCm3.7 has been dropped. For Ubuntu 18.04, the 4.15 base kernel no longer works with ROCm3.7 rock-dkms kernel driver. So if your machine is installed with Ubuntu 16.04, you need to upgrade the OS to Ubuntu 18.04 and also upgrade the base kernel to 4.18.

There are two options to do the upgrade.

  1. Reinstall your OS with Ubuntu18.04
  2. Upgrade Ubuntu 16.04 to Ubuntu 18.04. You can following some online steps, for example.

After the upgrade is done, you can check the base kernel driver version with

uname -a

If the base kernel driver is 4.15 as:

Linux prj47-rack-92 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

You can upgrade the kernel driver to 4.18 as:

sudo apt update
sudo apt install linux-headers-4.18.0-25-generic linux-image-4.18.0-25-generic  linux-modules-4.18.0-25-generic linux-modules-extra-4.18.0-25-generic -y

Then you can optionally lock the kernel driver to 4.18 during booting as:

# (optional) lock the kernel driver to 4.18 during booting
sudo sh -c 'echo "GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux 4.18.0-25-generic\"" >> /etc/default/grub'

# Update the grub
sudo update-grub

After rebooting your machine, you should be able to install and call ROCm3.7 and later ROCm releases correctly.