?
Solved

Trying to run Fedora Core 3 with a 2.4.xx kernel

Posted on 2005-02-28
34
Medium Priority
?
1,496 Views
Last Modified: 2013-12-06
Hello Everyone,

I have a project at work that is trying to run Fedora Core 3.  However there is a catch to this because I need this machine to run the a 2.4.xx kernel.  I have tried installing the source and compiling the kernel in FC3 and when I try to boot into it I get a kernel panic.  I have tried upgrading it from RedHat 9 to FC3 but this upgrades my kernel as well with no option to run the old kernel as with previous upgrades did.  I have also tried updating the FC1 installation but have not been able to get that to work as well.

If anyone has any suggestions I would greatly appreciate it.  I have ghost images of RedHat 9, Fedora Core 1 -3 so trying something that will blow everything away and leave the machine dead is not a problem just a simple restore of the image and I am back in business.

If this is possible please give me some help.  I am not an expert on linux.  I have recompiled kernels and all that good stuff but the more details you can give on your suggestion the better for me.

Thanks for the help in advance.
0
Comment
Question by:tmireles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 19
  • 15
34 Comments
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13423334
The main problem is the 2.4.x kernel series requires old modutils . Fedora core 3 will come with new module-init-tools,
Get the old modutils from redhat site and compile it to a seperate directory and update your path to that and then compile kernel 2.4.x series.

The main problem is - with the new mod-init-tools you cant create a initrd . with out that most certainly you kernel will panic .
If you have problem with compiling modutils seperately update me .

download the modutils from here

http://www.kernel.org/pub/linux/utils/kernel/modutils/v2.4/

remember while compilng modutils dont forget to give --prefix or else it will over write the current tools which will be more mess .

good luck .
surya.
0
 
LVL 7

Accepted Solution

by:
surya_prabhakar earned 2000 total points
ID: 13423683
Full method ..
download modutils from the site

untar it with
# tar -zxvf <filename>.tar.gz

# mkdir /usr/local/modutils
# cd modutils-xx.xx.xx  ( which you just now extracted )
# ./configure --prefix=/usr/local/modutils
# make all install

once this is done we have to prepare for kernel compilation

# PATH=/usr/local/modutils/sbin:$PATH
go to kernel directory .

open the file called Makefile and find the line with /sbin/depmod and remove "/sbin" in the word as below
old
DEPMOD = /sbin/depmod
new
DEPMOD = depmod

after that kernel compilation

the last step is make modules_install
see if you get any errors in the last line when it is trying to do depmod . Please paste the errors if you get any ,
then do a mkinitrd .

once this is done update your grub /lilo and reboot
if you get any kernel panic further please paste the exact panic message .

thanks
surya.




0
 
LVL 4

Author Comment

by:tmireles
ID: 13423774
I will give it a try and get back with you.  Thanks for the help thus far.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 4

Author Comment

by:tmireles
ID: 13424465
Surya,

Once again I appreciate the help.  Here is what I get when I try and do a make modules_install

cd /lib/modules/2.4.29; \
mkdir -p pcmcia; \
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then /depmod -ae -F System.map  2.4.29; fi
/bin/sh: /depmod: No such file or directory
make: *** [_modinst_post] Error 127
[root@localhost linux-2.4.29]#


This is the last part of the message.  I you need me to post the entire thing let me know.  Also got an error when trying to do the mkinitrd which was looking for depmod.old.  I have seen this error before and found a work around this by making a sim link to depmod.  Not sure if this is the correct way to approach this error but it did what I needed it to.

The computer complained about not being able to load apgpart and it hangs there for a minute or so and then I get the kernel panic.  Right now everything is set to rhgb quiet or something like that in grub which I can remove.  The question is what place would the kernel panic write to.  In other words is there a log file I can access to get this information posted to you.  The computer runs thru these things so fast that I cannot figure out what the failure is at or how to write it all down since it is scrolling fast.  If there is a log file let me know and I will paste the part that you want.

Thanks
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13424667
Please follow exactly
old
DEPMOD = /sbin/depmod
new
DEPMOD = depmod

you have left a "/" in the depmod line in Makefile

we shud understand what we are trying to do .
first we are compiling the modutil into /usr/local/modutils . then we are add that path to our regular system path
 
once the modutils compilation is done chec whether you have the correctly in place by goin phtsically to that directory .
# ls /usr/local/modutils/sbin

here you shud fine one depmod which is the old one . we are  trying to use this . hence we are updating the system path in way that this depmod is the first one in the path .
latter do an initrd like this in the same windows where you updated the path .

if it still does not work give me the output of below commands

#ls /usr/local/modutils/sbin
#echo  $PATH


surya.

 
0
 
LVL 4

Author Comment

by:tmireles
ID: 13424760
Sorry about that did not see that.  I fixed it to read DEPMOD = depmod.

I copied the last few lines before the error and also what you asked me to copy.


cd /lib/modules/2.4.29; \
mkdir -p pcmcia; \
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then depmod -ae -F System.map  2.4.29; fi
depmod: cannot read ELF header from /lib/modules/2.4.29/modules.alias
depmod: /lib/modules/2.4.29/modules.ccwmap is not an ELF file
depmod: /lib/modules/2.4.29/modules.inputmap is not an ELF file
depmod: cannot read ELF header from /lib/modules/2.4.29/modules.symbols
make: *** [_modinst_post] Error 1

[root@localhost linux-2.4.29]# ls /usr/local/modutils/sbin/
depmod    insmod                 kallsyms       ksyms  modinfo   rmmod
genksyms  insmod_ksymoops_clean  kernelversion  lsmod  modprobe

[root@localhost linux-2.4.29]# echo $PATH
/usr/local/modutils/sbin/:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@localhost linux-2.4.29]#
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13424874
Can u do kernel compilation from scratch and update me .

#mv /lib/modules/2.4.29 /tmp
# cd /usr/src/linux-2.4.29
open the Makefile and check the release name
4th line
EXTRAVERSION =  < leave it blank>

# cp .config config
# make mrproper
# cp config .config
# make oldconfig
#make dep
#make clean
# make bzImage
#make modules
#make modules_install

and then
# mkinitrd /boo/initrd-2.4.29.img 2.4.29

surya.
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13424887
make sure the path is same before you do all this
/usr/local/modutils/sbin/:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
0
 
LVL 4

Author Comment

by:tmireles
ID: 13424912
this is the error I get when I try and do the first line

[root@localhost linux-2.4.29]# mv /lib/modules/linux-2.4.29/tmp
mv: missing file argument
Try `mv --help' for more information.
[root@localhost linux-2.4.29]#
0
 
LVL 4

Author Comment

by:tmireles
ID: 13424937
sorry I see my error
0
 
LVL 4

Author Comment

by:tmireles
ID: 13424946
same error

[root@localhost linux-2.4.29]# mv /lib/modules/2.4.29/tmp
mv: missing file argument
Try `mv --help' for more information.
[root@localhost linux-2.4.29]#
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13424974
#mv /lib/modules/2.4.29   <space in between>                 /tmp

check all the names please .....

we are trying to move off all ready created modules to /tmp directory .
0
 
LVL 4

Author Comment

by:tmireles
ID: 13425034
Sorry,

Got it to compile with no errors.

I copied the bzImage to the boot folder and renamed it vmlinuz-2.4.29 as the other files are named.  Edited the grub.conf file to match the others with the 2.4.29 instead.  Will attempt to reboot and boot into kernel.

0
 
LVL 4

Author Comment

by:tmireles
ID: 13425070
Ok well still get kernel panic and now cannot boot into 2.6 kernel.  Will have to re-ghost image and start again.

I really do appreciate all the help and I appologize for missing some of the spaces in the lines.

0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13427176
dont worry about it .Every body starts from scratch . Good that you have ghost image with you and loads of patience . THe methood we followed was correct .We need to try it precisely . I have did the same on my fedora core 3

surya.
0
 
LVL 4

Author Comment

by:tmireles
ID: 13431581
Ok Surya,

Restored the image and started from scratch.

Downloaded the modutils (version 2.4.27) which is the latest.

Downloaded latest kernel (version 2.4.29)

Followed your proceedures:

untar it with
# tar -zxvf <filename>.tar.gz

# mkdir /usr/local/modutils
# cd modutils-xx.xx.xx  ( which you just now extracted )
# ./configure --prefix=/usr/local/modutils
# make all install

once this is done we have to prepare for kernel compilation

# PATH=/usr/local/modutils/sbin:$PATH
go to kernel directory .

I assume that the line above the go to kernel directory was to be typed in the kernel directory.  Just in case I typed it into both directories.

Then followed the following:

open the file called Makefile and find the line with /sbin/depmod and remove "/sbin" in the word as below
old
DEPMOD = /sbin/depmod
new
DEPMOD = depmod

after that kernel compilation

make mrproper

make menuconfig  --- put in the modules that are needed and removed some -- installed the ext3 support since the drives are formated this way, installed the SCSI support since this drive is a SCSI drive, removed sound since no sound card present, removed apgpart module since this seems to give me a problem every time I have tried including yesterday ( will touch on this later)

make dep

make clean

make bzImage

make modules

make modules_install

mkinitrd /boot/initrd-2.4.29.img 2.4.29

I then proceeded to copy my bzImage into the boot directory and edit my grub.conf file to match for boot.

The I am including the few lines before the error message that I get when I boot:

ds:  no socket drivers loaded!
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

So this is the error message that I get.  I will reboot the machine and paste in the grub.conf file so you can look at it and tell you what I have tried.

Once again thanks for all the help so far and for being very patient yourself.


the last step is make modules_install
0
 
LVL 4

Author Comment

by:tmireles
ID: 13431638
Here is the complete grub.conf

# 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/sda2
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.4.29smp)
      root (hd0,0)
      kernel /vmlinuz-2.4.29 ro root=LABEL=/ rhgb
      initrd /initrd-2.4.29.img
title Fedora Core (2.6.9-1.667smp)
      root (hd0,0)
      kernel /vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.9-1.667smp.img
title Fedora Core-up (2.6.9-1.667)
      root (hd0,0)
      kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
      initrd /initrd-2.6.9-1.667.img

I have tried changing the line at the end to root=/ and just obmit the LABEL part with no luck.  I have also tried changing it to root=/sda2 with no luck as well.

This is a SCSI drive that the machine is booting into.  The drive is partitioned with sda1 being the boot sda2 being the main drive and sda3 being swap.
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13432036
>ds:  no socket drivers loaded!
>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

The above tells me that your all the above method is correct except for one thing .
How did you create the .config file for the kernel . ( the configuration file )
when you do a make menuconfig or xconfig make sure you select all the scsi modules .YOu might have missed them .
Hence it is panicing .

surya.

0
 
LVL 4

Author Comment

by:tmireles
ID: 13432416
I guess I did not make a .config file.  I thought this was done when the make menuconfig file was saved.  I will try this again and work that in there.

I loaded up the SCSI driver that has been working on a redhat 9 and fC3 (2.6 kernel) which is the AIC 79xx driver.  This is the only one I loaded.  When the boot process is doing its thing it does find the drive just find as I see it up on the screen so this is why I am a bit confused.

Any other suggestions would be greatly appreciated.

Thanks
0
 
LVL 4

Author Comment

by:tmireles
ID: 13432806
So tried switching to  /dev/sda2 and now I get the following error:

ds:  no socket drivers loaded!
kjournald starting.  Commit interval 5 seconds
EXT3-fs:  mounted filesystem with ordered data mode.
VFS:  Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory:  128k freed
Warning:  unable to open an initial console.

Not sure what is going on now with this but will still try and do the config thing first and try again,.

0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13434020
your .config is the problem . Ok do a make menuconfig agin and select all the relevant drivers and scsi . It takes some time to do it . But it is really worth doing it carefully . I doubt scsi drivers are not included so please check for those in the devices section . if in doubt select the option .

FYI ...  make menuconfig select the most generic options but how  does it know whether you have a scsi or something else .You have to do the selection for yourself .

just for more clarity on what hardware you have do an
#lspci
it will show you your hardware and taking that as a guideline build your kernel.

please update .

surya.
0
 
LVL 4

Author Comment

by:tmireles
ID: 13434095
When I do the make menuconfig I do select the drivers that are needed.  For example I selected the ext3 support, the AIC79xx SCSI driver, removed the sound card all together, remove the apgpart which always gives an error when booting up.  So I do select the relevent files/drivers needed.

I will try the .config file and see what I can do.

0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13434232
do not remove which is already there - only add what you want - follow this as a thumb rule
you never know what you removed which will mess up again .
start from scratch please with make menuconfg.

surya.
0
 
LVL 4

Author Comment

by:tmireles
ID: 13434256
will do and keep you posted.

0
 
LVL 4

Author Comment

by:tmireles
ID: 13434576
well I recompiled with the default drivers loaded and with the ones I need in there to run.  I get the same error when booting into the one that says:

 kernel /vmlinuz-2.4.29 ro root=LABEL=/ rhgb

about not being able to mount the root blah blah blah

When I boot into the one that says

 kernel /vmlinuz-2.4.29 ro root=/dev/sda2

I get the other error about not being able to open an initial console.

I also get an apgpart error saying it cannot load it. This one is because I left it enabled in the kernel.

Not real sure which direction to go anymore.  Do you have any more ideas??????

0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13438228
Believe it is only the kernel compilation and picking right options makes the difference .
First time when I compiled kernel in my life it panicked for 15 days non stop. But every time It panicked I learned
something .

anyway why dont you try installing a precompiled rpm and see how it works
install this one and see....
http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/kernel-2.4.22-1.2115.nptl.i686.rpm

surya.
0
 
LVL 4

Author Comment

by:tmireles
ID: 13441422
I will try that I just have a couple of question.  Forgive my ignorance on this.

Should I re-ghost the drive to start with a clean install or just go ahead and try this?  Second is what are the commands to do the installation from an RPM as I have done this once before but have not in a while?

Thanks
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13441458
rpm -ivh filenam.rpm for rpm installation .

no need to re-ghost .

0
 
LVL 4

Author Comment

by:tmireles
ID: 13441599
ok I downloaded the file and tried running the command and this is what I get:

[root@localhost ~]# rpm -ivh kernel-2.4.22-1.2115.nptl.i686.rpm
warning: kernel-2.4.22-1.2115.nptl.i686.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
        kernel < 0:2.6 conflicts with udev-039-8.FC3.i386
[root@localhost ~]#
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13441653
try forcing it lets see what happens ....

rpm -ivh <filename> --force --nodeps
0
 
LVL 4

Author Comment

by:tmireles
ID: 13441811
Ok here is what I get:


[root@localhost ~]# rpm -ivh kernel-2.4.22-1.2115.nptl.i686.rpm --force --nodeps warning: kernel-2.4.22-1.2115.nptl.i686.rpm: V3 DSA signature: NOKEY, key ID 4f2 a6fd2
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
Version requires old depmod, but couldn't run depmod.old: No such file or direct ory
No dep file found for kernel 2.4.22-1.2115.nptl
mkinitrd failed
error: %post(kernel-2.4.22-1.2115.nptl.i686) scriptlet failed, exit status 1
[root@localhost ~]#
0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13442214
ok  do this and try again
# ln -s /usr/local/modutils/depmod /sbin/depmod.old

if it not happens then..
it is clear that  you have to get the kernel compiled or else I am not sure how is it possibel . One more thisg Fedora core 1 comes with 2.4 and you can also have 2.6 on that .
if you cant get  this kernel compiled you may have to try that .
0
 
LVL 4

Author Comment

by:tmireles
ID: 13443391
Surya,

I really appreciate all the help you have provided on this.  You have shown a lot of patience and knowledge.  I tied to do the last thing that you have suggested but got a different error.  Anyhow I have been fighting this for a week now with very little results.  I would love to keep trying because I know there has be to a way to do it however due to project schedule I will have to continue on and bite the bullet and install Fedora Core 1 running the 2.4 kernel.  

I wish I could give you more points since you have tried real hard to help me out.  

Thanks for all the hard work and good luck.

Regards

Tony Mireles

0
 
LVL 7

Expert Comment

by:surya_prabhakar
ID: 13443506
Beleive me It is possible . Only patience is required . This is what I have learned with my experrience . If you have time raise a point here we will continue .

Good luck.
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question