lunes, 11 de mayo de 2015

Build a Red Hat 7 custom kernel

Red Hat 7.

1.-Download and install redhat 7 binaries ISO

2.-Register and suscribe your license with redhat using

[root@localhost linux-3.10.0-229.1.2.el7]# subscription-manager register --password=PASSWORD
The system has been registered with ID: f85af162-7d22-5a8b-ac98-05ada827659b
[root@localhost linux-3.10.0-229.1.2.el7]# subscription-manager attach --auto

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3.- Download the latest redhat kernel source code from

4.- Scp it to your redhat installation:
# scp Downloads/kernel-3.10.0-229.1.2.el7.src.rpm  root@

5.- install the kernel-source
#rpm -ivh kernel-3.10.0-229.1.2.el7.src.rpm

6.- Verify it was installed:
# rpm -qa kernel

7.- Install build dependencies
yum groupinstall "Development Tools"
yum install ncurses-devel
yum install ncurses-devel
yum install unifdef
yum install bc

8.- Go to the directory  /root/rpmbuild/SOURCES/ and untar the source code file
cd /root/rpmbuild/SOURCES/
# cd /root/rpmbuild/SOURCES/
# tar -xvf linux-3.10.0-229.1.2.el7.tar.xz

9.- Go to the source code directory:
# cd /root/rpmbuild/SOURCES/linux-3.10.0-229.1.2.el7

9.- Prepare the build config

#make menuconfig
    NOTE: Select the default option and <save> it as ".config" (no quotes), then go to <exit>

Then run ..
#make modules
#make modules install
(If there is an error like a directory doen't exist just create it with mkdir)
#make install

The come and take it flag was created during the American revolution then used in the Texan revolution.

1 comentario:

  1. "#rpm -ivh kernel-3.10.0-229.1.2.el7.src.rpm" will decompress the file into "~/rpmbuild" directory. How can I install it to another directory? Thanks!