January 17

Linux: Installing DMKS on Red Hat/Centos

DKMS:
– Dynamic Kernel Module Support (DKMS) is a framework used to generate Linux kernel modules whose sources do not generally reside in the Linux kernel source tree. DKMS enables kernel device 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)
____________________________________________________

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.

 

1
2
3
4
5
6
7
8
9
$ mkdir rpm
$ cd rpm
$ rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
$ yum install htop

 

now if you get an error something like this

 

1
2
3
error: Failed dependencies:
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

 

1
$uname -i

 

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

 

1
$ sudo yum install kernel-devel

 

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

 

1
sudo yum install dkms

 

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

 

1
$ sh ./VboxLinuxAdditions.run

 

This will successfully install Guest Additions on Centos.

By: Saad


Copyright 2021. All rights reserved.

Posted January 17, 2014 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B