Page 1 of 1

Dead symlinks in modules

Posted: 2019/11/26 15:39:39
by ruliezz
Hi all,

After updating CentOS with yum update I got the follow errors with AIDE check:

Code: Select all

Dead symlink detected at /usr/lib/modules/3.10.0-1062.4.3.el7.x86_64/build
Dead symlink detected at /usr/lib/modules/3.10.0-1062.4.3.el7.x86_64/source
System info:
OS: CentOS Linux release 7.7.1908 (Core)
Kernel: 3.10.0-1062.4.3.el7.x86_64

I have tried to install kernel-devel but unfortunately did those not resolve my problem as describe above.

It's possible to configure AIDE so that it ignore dead links with: warn_dead_symlinks=no in /etc/aide.conf but I like to fix it the right way.

Any thoughts?

Thanks,

Re: Dead symlinks in modules

Posted: 2019/11/28 08:37:45
by ruliezz
Bump..

Re: Dead symlinks in modules

Posted: 2019/11/28 09:22:26
by MartinR

Code: Select all

# cd /usr/lib/modules/3.10.0-1062.4.1.el7.x86_64
# ls -l
...
... build -> /usr/src/kernels/3.10.0-1062.4.1.el7.x86_64
...
... source -> build
...
# cd  /usr/src/kernels/3.10.0-1062.4.1.el7.x86_64
# yum provides /usr/src/kernels/3.10.0-1062.4.1.el7.x86_64
...
kernel-devel-3.10.0-1062.4.1.el7.x86_64 : Development package for building kernel modules to match the kernel
...
So - the links should be valid. I suggest you check that they look like mine shown above, and then check that the /usr/src tree is there. If the former you can just correct the links, if the latter then try a reinstall of kernel-devel. If reinstalling keep a sharp eye on output and logs, if it doesn't sort it out there must be a deeper problem.

Re: Dead symlinks in modules

Posted: 2019/11/28 09:40:56
by ruliezz
Thanks for your help, I see this:

Code: Select all

ls -al /usr/src/kernels/3.10.0-1062.4.3.el7.x86_64

total 4884
drwxr-xr-x.  22 root root    4096 Nov 26 16:21 .
drwxr-xr-x.   3 root root      40 Nov 26 16:21 ..
drwxr-xr-x.  32 root root    4096 Nov 26 16:21 arch
drwxr-xr-x.   3 root root      78 Nov 26 16:21 block
-rw-r--r--.   1 root root  153186 Nov 14 01:03 .config
drwxr-xr-x.   4 root root      76 Nov 26 16:21 crypto
drwxr-xr-x. 119 root root    4096 Nov 26 16:21 drivers
drwxr-xr-x.   2 root root      22 Nov 26 16:21 firmware
drwxr-xr-x.  75 root root    4096 Nov 26 16:21 fs
drwxr-xr-x.  28 root root    4096 Nov 26 16:21 include
drwxr-xr-x.   2 root root      37 Nov 26 16:21 init
drwxr-xr-x.   2 root root      22 Nov 26 16:21 ipc
-rw-r--r--.   1 root root     505 Nov 14 01:03 Kconfig
drwxr-xr-x.  13 root root     247 Nov 26 16:21 kernel
drwxr-xr-x.  10 root root     219 Nov 26 16:21 lib
-rw-r--r--.   1 root root   51297 Nov 14 01:03 Makefile
-rw-r--r--.   1 root root    2305 Nov 14 01:03 Makefile.qlock
drwxr-xr-x.   2 root root      58 Nov 26 16:21 mm
-rw-r--r--.   1 root root 1140869 Nov 14 01:03 Module.symvers
drwxr-xr-x.  61 root root    4096 Nov 26 16:21 net
drwxr-xr-x.  15 root root     231 Nov 26 16:21 samples
drwxr-xr-x.  13 root root    4096 Nov 26 16:21 scripts
drwxr-xr-x.   9 root root     136 Nov 26 16:21 security
drwxr-xr-x.  24 root root    4096 Nov 26 16:21 sound
-rw-r--r--.   1 root root 3598707 Nov 14 01:03 System.map
drwxr-xr-x.  20 root root     254 Nov 26 16:21 tools
drwxr-xr-x.   2 root root      37 Nov 26 16:21 usr
drwxr-xr-x.   4 root root      44 Nov 26 16:21 virt
-rw-r--r--.   1 root root      41 Nov 14 01:03 vmlinux.id
Do you mean I can repair the symlinks so that it point to this directory?

Re: Dead symlinks in modules

Posted: 2019/11/28 09:55:30
by MartinR
Just before you do, can you post what the actual links are?

Code: Select all

# cd /usr/lib/modules/3.10.0-1062.4.1.el7.x86_64
# ls -l build source
I can't see any reason not to repair them, obviously backup first though!

Re: Dead symlinks in modules

Posted: 2019/11/28 10:40:40
by ruliezz
We can close this topic, I just heard that my colleague has removed them because its not important.