LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2006, 04:22 PM   #1
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Rep: Reputation: 15
upgrading from kernel 2.4.21 to 2.4.28


Hi,

I have Red Hat Enterprise Linux installed (AS 3), kernel version 2.4.21. I want to upgrade to version 2.4.28

I've downloaded the 2.4.28 tgz file and I've been reading thru the documentation. I meet all the minimum required versions for gcc, makefile, etc.

I unzipped it to a temp directory, then I ran
make mrproper
make config
make dep
make install

At the end of running make install, I got this:
depmod: Can't open /lib/modules/2.4.28/modules.dep for writing
/lib/modules/2.4.28 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make[1]: Leaving directory `/root/linux-2/linux-2.4.28/arch/i386/boot'
make: *** [install] Error 2

The instructions say this:
In order to boot your new kernel, you'll need to copy the kernel image (found in .../linux/arch/i386/boot/bzImage after compilation) to the place where your regular bootable kernel is found.

I went to /etc/lilo.conf.anaconda and I edited it. Here's what it said:
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.21-27.EL
label=linux
initrd=/boot/initrd-2.4.21-27.EL.img
read-only
append="hdc=ide-scsi root=LABEL=/"

Questions:

1. Why am I getting the above errors?
2. Am I supposed to copy the bzImage file somewhere and add another line in lilo.conf.anaconda??
 
Old 05-08-2006, 04:52 PM   #2
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
Aren't there supposed to be 'make modules' and 'make modules_install' steps somewhere?

Did you follow the README closely?

Always run /sbin/lilo before rebooting, make sure you have at least one bootable kernel.
 
Old 05-08-2006, 05:29 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
For 2.4 kernels you can do the following in Redhat and Redhat clone distros.
Extract the kernel in /usr/src
Make a softlinux from the new kernel to /usr/src/linux. ' ln -s /usr/src/linux-2.4.28 /usr/src/linux '
Now with redhat there is a config file in /boot that you can use to build with.
If everything worked fine then use that.
Run the command
make mrproper (restructure the kernel unless clean extract)
make xconfig ( gui interface to see the kernel ). Load the config from /boot and hit Save then Exit.
make dep ( make dependiences )
make clean ( clean up )
make bzImage ( build kernel ) Will be in /usr/src/linux/arch/i386/boot/bzImage
make modules ( build the modules )
make modules_install ( install the modules in /lib/modules )
Now copy the new bzImage to /boot/vmlinuz-2.4.28
In /boot run the command ' mkinitrd 2.4.28.img '
Edit lilo or grub and create a bootloader like current old kernel.

Brian1
 
Old 05-09-2006, 11:44 AM   #4
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Original Poster
Rep: Reputation: 15
I followed your instructions and I edited the grub.conf. When I tried to boot into the 2.4.28 kernel I got the error message below:

VFS: Cannot open root device "LABEL=/" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00

Here's what my GRUB.CONF looks like: (I manually added the 2nd title and below)
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-27.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.EL ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.21-27.EL.img
title Red Hat Enterprise Linux AS (2.4.28)
root (hd0,0)
kernel /vmlinuz-2.4.28 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.28.img


Also, what's the difference between grub.conf and /etc/lilo.conf.anaconda ??
 
Old 05-09-2006, 06:10 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
They are two completely different boot managers.

Change your root=LABEL=/ to root=/dev/hda2

Brian1
 
Old 05-10-2006, 04:41 PM   #6
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Original Poster
Rep: Reputation: 15
Ok, I did that and it booted now but when I go the command prompt and type in "uname -a", it still shows 2.4.21-27
 
Old 05-10-2006, 05:26 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Did you boot the correct kernel. The default in grub is 0 which is the first one. Unless you selected one at boot then it booted the old kernel.

Brian1
 
Old 05-11-2006, 10:23 AM   #8
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Original Poster
Rep: Reputation: 15
I selected the new one when it prompted me.
 
Old 05-12-2006, 03:58 PM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Still seems odd to me. Is the new kernel a copy of the new kernel or a link to the new kernel. If a link it may actually be seeing the old kernel. Make sure it is a copy of the new bzImage file and placed in /boot and renamed of course.

Other than that no other ideas.
Brian1
 
Old 05-12-2006, 04:26 PM   #10
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Original Poster
Rep: Reputation: 15
Not sure if it's a copy or a link. How can I tell?

When I followed the instructions it said to copy the bzImage, so here's what I typed:

cp bzImage /boot/vmlinuz-2.4.28

Also, I don't know if this makes a difference but when I extracted the tar.gz I extracted it in root's home folder. so all the extracted files are under /root/linux-2/linux-2.4.28

The reason I did that is because there's a warning in the Readme file that says not to extract it in /usr/src
"Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be."

Here's the files in my /boot directory:

config-2.4.21-27.EL lost+found System.map-2.4.28
grub message vmlinux-2.4.21-27.EL
initrd-2.4.21-27.EL.img message.ja vmlinuz
initrd-2.4.28.img System.map vmlinuz-2.4.21-27.EL
kernel.h System.map-2.4.21-27.EL vmlinuz-2.4.28
 
Old 05-12-2006, 07:15 PM   #11
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Not sure if it is in root's home directory is an issue or not. I would have extracted as /usr/src/linux-2.4.28. Then create a soft link of linux to /usr/src/linux using command ' ln -s /usr/src/linux-2.4.28 /usr/src/linux '.

If added to grub.conf as stated above and selected the the new 2.4.28 kernel, I say I have no idea why it is using kernel 2.4.21-27 still.

When you did your kernel building you were in /root/linux-2/linux-2.4.28
and not in /usr/src/linux correct? If in /usr/src/linux when compiling then you ended up compiling the the linux-2.4.21 kernel.

Brian1

Last edited by Brian1; 05-12-2006 at 07:39 PM.
 
Old 05-14-2006, 08:34 PM   #12
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Go back to where you built your 2.4.28 kernel and do; make install
 
Old 05-15-2006, 11:50 AM   #13
xxsubz78x
Member
 
Registered: Sep 2005
Posts: 44

Original Poster
Rep: Reputation: 15
How about the warning in the Readme about not extracting it to /usr/src. And for your question about being in the /root/linux-2/linux-2.4.28 Yes I was in that directory.

Here's something else that's interesting. I have setup a 2nd machine (this one's a Gateway P4 1 Ghz) and I did the exact same thing that I did to the 1st machine. This one however starts loading and then it cannot load the GUI portion.

Why am I getting different results with 2 different machines?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Upgrading my Kernel marcusshirley Linux - Software 14 02-08-2006 10:12 AM
Upgrading kernel Whitman Debian 2 05-27-2005 12:25 PM
problems occured after upgrading kernel and kernel-utils parv Fedora 0 05-02-2005 07:21 PM
Upgrading kernel on Debian from 2.4 to 2.6.8, Kernel Panic omlette Linux - General 3 03-07-2005 08:00 AM
Kernel Upgrading.... bfloeagle Linux - General 2 03-16-2001 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration