Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 04-19-2006, 07:08 PM   #1
LQ Newbie
Registered: Apr 2006
Posts: 4

Rep: Reputation: 0
Question RHEL 4 update 2 - kernel build problem

This is my first post to
I have spent several hours going through posts on this site and other trying to find out what I'm doing wrong. So, I think I've done my best to RTFM. From what I've read it doesn't seem this should be that hard, in fact it seems like it should be easier that with RHEL3 (2.4 kernel)- which I never had a problem with even on my first attempt.

I've loaded RHEL4 update 2 64bit (uname -r = 2.6.9-22EL.smp) I installed most of the packages during the installation, omitting only things like office productivity and the such. Specifically, I made sure to check the boxes for Development Tools, X Software Development, GNOME Software Development, and KDE Software Development.
In the future I'm going to need to tweek some of the kernel settings, but for now all I want to do is just build a kernel that works. So I tried to keep this as simple and straight forward as possible by just rebuilding the same kernel I already have.

Here is what I did-

-This is so I could start over with a fresh image when I screw up. Because I know I will.
# cd /usr/src
# tar czf src.tgz *

-Kernel Build Procedures
# cd /usr/src/kernels/2.6.9-22.EL-smp-x86_64
# cp /boot/config-2.6.9-22.ELsmp .config
# make oldconfig
# make bzImage
make[1]: *** No rule to make target 'init/main.o', needed by 'init/built-in.o'.
make: *** [init] Error 2

I put that error in Google, which let me to this site.
I found a post that said I have to do the build from the /usr/src/redhat/BUILD directory, but that directory is empty.

I looked around for a little while longer and the only thing I can think of is that I should download the kernel source from But in RHEL3 I was able to rebuild the kernel using what come installed on the RedHat CD's.

What piece am I missing?
Old 04-19-2006, 11:44 PM   #2
LQ Newbie
Registered: May 2004
Location: florida
Distribution: Red Hat Enterprise 4.0
Posts: 8

Rep: Reputation: -2
If you can get a copy of the latest kernel you would be better off. kernels/2.6.9-22.EL-smp-x86_64 is a real pain in the butt.. Also the .SMP versions are not real stable. are you using dual AMD Opteron processor with over 4gb of ram?? You should be running version kernel version 2.6.9-34.EL-smp-x86_64 for optimum performance but you really should have kernel version 2.6.9-34.EL to roll back onto.
Old 04-20-2006, 09:51 AM   #3
LQ Newbie
Registered: Apr 2006
Posts: 4

Original Poster
Rep: Reputation: 0
I have 2GB of RAM and 2 AMD Opteron processors.
In order to rebuild a kernel under RHEL4, just to modify a few parameters, do I have to download the new kernel or is the procedure possible with what comes installed from the RedHat CD's?
And is what I'm doing the correct prodecures for building the kernel?
Old 04-20-2006, 10:26 PM   #4
Registered: Oct 2003
Location: fargoh eh.
Distribution: slackware
Posts: 94

Rep: Reputation: 15
if all you want to do is to add more modules, chances are good that the modules are already built and you can just load them. red hat is pretty good about that. use modprobe to load/unload modules and lsmod to see what modules are currently loaded. if you want to change parameters, yes, you must do a full rebuild.

by default, i don't think red hat includes kernel sources or makes the kernel sources available by up2date (they used to make it so you could install kernel-sources or do up2date -i kernel --source or something similar) but i think that has been cut. either way, downloading sources from is probably the best option in order that you can get the newest kernel (as opposed to something that is as old as the day rhel4 was released).

oh, and the errors you are getting are a result of not having kernel source. the source that you found referencing /usr/src/redhat/BUILD is either referencing what happens when you get kernel-source or to build an rpm, i'm not sure which. that directory is the build directory for red hat rpms. also i think the whole make bzImage business has been eliminated from the 2.6.x kernels and i'm pretty sure i've seen a how-to build 2.6 kernel post somewhere on lj that would tell you the only steps that are needed.


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
Build versus Test on RHEL revisions (WS, ES, AS) ken.lim Red Hat 3 04-05-2006 06:21 AM
kernel build problem ludwig W Linux - General 2 01-10-2004 06:02 PM
How to update the kernel with a build router Neomaster Linux - Hardware 0 12-18-2003 10:57 AM
Kernel build problem Thomas.P Programming 2 11-19-2001 04:08 AM
Kernel Build problem bataii Programming 5 11-06-2001 02:21 PM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:13 PM.

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