Installing Dkms On Centos 7

DKMS:
– Dynamic Kernel Module Support (DKMS) is a framework used to generate Linuxkernel modules whose sources do not generally reside in the Linux kernelsource tree. DKMS enables kerneldevice drivers to be automatically rebuilt when a new kernel is installed.
– An essential feature of DKMS is that it automatically recompiles all DKMS modules if a new kernel version is installed. This allows drivers and devices outside of the mainline kernel to continue working after a Linux kernel upgrade.
– Another benefit of DKMS is that it allows the installation of a new driver on an existing system, running an arbitrary kernel version, without any need for manual compilation or precompiled packages provided by the vendor.
– DKMS was written by the Linux Engineering Team at Dell in 2003. It is included in many distributions, such as Ubuntu, Debian, Fedora, and SuSE. DKMS is free software released under the terms of the GNU General Public License (GPL) v2 or later.
– DKMS supports both the RPM and DEB package formats out-of-the-box. (from Wikipedia)
____________________________________________________

  1. Install Mate On Centos 7
  2. Installing Oracle Virtualbox On Centos 7
  3. Installing Virtualbox On Centos 7
  4. Install Virtualbox Additions On Centos 7 Guest Vm

BeeGFS DKMS Client Setup¶. The beegfs-client-dkms package allows building the client kernel module using the DKMS infrastructure. To avoid breaking existing workflows and deployment tools that may be in use on some sites, both beegfs-client and beegfs-client-dkms packages are provided. Install all prerequisites for a successful Nvidia driver compilation and installation. # yum groupinstall 'Development Tools' # yum install kernel-devel epel-release # yum install dkms The dkms package is optional. However, this package will ensure continuous Nvidia kernel module compilation and installation in the event of new kernel update. We will be discussing on how to install and configure virtualization in detail. Lets prepare CentOS Minimal server to host virtual machines that is accessible over HTTP by installing following packages. Install VirtualBox prerequisite packages # yum install gcc make glibc kernel-headers kernel-devel dkms Install VirtualBox.

I was trying to install guest additions on my Centos operating system but faced a lot of problems. Though the idea was very simple as all you have to do was to install DKMS package on your centos operating system and run the install virtual box guest additions setup, but the main problem is that dkms package is not available on your centos, it is a third party repository. So I believe there are a lot of new users who face this issue (I being one of them).

Following steps will help in installing guest additions on your centos.

Step1: update everything( though not really required but still I took this step 1st)

Step2: make a directory rpm using the following commands and go in that directory and download the rpm package from this link or goto http://pkgs.repoforge.org/rpmforge-release/ and download the appropriate package.

2
4
6
8
$ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
$ rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
$ yum install htop

now if you get an error something like this

2
rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686
rpmlib(PayloadIsXz) <= 5.2-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686

That means you have installed your centos virtual machine from cloudera which is centos5 and you have downloaded rpm package for centos6 so all you have to do is to change that package and download package for centos5. You can also check if you are running a 32 bit machine or a 64 bit machine as there are two packages one is for 32 bit machine and the other for 64 bit. To check which machine you are running just type the following command

if you get i386 or i686 that means you are running 32 bit machine and if you get x86_64 that means you are running a 64 bit machine.

Step3. Install kernel-devel

Step4. So almost everything is done and you are ready to install dkms package

if everything goes fine dkms package will install successfully, without any issues.

Step5. This will be the final step

Insert VboxGuestAdditions.iso and go to the folder which will be probably in

/media/VboxGuestAdditions

and run the following command

This will successfully install Guest Additions on Centos.

By: Saad

Deploying ROCm¶

AMD hosts both Debian and RPM repositories for the ROCm v3.x packages.

The following directions show how to install ROCm on supported Debian-based systems such as Ubuntu 18.04.x

Installing

Note: These directions may not work as written on unsupported Debian-based distributions. For example, newer versions of Ubuntu may not be compatible with the rock-dkms kernel driver. In this case, you can exclude the rocm-dkms and rock-dkms packages.

Note: You must use either ROCm or the amdgpu-pro driver. Using both drivers will result in an installation error.

Important - Mellanox ConnectX NIC Users: If you are using Mellanox ConnetX NIC, you must install Mellanox OFED before installing ROCm.

For more information about installing Mellanox OFED, refer to:

Prerequisites¶

In this release, AMD ROCm extends support to SLES 15 SP2

The AMD ROCm platform is designed to support the following operating systems:

  • Ubuntu 20.04.1 (5.4 and 5.6-oem) and 18.04.5 (Kernel 5.4)

Note: Ubuntu versions lower than 18 are no longer supported.

Note: AMD ROCm only supports Long Term Support (LTS) versions of Ubuntu. Versions other than LTS may work with ROCm, however, they are not officially supported.

  • CentOS 7.8 & RHEL 7.8 (Kernel 3.10.0-1127) (Using devtoolset-7 runtime support)

  • CentOS 8.2 & RHEL 8.2 (Kernel 4.18.0 ) (devtoolset is not required)

  • SLES 15 SP2

FRESH INSTALLATION OF AMD ROCm V3.10 RECOMMENDED

A fresh and clean installation of AMD ROCm v3.10 is recommended. An upgrade from previous releases to AMD ROCm v3.10 is not supported.

Note: AMD ROCm release v3.3 or prior releases are not fully compatible with AMD ROCm v3.5 and higher versions. You must perform a fresh ROCm installation if you want to upgrade from AMD ROCm v3.3 or older to 3.5 or higher versions and vice-versa.

  • For ROCm v3.5 and releases thereafter, the clinfo path is changed to - /opt/rocm/opencl/bin/clinfo.

  • For ROCm v3.3 and older releases, the clinfo path remains unchanged - /opt/rocm/opencl/bin/x86_64/clinfo.

Note: After an operating system upgrade, AMD ROCm may upgrade automatically and result in an error. This is because AMD ROCm does not support upgrades currently. You must uninstall and reinstall AMD ROCm after an operating system upgrade.

MULTI-VERSION INSTALLATION UPDATES

With the AMD ROCm v3.10 release, the following ROCm multi-version installation changes apply:

The meta packages rocm-dkms<version> are now deprecated for multi-version ROCm installs. For example, rocm-dkms3.7.0, rocm-dkms3.8.0.

  • Multi-version installation of ROCm should be performed by installing rocm-dev<version> using each of the desired ROCm versions.For example, rocm-dev3.7.0, rocm-dev3.8.0, rocm-dev3.9.0.

  • ‘version’ files should be created for each multi-version rocm <= 3.10.0

    • command: echo <version> | sudo tee /opt/rocm-<version>/.info/version

    • example: echo 3.10.0 | sudo tee /opt/rocm-3.10.0/.info/version

  • The rock-dkms loadable kernel modules should be installed using a single rock-dkms package.

  • ROCm v3.9 and above will not set any ldconfig entries for ROCm libraries for multi-version installation. Users must set LD_LIBRARY_PATH to load the ROCm library version of choice.

NOTE: The single version installation of the ROCm stack remains the same. The rocm-dkms package can be used for single version installs and is not deprecated at this time.

Supported Operating Systems¶

Ubuntu¶

Note: AMD ROCm only supports Long Term Support (LTS) versions of Ubuntu. Versions other than LTS may work with ROCm, however, they are not officially supported.

Installing a ROCm Package from a Debian Repository¶

To install from a Debian Repository:

  1. Run the following code to ensure that your system is up to date:

  1. Add the ROCm apt repository.

For Debian-based systems like Ubuntu, configure the Debian ROCm repository as follows:

Note: The public key has changed to reflect the new location. You must update to the new location as the old key will be removed in a future release.

  • Old Key: https://repo.radeon.com/rocm/apt/debian/rocm.gpg.key

  • New Key: https://repo.radeon.com/rocm/rocm.gpg.key

The gpg key may change; ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm apt repository.

The current rocm.gpg.key is not available in a standard key ring distribution, but has the following sha1sum hash:

  1. Install the ROCm meta-package. Update the appropriate repository list and install the rocm-dkms meta-package:

  1. Set permissions. To access the GPU, you must be a user in the video and render groups. Ensure your user account is a member of the video and render groups prior to using ROCm. To identify the groups you are a member of, use the following command:

  1. To add your user to the video and render groups, use the following command with the sudo password:

Note: render group is required only for Ubuntu v20.04. For all other ROCm supported operating systems, continue to use video group.

  1. By default, you must add any future users to the video and render groups. To add future users to the video and render groups, run the following command:

  1. Restart the system.

  2. After restarting the system, run the following commands to verify that the ROCm installation is successful. If you see your GPUs listed by both commands, the installation is considered successful.

Note: To run the ROCm programs, add the ROCm binaries in your PATH.

Uninstalling ROCm Packages from Ubuntu¶

To uninstall the ROCm packages from Ubuntu 20.04 or Ubuntu 18.04.5, run the following command:

Installing Development Packages for Cross Compilation¶

Installing

It is recommended that you develop and test development packages on different systems. For example, some development or build systems may not have an AMD GPU installed. In this scenario, you must avoid installing the ROCk kernel driver on the development system.

Instead, install the following development subset of packages:

Note: To execute ROCm enabled applications, you must install the full ROCm driver stack on your system.

Using Debian-based ROCm with Upstream Kernel Drivers¶

You can install the ROCm user-level software without installing the AMD’s custom ROCk kernel driver. To use the upstream kernels, run the following commands instead of installing rocm-dkms:

CentOS RHEL¶

This section describes how to install ROCm on supported RPM-based systems such as CentOS/RHEL v7.8 and CentOS/RHEL v8.2.

Preparing RHEL for Installation¶

RHEL is a subscription-based operating system. You must enable the external repositories to install on the devtoolset-7 environment and the dkms support files.

Note: The following steps do not apply to the CentOS installation.

  1. The subscription for RHEL must be enabled and attached to a pool ID. See the Obtaining an RHEL image and license page for instructions on registering your system with the RHEL subscription server and attaching to a pool id.

  2. Enable the following repositories for RHEL v7.x:

  1. Enable additional repositories by downloading and installing the epel-release-latest-7/epel-release-latest-8 repository RPM:

For more details,

  • see https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm for RHEL v7.x

  • see https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm for RHEL v8.x

  1. Install and set up Devtoolset-7.

Note: Devtoolset is not required for CentOS/RHEL v8.x

To setup the Devtoolset-7 environment, follow the instructions on this page: https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/

Note: devtoolset-7 is a software collections package and is not supported by AMD.

Installing CentOS v7.8/v8.2 for DKMS¶

Use the dkms tool to install the kernel drivers on CentOS/RHEL:

Installing ROCm¶

To install ROCm on your system, follow the instructions below:

  1. Delete the previous versions of ROCm before installing the latest version.

  2. Create a /etc/yum.repos.d/rocm.repo file with the following contents:

  • CentOS/RHEL 7.x : https://repo.radeon.com/rocm/yum/rpm

  • CentOS/RHEL 8.x : https://repo.radeon.com/rocm/centos8/rpm

Note: The URL of the repository must point to the location of the repositories’ repodata database.

  1. Install ROCm components using the following command:

  1. Restart the system. The rock-dkms component is installed and the /dev/kfd device is now available.

  2. Set permissions. To access the GPU, you must be a user in the video group. Ensure your user account is a member of the video group prior to using ROCm. To identify the groups you are a member of, use the following command:

  1. To add your user to the video group, use the following command with the sudo password:

  1. By default, add any future users to the video group. Run the following command to add users to the video group:

Note: Before updating to the latest version of the operating system, delete the ROCm packages to avoid DKMS-related issues.

  1. Restart the system.

  2. Test the ROCm installation.

Testing the ROCm Installation¶

After restarting the system, run the following commands to verify that the ROCm installation is successful. If you see your GPUs listed, you are good to go!

Note: Add the ROCm binaries in your PATH for easy implementation of the ROCm programs.

Compiling Applications Using HCC, HIP, and Other ROCm Software¶

To compile applications or samples, run the following command to use gcc-7.2 provided by the devtoolset-7 environment:

Uninstalling ROCm from CentOS/RHEL¶

To uninstall the ROCm packages, run the following command:

Installing Development Packages for Cross Compilation¶

You can develop and test ROCm packages on different systems. For example, some development or build systems may not have an AMD GPU installed. In this scenario, you can avoid installing the ROCm kernel driver on your development system. Instead, install the following development subset of packages:

Note: To execute ROCm-enabled applications, you will require a system installed with the full ROCm driver stack.

Using ROCm with Upstream Kernel Drivers¶

You can install ROCm user-level software without installing AMD’s custom ROCk kernel driver. To use the upstream kernel drivers, run the following commands

Note: You can use this command instead of installing rocm-dkms.

Note: Ensure you restart the system after ROCm installation.

SLES 15 Service Pack 2¶

The following section tells you how to perform an install and uninstall ROCm on SLES 15 SP 2.

Installation

  1. Install the “dkms” package.

  1. Add the ROCm repo.

  1. Run the following command once

  1. Verify the ROCm installation.

  2. Run /opt/rocm/bin/rocminfo and /opt/rocm/opencl/bin/clinfo commands to list the GPUs and verify that the ROCm installation is successful.

  3. Set permissions.

To access the GPU, you must be a user in the video group. Ensure your user account is a member of the video group prior to using ROCm. To identify the groups you are a member of, use the following command:

Install Mate On Centos 7

  1. To add your user to the video group, use the following command with the sudo password:

  1. By default, add any future users to the video group. Run the following command to add users to the video group:

  1. Restart the system.

  2. Test the basic ROCm installation.

  3. After restarting the system, run the following commands to verify that the ROCm installation is successful. If you see your GPUs listed by both commands, the installation is considered successful.

Note: To run the ROCm programs more efficiently, add the ROCm binaries in your PATH.

Installing Oracle Virtualbox On Centos 7

echo ‘export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin’|sudo tee -a /etc/profile.d/rocm.sh

Using ROCm with Upstream Kernel Drivers

Uninstallation

To uninstall, use the following command:

Note: Ensure all other installed packages/components are removed.Note: Ensure all the content in the /opt/rocm directory is completely removed. If the command does not remove all the ROCm components/packages, ensure you remove them individually.

Performing an OpenCL-only Installation of ROCm¶

Some users may want to install a subset of the full ROCm installation. If you are trying to install on a system with a limited amount of storage space, or which will only run a small collection of known applications, you may want to install only the packages that are required to run OpenCL applications. To do that, you can run the following installation command instead of the command to install rocm-dkms.

ROCm Installation Known Issues and Workarounds¶

The ROCm platform relies on some closed source components to provide functionalities like HSA image support. These components are only available through the ROCm repositories, and they may be deprecated or become open source components in the future. These components are made available in the following packages:

  • hsa-ext-rocr-dev

Getting the ROCm Source Code¶

AMD ROCm is built from open source software. It is, therefore, possible to modify the various components of ROCm by downloading the source code and rebuilding the components. The source code for ROCm components can be cloned from each of the GitHub repositories using git. For easy access to download the correct versions of each of these tools, the ROCm repository contains a repo manifest file called default.xml. You can use this manifest file to download the source code for ROCm software.

The repo tool from Google® allows you to manage multiple git repositories simultaneously. Run the following commands to install the repo:

Note: You can choose a different folder to install the repo into if you desire. ~/bin/ is used as an example.

Installing Virtualbox On Centos 7

Downloading the ROCm Source Code¶

The following example shows how to use the repo binary to download the ROCm source code. If you choose a directory other than ~/bin/ to install the repo, you must use that chosen directory in the code as shown below:

Install Virtualbox Additions On Centos 7 Guest Vm

Note: Using this sample code will cause the repo to download the open source code associated with this ROCm release. Ensure that you have ssh-keys configured on your machine for your GitHub ID prior to the download.