Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am very new to forum posting and also to Linux. I am currently trying to upgrade my kernel. I have followed following procedure. I am using RedHat
a. Downloaded latest kernel from kernel.org (2.6.32.3).
My kernel is - Linux 2.6.18-8.el5
b. Copied and extracted at /usr/src/linux-2.6.32.3/
c. Created .config using make gconfig
Till this it works fine. Problem starts now and I am searching the solution from last 2 days.
When I move forward to next step ‘make’ the output is as follow.
[root@localhost linux-2.6.32.3]# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
CC kernel/bounds.s
In file included from include/linux/compiler-gcc.h:86,
from include/linux/compiler.h:40,
from include/linux/stddef.h:4,
from include/linux/posix_types.h:4,
from include/linux/types.h:14,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9: include/linux/compiler-gcc4.h:8:4: error: #error Your version of gcc miscompiles the __weak directive
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
To solve this I have Tried following:
a) I have tried to upgrade gcc by using CentOS distribution. I have installed following package to upgrade gcc
Also, read the readme in the kernel sources, it should indicate what version of gcc your system requires to rebuild the that kernel.
<edit>
also check the version of glibc, this lib plays an important part of the system recompilation. Glenn.
</edit>
Just a comment, going from 2.6.18.x to 2.6.32.x is a big jump/leap forward.
It will probably work, but I would do make oldconfig before making anything else.
That way the new kernel is configured to the installed kernel before you begin configuring the new sources.
Generaly, I make a static link to the kernel sources with...
Code:
ln -s /usr/src/linux-2.6.32.3 /usr/src/linux
then all directives are made to make /usr/src/linux
This you can script/macro, as once the link is made the commands are usually the same.
Code:
cd /usr/src/linux && make oldconfig && make all && make modules_install && sudo make install
hope this helps, regards Glenn
Last edited by GlennsPref; 01-17-2010 at 11:56 PM.
Reason: edit, spelling
glenn@GamesBox:~$ uname -a (17-01 21:15)
Linux GamesBox.GlennsPref.net 2.6.31.6-1mnb_GamesBox-v=2 #1 SMP PREEMPT Sat Jan 2 15:12:41 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
glenn@GamesBox:~$
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
The latest kernel version for RH EL 5 is :
kernel-2.6.18-164.2.1.el5
.. which is what you get by an online update.
And has some backported features from later kernels incuded.
If you change it to 2.6.32.3 , you no longer have
Redhat Enterprise ( 5.3 ).
.....
I would not expect the 2.6.32.3 to compile on RH EL 5.
A "latest" OS can do it, e.g. Fedora 12, if you want to
experiment. Result : a '2.6.32.3' for Fedora 12 only.
.....
Using kernels other then official ones for CentOS/RHEL is totally stupid thing to do, since you lose ALL of the advantages of CentOS/RHEL, mostly stability. That is why (almost) nobody does it, and you will have REALLY BIG trouble to find someone to help you with that.
I , personaly, think it as a blasphemy. Just use some newer distro, do not taint CentOS/RHEL.
As per GlennsPref, I have gone through the README with the kernel source. The minimum requirement of GCC is 3.2 and I have gcc version 4.1.1 20070105. Look the following output
I have made the static link at /usr/src/linux too.
I have run ‘make oldconfig’. It asked me a lots and lots of questions regarding the various kernel features. I have given default answers to those (taken around 1.5 hour).
But at ‘make’ command the error is as it was, error is not solved.
As per the suggestions from knudfl and DrLove73, I will try to upgrade kernel-2.6.18-164.2.1.el5 today and post the result here. First I will try SRPM from redhat.
But I have search and gone through following links to understand backporting.
Hi, as you may be aware, I am not using CentOs. But....
Linux is Linux and you should be able to hack it to some degree.
I use Mandriva for this reason.
Kwan has a kernel build tute here, I used to use it when starting out as a newb. No offence!
Here it is, on part of the page that lists the programs you need to successfully configure and compile a kernel. It's the 2.6 section, not the older 2.4 part. ;-)
Another thing I thought may help, is to run all the commands as root, Just for the kernel compile "make" commands. As I have found recently, I need root access to configure a kernel, where previously I could do it as a ordinary user.
While searching for suitable guides, I also came across this web-site, dated 2006,
May still reveal some centos secrets. so don't tell anyone, just kidding!
Thanks for the response, it looks like that is the solution.
would you agree?
It does not address the conflicts that may occur once booted, but as the OP said, this is an experiment.
<edit>
and yes, I do remember Mandy has various versions, I have a few installed, but did not know enough about it to assume it was not only Mandriva.
</edit>
cheers Glenn
Last edited by GlennsPref; 01-18-2010 at 03:36 AM.
Reason: edit
If you need all modules and drivers enabled in CentOS kernel, then use kernels from centosplus repository.
CentOS kernels from base/os and updates repositories kernels are binary compatible with Red Hat compiled kernels since all kernel patches, bugfixes and any other changes are done in upstream (Red Hat) repositories, and only suggested by CentOS development team.
Centosplus repository is different story. All modules/drivers are enabled, and certain bugfixes and patches are introduced into the build. In last 3 years of use of centosplus kernels, I haven't found problems that are not found in upstream kernel so I consider them very safe. Definitely more safe then the kernel you can build by your self.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.