lsmod produce no output

I see a strange behavior from two of my linodes: lsmod and cat /proc/modules produce no output. Which is passing strange since both boot and run fine. A third machine running Oracle Linux 8 behaves normally in this regard

Both of the affected machines are running CentOS 7 and use the Linode provided kernel.

$ uname -a
Linux li02.heronforge.net 5.11.13-x86_64-linode143 #1 SMP Tue Apr 13 11:40:43 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:    7.9.2009
Codename:    Core

Anyone have a clue why this is happening? The machines are performing normally but this is just weird.

5 Replies

Does /proc/modules have the right ownership/permissions on the systems that are failing? Here's mine:

-r--r--r--  1 root  root  0 May  1 12:04 /proc/modules

This is Debian 10:

Linux dave 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

-- sw

It does not appear to be a permissions issue.
-r--r--r-- 1 root root 0 May 11 08:59 /proc/modules

I found a note posted on an SBC board (sorry, I lost the link) suggesting this behavior could be caused by system-modules-load.service not running at boot time.

You might reboot your Linode and watch the boot log (or look at it in one of the files in /var/log) to see if this is happening. If it's not, your installation is extremely sick and, frankly, I don't understand how it even operates.

The other thing to check is to make sure that lsmod(8) is not being shadowed somewhere in your PATH by or aliased to a script/program that does nothing as some kind of weird security-by-obfuscation measure. Here's the setup on my Debian 10 system:

stevewi@dave:/var/log$ whereis lsmod
lsmod: /usr/bin/lsmod /usr/sbin/lsmod /usr/share/man/man8/lsmod.8.gz
stevewi@dave:/var/log$ ll /usr/sbin/lsmod
lrwxrwxrwx 1 root root 9 Apr  2  2020 /usr/sbin/lsmod -> /bin/kmod
stevewi@dave:/var/log$ ll /usr/bin/lsmod
lrwxrwxrwx 1 root root 4 Apr  2  2020 /usr/bin/lsmod -> kmod

On Debian, kmod is an installable package. That may be true for you as well. Make sure kmod is installed.

Without access to your Linode, that's about the best I can do for you…

-- sw

Hello,

5.11.13-x86_64-linode143

You're running one of our provided kernels (as opposed to the distribution's kernel). While our kernels support modules, "out of the box" all the necessary modules are compiled in. You can see this via zcat /proc/config.gz for example - so you won't see any modules, well, because there are none :)

Hope that helps,
-Chris

OK. That makes sense. These are pretty vanilla web, mail and DNS servers so no need for anything "special".

Thank you.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct