Link to home
Start Free TrialLog in
Avatar of Zarko Acimovic
Zarko AcimovicFlag for Serbia

asked on

Could not load /lib/modules/2.6.32-573.18.1.el6.x86_64/modules.dep

I have Rad Hat Linux 6.6. I was configuring default gateway several times (which is probably not relevant to the issue).

After few reboots, I got error "FATAL: Could not load /lib/modules/2.6.32-573.18.1.el6.x86_64/modules.dep: No such file or directory" . RHEL won't load.
How can I fix this with boot disk http://rhnproxy1.uvm.edu/pub/redhat/rhel6-x86_64/isos/rhel-server-6.6-x86_64-boot.iso?

I am able to enter rescue shell, but not sure what to do next. I did try depmode -m and /sbin/depmode -m but command didn't return any results. The RHEL is on VMWare.

I was able to list the contents of /lib/modules/2.6.32-573.18.1.el6.x86_64/  directory by using rescue shell and modules.dep file is there
Avatar of Scott Silva
Scott Silva
Flag of United States of America image

can you boot from a previous kernel? Many times the bootloader leaves more than one kernel accessible...
Either during bootup choose an earlier kernel as suggested. During the bootup splash screen you should have a list of available kernels that can be used to boot. Using the keyboard errors or the mouse select an earlier version 2.6.32-3xx ....
Once booted, you may have to prebuild the module needed by your system for the new kernel.

Look at using DKMS on your system which after being configured will build the kernel at bootup if missing.
Try to boot to choose the version of the Linux, for which you have the modules / the lib / the modules .
Avatar of Zarko Acimovic

ASKER

Hi all,

Thank you for your comments.

I reached file system through rescue disk and I noticed that I have folder
/lib/modules/2.6.32-504.el6.x86_64

instead of

/lib/modules/2.6.32-573.18.1.el6.x86_64.



/lib/modules/2.6.32-573.18.1.el6.x86_64 fails to be loaded. I will try to rename folder.
If I search the disk through rescue shell I notice that  2.6.32-573.18.1.el6.x86_64  is on /mnt/sysimage/lib/modules. So there is folder

 /mnt/sysimage/lib/modules/2.6.32-573.18.1.el6.x86_64

and there is folder /lib/modules/2.6.32-504.el6.x86_64.

Why cant boot loader find 2.6.32-573.18.1.el6.x86_64. I even tried to copy 2.6.32-573.18.1.el6.x86_64 into /lib/modules/ but it got deleted on reboot
The rescue image has its own linux file system and mounts the rescued system under /mnt/sysimage... That is why you seem to be confused. Your rescued filesystem is all mounted relative to /mnt/sysimage.

Here is the basic RedHat rescue docs... Most systems work similarly..

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ap-rescuemode.html
Boot the system to the earlier version and rebuild the modules using the new kernel source/paths.
Or even easier, boot to the older image and yum reinstall (newer_kernel_packagename)

Installing a new kernel should trigger scripting that will do all that... Check to make sure /boot isn't too full as that might be why it failed before...
ASKER CERTIFIED SOLUTION
Avatar of Zarko Acimovic
Zarko Acimovic
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Andrew, if not mistaken a solution by the author for their own question usually did not receive points.