June 2020
« Mar    


WordPress Quotes

Be Content with what you have; rejoice in the way things are. When you realize there is nothing lacking, the whole world belongs to you.
Lao Tzu
June 2020
« Mar    

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (40)
Ansibile (19)
Apache (135)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (270)
centos8 (3)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (2)
horoscope (23)
Hyper-V (10)
IIS (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (7)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Ubuntu (1)
Uncategorized (30)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

0 visitors online now
0 guests, 0 bots, 0 members

Hit Counter provided by dental implants orange county

Compiling and Installing Linux kernel from Source

Compiling and Installing Linux kernel from Source

As you many know, Kernel 4.x.x has been released with tones of changes and enhancements. We all know new kernel always have latest drivers, support for new devices, new features, filesystem enhancements.The feature that all Linux IT guys awaits for, yes it’s Live kernel patching permit a user to update and patch kernel without a reboots. In this article we will Compiling and Installing Linux kernel from Source

Installing Linux kernel from Source

1. Installing dependencies: – Update your system and install dependencies which is required to download, compile and install the Linux kernel

# yum update
# yum groupinstall “Development Tools”
# yum install wget gcc perl ncurses ncurses-devel bc openssl-devel zlib-devel binutils-devel
2. Downloading the Kernel: – Downloading the latest Kernel from kernel.org and extract it to /usr/src

# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.1.tar.xz
# tar -xf linux-4.4.1.tar.xz -C /usr/src/
# cd /usr/src/linux-4.4.1
3. Configure kernel modules: – We have downloaded and extracted the kernel Now it’s time to  configure Linux kernel. All require drivers, features can be configured this way. When we run “make menuconfig” command it will display all available configuration on Kernel. Once we have selected all of the feature wheat we needed to run our system we can save it and it will  generate a .config file with all selected options.

# make menuconfig
If you are not sure about all this, you can run “make oldconfig” you can keep old kernel configuration to to create newer kernel configuration.

# make oldconfig
If you have a GUI installed on your system you can also run “make xconfig” command which is a QT based wizard of menuconfig command

# make xconfig
4. Compiling Kernel Modules: – Now it’s time to build our Kernel modules. make command will build our kernel modules which we have generated on our .config file. During building modules you might get several error about the dependencies. Just install those dependencies and retry.

If you previously build the kernel module cleanup the previous build..

# make clean
make command can take hours, depends on your system configuration. We will create a bzip compressed kernel for i386 and AMD64 architecture.

# make bzImage
# make modules
# make
If you want to distribute your kernel, you can create rpm from your source. After a successful build you can get your kernel on /usr/src/redhat/SRPMS/ directory

# make rpm
There are several options available to make your kernel, you can get help with

# make help
5. Installing Kernel Modules: – Once module compilation is done it’s time to install Linux Kernel on your system. below command will install all new Kernel and modules on your system and also update your Grub to use latest kernel.

# make modules_install install
you may require the initrd image to properly boot your new Linux kernel. You can create initrd for you new linux kernel with mkinitrd command

# mkinitrd -o /boot/initrd.kernel-4.x.x.xdefault.img initrd.kernel-4.x.x.xdefault
If you have build the RPM of your kernel you can install it using rpm command.

# rpm -ivh –nodeps kernel-4.x.x.xdefault.x64.rpm
After installing the latest kernel on your  system run uname command to ensure you are using it.

# uname -r
At the end

It’s Done !! Now you having the latest kernel version but probably you don’t need to compile Latest version of Kernel on your system until have a specific requirement. Sometime it can break your system functionality. If your version having any vulnerability just patch it and  wait for your official repository to release the latest kernel for your Distribution.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




Blue Captcha Image


Protected by WP Anti Spam