LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   RH9 looking for wrong modules? (https://www.linuxquestions.org/questions/red-hat-31/rh9-looking-for-wrong-modules-122731/)

Recirqie 12-04-2003 02:41 PM

RH9 looking for wrong modules?
 
When starting up I get (among others)
ifup: Can't open dependencies file /lib/modules/2.4.21-99-default/modules.dep

(I'm running RH9 without any updates, modules 2.4.20-8)

Where is the info telling it to look for these modules?

andredude 12-05-2003 06:24 AM

I had the same thing yesterday after managing to mess up my kernel, it was trying to load modules for the previous installation of the kernel. This can be pretty nasty to fix, I had to recompile my kernel. The info telling it to look for these modules is located in your boot partition, in files that should be called System.map, initrd-2.4.20-8.img and vmlinuz-2.4.20-8.

The first thing you might want to do is check your boot partition to see if these files are there, the /boot directory is not necessarily where you are booting from, I had to mount mine by doing a 'mount /dev/hda1 /mnt/hda1'. Then look in the same folder in ./grub/grub.conf to see if it's actually loading the right files. The first entry in this file is the kernel that will boot by default (lilo works similiar but rh9 uses grub by default so I suppose that's what you are using). If there are no obvious problems, do a kernel recompile (see http://www.computing.net/howto/advan...ubup/grub.html for a step by step guide)

Another possibility is that it's just looking in the wrong dir for the modules, go to /lib/modules and see what subdirs there are. If you've never updated your redhat there should be only one, so create a simlink to try and fool it into using the modules that are there:

ln -s /lib/modules/2.4.20-8 /lib/modules/2.4.21-99-default

where the first argument is the directory that actually exists, so it will try to find /lib/modules/2.4.21-99-default/modules.dep in /lib/modules/2.4.20-8/modules.dep. I had to do this to get my @#%@ loopback modules to work while I recompiled.

nxny 12-08-2003 06:47 PM

Run /sbin/depmod -ae as root. Go to the modules dir for your running kernel to make sure that the modules.dep file was actually updated.
ls -l /lib/modules/$(uname -r)

Recirqie 03-13-2004 01:56 PM

Sorry for the late reply, but trying to sort it out has had to be done in the small hours now and then. Something had certainly gone wrong in the installation, so I finally reinstalled it. Problem gone away, but no clue to the original cause.


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