nothing in /lib/modules

General support questions including new installations
starbug
Posts: 2
Joined: 2008/08/10 09:14:28

nothing in /lib/modules

Post by starbug » 2008/08/10 12:57:34

Hi,

I'm a newbie when it comes to modules, so I don't really know the extent of my problem or where to look next.

Basically, one of my CentOS servers has no files or folders in /lib/modules

I look after a number of CentOS servers, my development system runs in VMWare on my PC at home and I downloaded a pre-built CentOS image.

My test system runs under a different virtual machine solution and is hosted on the internet.

My live system runs on real server hardware and is also hosted on the internet.

When I try new things, I always start with my development system, then move to test, before finally implementing on live.

What I am trying to do is use iptables with mangle and tc to achieve traffic shaping and prioritisation.

I was able to set this up on my development system and am having problems with my test system.

I soon found a useful command that started my suspicion that I had a problem with modules.

When I ran "depmod -a" on my test system, I get the following error:

[code]
WARNING: Couldn't open directory /lib/modules/2.6.18-53.1.13.el5.028stab053.10: No such file or directory
FATAL: Could not open /lib/modules/2.6.18-53.1.13.el5.028stab053.10/modules.dep.temp for writing: No such file or directory
[/code]

I do not get the same error on my development system.

So I had a look in my /lib/modules directory on both systems and it's completely empty on my test system.

When I look in that directory on my development system, it has the following directories in it:

[code]
2.6.18-53.1.14.el5
2.6.18-8.el5
2.6.18-92.1.6.el5
[/code]

I don't know how different the two kernels were built and I don't know where to look to find out.

Please could someone advise me what to look at or what to do to help me with this.

Thanks in advance.

Richard.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: nothing in /lib/modules

Post by toracat » 2008/08/10 13:13:26

[quote]
starbug wrote:

WARNING: Couldn't open directory /lib/modules/2.6.18-53.1.13.el5.028stab053.10: No such file or directory
FATAL: Could not open /lib/modules/2.6.18-53.1.13.el5.028stab053.10/modules.dep.temp for writing: No such file or directory
[/quote]
You have to talk to your hoster. 2.6.18-53.1.13.el5.028stab053.10 is [b]not[/b] a CentOS kernel. They heavily modify the OS, so any advice here would actually break your system.

starbug
Posts: 2
Joined: 2008/08/10 09:14:28

Re: nothing in /lib/modules

Post by starbug » 2008/08/10 13:49:40

Hi toracat,

Thanks for getting back to me so quickly, I have submitted a ticket to my host provider for their advice.

The provider is www.a2b2.com AKA www.vaserv.com

Thanks again :)

Richard.

NedSlider
Forum Moderator
Posts: 2897
Joined: 2005/10/28 13:11:50
Location: UK

Re: nothing in /lib/modules

Post by NedSlider » 2008/08/10 14:27:00

[quote]
starbug wrote:

I look after a number of CentOS servers, my development system runs in VMWare on my PC at home and I downloaded a pre-built CentOS image.

My test system runs under a different virtual machine solution and is hosted on the internet.

My live system runs on real server hardware and is also hosted on the internet.

When I try new things, I always start with my development system, then move to test, before finally implementing on live.

[/quote]

That's very commendable, but in this case fatally flawed as you have 3 different systems. Ideally all 3 systems need to be as close to each other as possible - ie 3 identical systems all provided by the same host.

As toracat pointed out, hosts have a nasty habit of heavily modifying the distro, but still calling it CentOS when in reality it's not any more... it's now custom_mutated_once_was_CentOS. BTW, this issue doesn't only affect CentOS - I'm sure they do it to other distros too.

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: nothing in /lib/modules

Post by cmodyssey » 2008/09/09 20:50:48

Hi toracat,

I am having a similar problem with 2.6.24.2-xxxx-std-ipv4-32, is that a CentOS kernel?

Thanks in advance.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: nothing in /lib/modules

Post by toracat » 2008/09/09 23:05:59

[quote]
cmodyssey wrote:
Hi toracat,

I am having a similar problem with 2.6.24.2-xxxx-std-ipv4-32, is that a CentOS kernel?
[/quote]
That is [b]not[/b] a CentOS kernel. If your provider says it is CentOS, it may be a modified version of CentOS.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: nothing in /lib/modules

Post by gerald_clark » 2008/09/10 13:51:25

2.6.18-53.1.13.el5.028stab053.10 is an OpenVZ kernel.
OpenVZ virtual servers are not allowed to load modules.

I suspect the same is true for your other virtual servers.

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: nothing in /lib/modules

Post by cmodyssey » 2008/09/15 18:10:49

Hi,

I have just got a reply from the host provider where my 2.6.24.2-xxxx-std-ipv4-32 is running and they say that their kernel does not support the module system.

They say that if I want to use modules, I would have to recompile the kernel myself.

So, on to the reason why I think I need modules...

I am setting up QoS and when I try and run the command below:

[code]tc qdisc add dev eth0 root handle 1:0 htb default 105 r2q 1[/code]

I get the following:

[code]RTNETLINK answers: No such file or directory[/code]

I have successfully used this on two other CentOS systems, but not this one (admittadly they are all different kernels with different hosts). Anyway, I know the syntax is alright, as it works on other CentOS systems.

When I did some googling for the error, a few suggestions I came across were to look into the modules, so that's why I've been asking about modules. Now I have an answer from this host provider saying their kernel does not support modules.

Does anyone know if it is possible to make the above command work without using modules?

If there is not a way, then I face the prospect of recompiling the kernel myself and I have never done anything like that before and I'd prefer not to do it if I can get away with it.

Any advice or suggestions on this would be greatly appreciated.

Thanks in advance.

Richard.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: nothing in /lib/modules

Post by gerald_clark » 2008/09/15 18:13:45

These are not CentOS systems. We cannot help you with your kernel/module problems.

cmodyssey
Posts: 13
Joined: 2008/09/02 20:14:19

Re: nothing in /lib/modules

Post by cmodyssey » 2008/09/15 18:24:52

Hi Gerald,

Thanks for your reply.

Could you let me know where there is a list of CentOS kernel versions, as I want to go back to my host provider and ask them to explain why they have not provided me with a CentOS system, as that's what I selected for them to provide me.

Thank you.

Richard.

Post Reply