Operating System - Linux
1830172 Members
1860 Online
109999 Solutions
New Discussion

Upgrading RHAS 2.1 Kernel

 
SOLVED
Go to solution
Philip Lo
Occasional Contributor

Upgrading RHAS 2.1 Kernel

Currently I'm using RHAS 2.1 with 2.4.9-e.3 kernel and I want to upgrade to 2.4.9-e.24. I've downloaded the e.24 source code (kernel-2.4.9-e.24.src.rpm) from ftp://updates.redhat.com/enterprise/2.1AS/en/os/SRPMS.

After installing the rpm, there seems to be a lot of files in /usr/src/redhat/SOURCES like .patch and .diff files. How do I proceed from there ? There's a file called linux-2.4.9.tar.bz2, is it the e.24 source code ?

Please help... Thanks.
5 REPLIES 5
Alexander Chuzhoy
Honored Contributor

Re: Upgrading RHAS 2.1 Kernel

this is compressed tar file
first uncompress and untar it to /usr/src/ directory
then cd to linux-2.4.9 directory
and start the regular procedure (i. e.
1. edit the Makefile to change the EXTRAVERSION
2.make mrproper
3.make xconfig
4.make dep
5. make bzImage
6. make modules
7. make modules_install
then cop the bzImage file to boot directory and edit the boot manager apropriately.



Best regards.
Steven E. Protter
Exalted Contributor

Re: Upgrading RHAS 2.1 Kernel

I don't do manual upgrades of kernels. That's cause I'm lazy and haven't had to do an Oracle install on Linux in a while.

Its a lot easier using the Red Hat Update utility to handle the upgrade. It does all the files, changes the grub.conf, everything.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor
Solution

Re: Upgrading RHAS 2.1 Kernel

First at all, I recommend you to buy support contract from RH, so you'll be able to update your kernel to the latest one [ 2.4.9-e.30] just in "one click" (using up2date).

But if you anyway want to install kernel from the source:

rpm -ihv kernel-x.y.z.src.rpm
cd to /usr/src/redhat/SPECS
Type: rpm -bb kernel-x.y.z.spec

But again - I don't sure if you'll receive the same binary kernel as RH provides.

BTW, there are few projects which are trying to build binary RHEL from RH sources:

- http://whiteboxlinux.org/howto.html
- http://caosity.org/

-http://www2.uibk.ac.at/zid/software/unix/linux/


Rgds,
Vitaly
Philip Lo
Occasional Contributor

Re: Upgrading RHAS 2.1 Kernel

Thanks for the reply and Merry Christmas to all of you. I'm aware of the update utility but that gives me the pre-compiled kernel which I can't customize. It seems quite troublesome in upgrading RHAS kernel comparing normal linux kernel.
Gianluca Cecchi
Advisor

Re: Upgrading RHAS 2.1 Kernel

For what you want, you have to:
install the package
kernel-source-xxx.rpm
this will install the kernel tree source under /usr/src/linux-2.4 on which official
rh kernel is based

PS: the kernel is GPL, so RH MUST provide EXACT source tree under which their production kernels run! if different, notify to linux kernel mailing list maintainers!

then

- cd /usr/src/linux-2.4

- edit Makefile and at the beginning you
will find a line like

EXTRAVERSION = -custom

change it to what you want, something like

EXTRAVERSION = -test

This determines the name of the modules' directory under /lib/modules, so the extraversion is useful for having multiple
modules directories. Keep in mind, otherwise you are going to risk to overwrite default modules directory created by installation process and not be able to boot

BTW if you want to replicate an official RH kernel, for example i686-smp one you have to cut off the "-custom" and leave only "EXTRAVERSION =" at this line
You can also replicate the installation kernel, using the kernel config flagged

kernel-xxx.BOOT.config

- make mrproper

- cp configs/kernel-2.4.xxx.config .config

for example if you want to customize your kernel starting from the i686-smp rh kernel
copy the kernel-2.4.xxx-i686-smp.config
file renaming it .config

- make menuconfig
and change eventually the parameters you like
or leave unchanged if you want to replicate
official RH kernel.
PS: the make menuconfig step IS necessary
even if you plan to do nothing. It has to do some steps: in this last case it is faster
to simply run "make oldconfig" that parses
your .config file and makes the necessary config steps

- make dep

- make bzImage

- make modules

- make modules_install

- cp arch/i386/boot/bzImage /boot/my_kernel
- cp System.map /boot/System.map.my_kernel
- eventually run mkinitrd
mkinitrd /boot/initrd_my_kernel.img 2.4.xxxx
(the name of your modules dir under /lib/modules created by make modules_install command)
- edit accordingly lilo.conf and run lilo or edit grub.conf to have your settings saved


HIH,
Gianluca

PS: sorry for the pedantic answer...




The Penguin is one step ahead...