LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-28-2003, 03:57 AM   #1
mcalizo
Member
 
Registered: Aug 2003
Location: Manila, Philippines
Distribution: RH
Posts: 43

Rep: Reputation: 15
upgrade linux kernel problem


Hi,

I have a RH 7.3 box and i am trying to upgrade my kernel from 2.4.18 to 2.4.21, when i check the version installed as per instruction from RH using:

[root@localhost root]# rpm -q kernel kernel-headers kernel-ibcs kernel-pcmcia-cs kernel-source
kernel-2.4.18-3
package kernel-headers is not installed
package kernel-ibcs is not installed
kernel-pcmcia-cs-3.1.27-18
kernel-source-2.4.18-3

Instaead of this one according to RH

$ rpm -q kernel kernel-headers kernel-ibcs kernel-pcmcia-cs kernel-source

kernel-2.0.36-0.7
kernel-headers-2.0.36-0.7
kernel-ibcs-2.0.36-0.7
kernel-pcmcia-cs-2.0.36-0.7
kernel-source-2.0.36-0.7

what should i do with this?
 
Old 08-28-2003, 04:15 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Welcome to LQ

Where'd you get those instructions? The 2.0 kernel is QUITE old actually, pre linux 7.3 for sure.

To check your current kernel use the command:
uname -r

And to upgrade, simply grab the source you wanna upgrade to, and get started on installing it, as it really doesn't matter which kernel you are running (as it's surely a 2.4 series).

Cool
 
Old 08-28-2003, 04:15 AM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Moving to the RedHat forum

Cool
 
Old 08-28-2003, 10:45 AM   #4
grym
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Gentoo/Slackware/Debian/Mandrake
Posts: 285

Rep: Reputation: 30
Just make sure and stay in the 2.4 line of kernels 2.6 needs new tools that you most likely wouldn't have installed

Last edited by grym; 08-28-2003 at 10:47 AM.
 
Old 08-28-2003, 11:38 AM   #5
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
Quote:
Originally posted by grym
Just make sure and stay in the 2.4 line of kernels 2.6 needs new tools that you most likely wouldn't have installed
It does? I'm running the 2.6 test3 kernel on my RedHat 8.0 box, and I didn't have to do anything different to get the kernel to compile. I just hope I didn't miss something.

slight
 
Old 08-28-2003, 11:48 AM   #6
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
read this , as i am sure it will help you alot
 
Old 08-28-2003, 12:57 PM   #7
grym
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Gentoo/Slackware/Debian/Mandrake
Posts: 285

Rep: Reputation: 30
The tools issue is a common problem if you use modules. Here is a site that may provide you with some info:

http://thomer.com/linux/migrate-to-2.6.html

This is also documented many other places. Gentoo fixes the problem auto-magically. Other distros, of course, vary.
 
Old 08-28-2003, 05:05 PM   #8
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
In addition to DrOzz's suggestion, I recommend you look into applying Red Hat's errata packages for your version of Red Hat Linux. Instead of the original and ancient kernel-2.4.18-3, you would get 2.4.20-20.7 which includes many fixes and security relevant stuff. If there is no good reason why you would need a pristine 2.4.21 kernel from kernel.org, you should be happy with Red Hat's.

Go here: http://www.redhat.com/errata

You might also want to look into Red Hat Network or alternative ways on how to apply updates automatically.
 
Old 08-30-2003, 09:40 AM   #9
r00tnuke
Member
 
Registered: Aug 2003
Location: /earth/usa/texas/houston
Distribution: Fedora C2
Posts: 64

Rep: Reputation: 15
Upgrade & recompile a kernel steps
download
extract
linux
deps
menuconfig
mdcbmm
system
bzImage
mkinitrd
grub

Where to get the kernel source, http://www.kernel.org. Select F (which stands for Full source)
Then uncompress and extract the kernel source into /usr/src on your system:
cd /usr/src
bzcat linux-2.4.20.tar.bz2 | tar xvf -
Check for dependencies for and install as needed:

kernel-source-*
glibc-kernelheaders-*
cpp-*
ncurses
ncurses-devel-*
binutils-*
gcc-*
rpm -qa | grep “kernel-source”
Then create a symbolic link where linux-2.4.2x was the old link and linux-2.4.2x will be the new.

rm linux-2.4
ln -s linux-2.4.21 linux-2.4



If this is the first time you're building a kernel, start with the kernel configuration template that your system was built with:

cd /boot
ls config*
config-2.4.20-8
cp config-2.4.20-8 /usr/src/linux-2.4/.config

Then you can customize your kernel configuration by typing:

cd /usr/src/linux-2.4
make menuconfig

After customizing the kernel, you can build it:
make dep clean bzImage modules modules_install

Copy the system map and make symbolic link.

cd /usr/src/linux-2.4
cp -p System.map /boot/Sytem.map-2.4.21
rm System.map
ln -s System.map-2.4.21 System.map
What to do after you build a kernel. Copy the resulting kernel to the /boot directory with any name you'd like for it:

cp /usr/src/linux/arch/i386/boot/bzImage /boot/mynewkernel
Create your initrd image, where 2.4.21 is your /lib/2.4.21 directory:
mkinitrd /boot/mynewkernelimage.img 2.4.21

If your machine is configured to boot with lilo then edit /etc/lilo.conf, and add a reference to your new kernel. Look at other entries in /etc/lilo.conf to determine what disk shoud be used, etc. Here is a sample of what one might add to /etc/lilo.conf:
image=/boot/mynewkernel
label=mynewlabel
read-only
root=/dev/hda8
Then type: lilo
If your machine is configured to boot with grub then modify /boot/grub/menu.lst file. Here is an example for the /boot/grub/menu.lst file:
title Linux 2.4.20 with all my new configuration
root (hd0,0)
kernel /mynewkernel ro root=LABEL=/
initrd /initrdmnk.img

r00tnuke
 
Old 12-21-2003, 10:36 AM   #10
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
I pretty much want to do the same thing with a debian box I've inherited, is this a generic guide or just specific to the RH questioner? Looks applaicable across distros for what's it's worth
 
  


Reply



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
Kernel Upgrade Problem. Rexversusu Debian 4 09-23-2004 05:43 PM
Kernel upgrade problem. Ten-shin Slackware 8 06-30-2004 02:20 PM
Problem when upgrade to kernel 2.4.24 little_ball Slackware 19 01-08-2004 06:43 PM
Kernel upgrade problem samble Linux - General 2 11-06-2003 11:07 AM
Kernel Upgrade Problem ppuru Linux - Software 1 07-28-2003 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:53 AM.

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