RHEL 4 update 2 - kernel build problem
This is my first post to linuxquestions.org.
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: *** 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 kernels.org. But in RHEL3 I was able to rebuild the kernel using what come installed on the RedHat CD's.
What piece am I missing?
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.
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?
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 kernel.org 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.
|All times are GMT -5. The time now is 10:17 AM.|