LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 02-22-2011, 09:28 AM   #1
danib1
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
RedHat 6 Kernel Compilation


hi
i have installed Redhat 6 , i am trying to compile the kernel. i found some instruction over the net but rpm packages were build.
can anyone post an HOWTO compile the kernel on RedHat 6
 
Old 02-23-2011, 10:06 AM   #2
misconfiguration
Member
 
Registered: Apr 2007
Location: Indianapolis, Indiana
Distribution: RHEL, Fedora, AIX, HP-UX, FreeBSD, Slackware
Posts: 62

Rep: Reputation: 19
Could you please explain why exactly you're trying to recompile the kernel? If RHEL 6 is installed you have a proper working compiled version of a kernel. If you need to extend functionality to the kernel and actually have a need for recompiling you need to grab the source from http://kernel.org or RedHat's Repositories, as they also publish the source RPM's.

Otherwise you should be set - when you install // update from an RPM this is a pre-compiled version of a kernel.

Last edited by misconfiguration; 02-23-2011 at 10:18 AM.
 
Old 03-23-2011, 10:03 AM   #3
jmanjohn612
LQ Newbie
 
Registered: Mar 2011
Location: Central USA
Distribution: CentOS
Posts: 1

Rep: Reputation: 0
Looking through the .config file there are many (EXPERIMENTAL) selections within the config and I would ask why? Experimental by nature seems risky to include, and "Preemption Model (No Forced Preemption (Desktop)) --->" is the default setting...why not set it to "Server"? Also, if there is a large amount of memory, why is it recommended to use 65536 for "(4096) Low address space to protect from user allocation" yet default is 4096? There are many settings that make me ask why. AMD vs Intel and why both are present?

I need a better understanding:-(

Last edited by jmanjohn612; 03-23-2011 at 11:10 AM.
 
Old 03-23-2011, 12:05 PM   #4
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
Quote:
Originally Posted by danib1 View Post
hi
i have installed Redhat 6 , i am trying to compile the kernel. i found some instruction over the net but rpm packages were build.
can anyone post an HOWTO compile the kernel on RedHat 6
It's reasonably easy.
  1. Grab the src rpm from red hat ftp site (ftp://ftp.redhat.com/pub/redhat/linu...r/en/os/SRPMS/)
  2. install said rpm with rpm -i kernel-2.6.32-71.18.2.el6.src.rpm. (assuming you get the lastest) This will create an rpmbuild directory on your user's home (I think, I've only tried it there)
  3. Go to rpmbuild/SPECS
  4. run rpmbuild -bp kernel.spec
  5. Go to rpmbuild/BUILD/kernel version/kernel version
  6. Run make config or make menuconfig (you can run a x version of this make xconfig (KDE) or make gconfig (GNOME))
  7. run make rpm
  8. wait

As misconfiguration pointed out, you already have a kernel so there is no need to do this.

The crucial step, I guess, is make menuconfig, as this allows you to customize the kernel.

Bear in mind that the compilation is quite time consuming and will use a few GB (4-5 GB)

Last edited by manyrootsofallevil; 03-23-2011 at 01:49 PM. Reason: added names of graphic kernel menu tools
 
1 members found this post helpful.
Old 08-14-2012, 05:43 PM   #5
saurin
Member
 
Registered: Aug 2008
Posts: 47

Rep: Reputation: 0
how to upgrade the kernel image after compilation?
 
Old 08-15-2012, 02:49 AM   #6
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
Quote:
Originally Posted by saurin View Post
how to upgrade the kernel image after compilation?
I would advise against it

Just install a new kernel. This way you can test the new kernel and go back to the old one if you so wish
 
  


Reply

Tags
el6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NO /usr/src/kernel directory & Kernel Compilation PankajDS Linux - Kernel 5 01-24-2008 02:48 AM
understanding kernel .config file (for kernel compilation) sudhirkumar Linux - General 2 09-07-2007 07:55 PM
kernel compilation : to remove a kernel which files should be deleted b0nd Linux - Newbie 2 08-17-2005 12:35 PM
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 11:53 PM
does kernel-source installs with the compilation cum installtion of a new kernel? luqman Linux - General 18 03-04-2005 08:33 AM


All times are GMT -5. The time now is 03:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration