Main Page | Report this Page
Linux Forum Index  »  General Linux Discussion  »  2.6.x kernel on CentOS 3.9 (how??) RPM and source...
Page 1 of 1    

2.6.x kernel on CentOS 3.9 (how??) RPM and source...

Author Message
September Storm...
Posted: Sat Sep 12, 2009 12:28 pm
Guest
Hi,

I have a system with a 2.6.x kernel on it from a long time ago and don't
recall what I did to get it to work. I am trying to install a 2.6.x
kernel now and yum installs a kernel from May or something, so I try
and force an install of a newer one (from Aug) and yum thinks it's up
to date. A try using RPM fails with dependencies that I don't know how
to resolve:

root at (no spam) woodstock [~]# rpm -ivh kernel-2.6.9.EL.i386.rpm
warning: /var/tmp/rpm-xfer.L7h3rW: V3 DSA signature: NOKEY, key ID
443e1821
error: Failed dependencies:
module-init-tools is needed by kernel-2.6.9.EL.i386.rpm
mkinitrd >= 4.2.1.6-1 is needed kernel-2.6.9.EL.i386.rpm

Exactly what can I do about that?

Also, any time I try to compile from source (using 2.6.30.5 or
2.6.30.6), after a long compile it always errors:

MODPOST vmlinux.o
WARNING: vmlinux.o (.text.page_aligned): unexpected non-allocatable
section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
ld:arch/x86/kernel/vmlinux.lds:474: syntax error
make: *** [.tmp_vmlinux1] Error 1

I've not seen any patches and information on that compile error seem
shoddy. I've used CONFIG_DEBUG_SECTION_MISMATCH=y and the errors
aren't any different from shown above right there either. Anyone know a
solution for this problem?
 
Allen Kistler...
Posted: Sat Sep 12, 2009 2:29 pm
Guest
September Storm wrote:
Quote:
I have a system with a 2.6.x kernel on it from a long time ago and don't
recall what I did to get it to work. I am trying to install a 2.6.x
...

[snip]

root at (no spam) woodstock [~]# rpm -ivh kernel-2.6.9.EL.i386.rpm

[snip]

I've not seen any patches and information on that compile error seem
shoddy. I've used CONFIG_DEBUG_SECTION_MISMATCH=y and the errors
aren't any different from shown above right there either. Anyone know a
solution for this problem?

2.6.9 is the CentOS/RedHat 4 kernel. Install the real CentOS 3 kernel,
which is 2.4.something, or upgrade the whole OS to CentOS 4. Either way.

If there's some reason you really have to build a custom kernel, then
start with the CentOS kernel source RPM, which contains all the patches
Red Hat and CentOS have added.
 
September Storm...
Posted: Sat Sep 12, 2009 2:47 pm
Guest
Allen Kistler wrote:

Quote:
September Storm wrote:
I have a system with a 2.6.x kernel on it from a long time ago and
don't
recall what I did to get it to work. I am trying to install a 2.6.x
...

[snip]

root at (no spam) woodstock [~]# rpm -ivh kernel-2.6.9.EL.i386.rpm

[snip]

I've not seen any patches and information on that compile error seem
shoddy. I've used CONFIG_DEBUG_SECTION_MISMATCH=y and the errors
aren't any different from shown above right there either. Anyone know
a solution for this problem?

2.6.9 is the CentOS/RedHat 4 kernel. Install the real CentOS 3
kernel,
which is 2.4.something, or upgrade the whole OS to CentOS 4. Either
way.

If there's some reason you really have to build a custom kernel, then
start with the CentOS kernel source RPM, which contains all the
patches Red Hat and CentOS have added.

I realize that 2.4 is the CentOS 3 kernel, but it's running a 2.6 kernel
now, which I had compiled from source last time. It errors when I
build from source now (something changed), so that's not going to work,
but this wasn't a problem before when I build the (from source) other
2.6 kernel. I was hopeful for a solution based on that and without
having to upgrade the OS (which is a good idea anyway).
 
J.O. Aho...
Posted: Sun Sep 13, 2009 1:29 am
Guest
September Storm wrote:
Quote:
Allen Kistler wrote:

September Storm wrote:
I have a system with a 2.6.x kernel on it from a long time ago and
don't
recall what I did to get it to work. I am trying to install a 2.6.x
...

[snip]

root at (no spam) woodstock [~]# rpm -ivh kernel-2.6.9.EL.i386.rpm

[snip]

I've not seen any patches and information on that compile error seem
shoddy. I've used CONFIG_DEBUG_SECTION_MISMATCH=y and the errors
aren't any different from shown above right there either. Anyone know
a solution for this problem?
2.6.9 is the CentOS/RedHat 4 kernel. Install the real CentOS 3
kernel,
which is 2.4.something, or upgrade the whole OS to CentOS 4. Either
way.

If there's some reason you really have to build a custom kernel, then
start with the CentOS kernel source RPM, which contains all the
patches Red Hat and CentOS have added.

I realize that 2.4 is the CentOS 3 kernel, but it's running a 2.6 kernel
now, which I had compiled from source last time. It errors when I
build from source now (something changed), so that's not going to work,
but this wasn't a problem before when I build the (from source) other
2.6 kernel. I was hopeful for a solution based on that and without
having to upgrade the OS (which is a good idea anyway).

If you have built the kernel from source and nothing else, I'm surprised that
your CentOS works at all, as the system needs different module-init-tools and
mkinitrd and some changes in the init rc script.
I do suggest you try to find some RedHat8 howtos about the kernel update,
myself I did use those when I still was using RedHat7.3.

You must update the module-init-tools to a newer one, as you can't use the
same binary to load kernel 2.6 modules as for loading kernel 2.4 modules.
Keep in mind that the RPMs only will provide you with either 2.4 or 2.6
compatible binaries (there are some distributions that supplies both).

mkinitrd works in different way too, there are some broken versions, so pick
the right one. If I remember it right, a 2.4 module ends with .so while a 2.6
module ends with .ko.


If you really want to make a kernel from SRPM without the dependency, then
update the spec file so it don't contain the dependency requirement, but I do
suggest you do update module-init-tools and mkinitrd.

Not sure which compiler centos 3.9 uses, but back in those days RedHat had
always a quite experimental compiler and I remember that developers didn't
care about bugs reported from RedHat users who had compile errors as those
where from the experimental and broken compiler, this could be the cause for
your problem too.


You can always disable the CONFIG_DEBUG_SECTION_MISMATCH option to see if that
makes a difference.



If you want to make it easy, just upgrade or make a fresh install instead of
making own packages, as you will need to install new kernel-headers and then
rebuild glibc and I wouldn't be surprised if you would need to upgrade glibc
to build correctly, then you need to upgrade gd (it's a round dependency, so
you need to make a glibc without the gd support, then update gd, then make a
glibc with the gd support enabled), you may run into you need to update gcc
too and in the end you will have updated like 20-30 heavy packages to get the
system updated enough to get the benefit of running the 2.6 kernel.

Be happy that you won't try to include gnome2 to RedHat7.3, that was a big
job, took me some weeks, I got a so so dependency map from one of the gnome2
developers who happen to work for RedHat.


-- //Aho
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Mon Dec 07, 2009 1:31 pm