Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Modules fail to load after @world update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Mon Aug 07, 2017 5:05 pm    Post subject: Modules fail to load after @world update Reply with quote

Hello,

After a big world update, my system boots but does no longer load modules. I re-compiled and re-installed the kernel and kernel_modules, but in vain,
'lsmod' reports nothing at all.

Trying 'modprobe' with nvidia or snd-hdsp modules results in 'invalid argument' e.g.
Code:
# modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': Invalid argument


I don't have a clue as to what to do or where to look for this. I cannot post dmesg either due to lack of net...

UPDATE: I will try to type the output or post pictures, if needed


Any help kindly appreciated!
M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 606

PostPosted: Tue Aug 08, 2017 2:08 am    Post subject: Reply with quote

Are you booting a kernel that has the nvidia module built?

Often strange errors like this are due to a mismatch of the kernel version and the module.

Maybe try this:
Code:
$ find /lib/modules/*/ -name nvidia.ko

Code:
$ uname -r


It would probably not hurt to rebuiild the nvidia driver:
Code:
# emerge nvidia-drivers
... and then retry the modprobe nvidia.

Sorry I'm not familiar with the other module, snd-hdsp.

HTH
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Tue Aug 08, 2017 4:40 am    Post subject: [Solved] Modules fail to load after @world update Reply with quote

Thanks for answering russK,

The nvidia.ko module is where it should be, I guess, in /lib/modules/linux-4.4.6-gentoo/video/.

I have gone to the trouble to compile the kernel and modules twice, as well as changing kernel to a newee version and repeating the whole process. The outcome remains the same, no module can be loaded even with the new kernel.

Snd-hdsp is a module for the RME Hammerfall sound card family.

Anyway, I took the decision yesterday to change distro on my main machine.
Sorry and thank for your help!

M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12960

PostPosted: Wed Aug 09, 2017 2:22 am    Post subject: Reply with quote

I doubt you have the records to answer this, but I will ask anyway: anything interesting in dmesg?
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Wed Aug 09, 2017 3:50 pm    Post subject: Reply with quote

@Hu,
As a matter of fact, I could retrieve it just now after reading your reply and through yesterday's new linux installation on the system, here it is:
https://pastebin.com/3QtpsZQx

Also, I remembered earlier today that while updating these 340+ atoms, ome or two of them were failing to emerge, my eye catching something mentioning missing /usr/include files. Never had the chance th investigate further.

Thanks!
M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 606

PostPosted: Thu Aug 10, 2017 12:48 am    Post subject: Reply with quote

muadib25,

I suspect the kernel that was booting was not the one you think it was. Did you make sure it was copied to /boot and grub menu was updated?

I say this because you said the module was in /lib/modules/linux-4.4.6-gentoo/video/, but the first line of dmesg says version 4.4.6-gentoo (without "linux-").

Did you check the 'uname -r'?

Maybe that was the problem.

Regards
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12960

PostPosted: Thu Aug 10, 2017 1:30 am    Post subject: Reply with quote

Was that dmesg taken from a boot where the module failed to load? I see no sign of module attempts in it.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1660

PostPosted: Thu Aug 10, 2017 2:51 am    Post subject: Reply with quote

From what I noticed, that dmesg cuts off immediately after the drives are mounted. So of course it didn't try loading any modules from a unmounted drive... Otherwise I'd agree with russK, in that you may not be booting into the correct kernel. That is a very common mistake that people do, by forgetting to mount the boot partition before copying the kernel over...
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Thu Aug 10, 2017 4:04 pm    Post subject: Reply with quote

russK wrote:

I say this because you said the module was in /lib/modules/linux-4.4.6-gentoo/video/, but the first line of dmesg says version 4.4.6-gentoo (without "linux-").

Did you check the 'uname -r'?

Maybe that was the problem.

Regards


You 're right about the typo, it was only a typo since I was typing from memory. The dir is, correctly said, '/lib/modules/4.4.6-gentoo/video/.

Hu wrote:

Was that dmesg taken from a boot where the module failed to load? I see no sign of module attempts in it.


I have noticed it, too.
I managed just now to reboot to Gentoo and output a new dmesg to a file, as well as /var/log/messages, although I don't know if it is of any use.

dmesg: https://pastebin.com/zRHCffU1
messages: https://pastebin.com/Ty7DqUu2


Here is also the /etc/conf.d/modules file:

Code:

# Linux users can define a list of modules for a specific kernel version,
# a released kernel version, a main kernel version or all kernel versions.
# The most specific versioned variable will take precedence.
# FreeBSD users can only use the modules="foo bar" setting.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
#modules_2_6_23="tun ieee1394"
#modules_2_6="tun"
#modules_2="ipv6"
#modules="ohci1394"

# Linux users can give modules a different name when they load - the new name
# will also be used to pick arguments below.
# This is not supported on FreeBSD.
#modules="dummy:dummy1"

# Linux users can give the modules some arguments if needed, per version
# if necessary.
# Again, the most specific versioned variable will take precedence.
# This is not supported on FreeBSD.
#module_ieee1394_args="debug"
#module_ieee1394_args_2_6_23_gentoo_r5="debug2"
#module_ieee1394_args_2_6_23="debug3"
#module_ieee1394_args_2_6="debug4"
#module_ieee1394_args_2="debug5"

# You should consult your kernel documentation and configuration
# for a list of modules and their options.


Correct me if I'm wrong, but shouldn't there be uncommented lines with module names here?

Regards,
M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1660

PostPosted: Thu Aug 10, 2017 9:32 pm    Post subject: Reply with quote

From the outputs that you post, from the messages, I see this error:
Quote:
Aug 10 17:32:49 moria /etc/init.d/vsftpd[2950]: ERROR: cannot start vsftpd as net.eth0 would not start

This can easily just be an issue of it is looking for eth0, when your network card is really called something else (the joy of presistant naming, to give it a name that no one can read, that still changes anyways). What you would want to do, is look at the output of ifconfig -a and see what your ethernet card is actually called (the -a is important as it says to show all devices, even if they are not active/has no IP address).

As far as the dmesg output, it still doesn't really say much, as still ends right after the root drive is remounted to rw at 8.8 secs. Only difference this time, is there is a since useless message 5 seconds later at 14 seconds. This is no where near it would end/say if it can't find some firmware, as failing to find the firmware often quits at 20-40 secs or later.

Otherwise it does have these 2 entries,
Quote:
[ 9.143589] EXT4-fs (sdb1): couldn't mount as ext3 due to feature incompatibilities
[ 9.144685] EXT4-fs (sdb2): VFS: Can't find ext4 filesystem

This may or may not be anything, as I've noticed similar issues when the kernel mounts an ext4 drive. Though the sdb2 drive, you may want to double check what filesystem it should be. As the seems that it's trying to mount it as ext4, when it should be something else, maybe swap partition?

Going over, the 2 files again, I noticed something else; the first being from dmesg, and the second messages (beginning from both outputs)...
Quote:
[ 0.000000] Linux version 4.4.6-gentoo (root@moria) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) ) #2 SMP PREEMPT Mon Aug 7 17:39:29 CEST 2017

Quote:
Aug 10 17:32:49 moria syslog-ng[2915]: syslog-ng starting up; version='3.7.3'

The key parts is the time. Dmesg says the system time is Aug 7, but the messages is Aug 10. So the stuff between the 2 indicates they are from 2 different boot ups.

As far as modules are loaded, they generally are loaded when they are needed. So in general, the drives get loaded very early, after the drives are remounted to rw, the framebuffer gets loaded and init starts. From there, the sound and ethernet modules gets mounted, then after that ends up being video for xorg...
Most times, you don't need to specify some module get loaded, as the kernel will load then as needed. When you list them, you are telling the kernel loaded them right away ahead of time. This is more of an importance with VM drivers. So these typically are not seen to be needed till after the X11 is started, but it often needed so you can start a VM.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7732
Location: ~Brussels - Belgique

PostPosted: Thu Aug 10, 2017 9:41 pm    Post subject: Reply with quote

did you run
Code:
emerge @modules-rebuild
after the new kernel update (and compile)?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 606

PostPosted: Thu Aug 10, 2017 9:46 pm    Post subject: Reply with quote

This is a great analysis but one thing,

ct85711 wrote:
[snip]
Going over, the 2 files again, I noticed something else; the first being from dmesg, and the second messages (beginning from both outputs)...
Quote:
[ 0.000000] Linux version 4.4.6-gentoo (root@moria) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) ) #2 SMP PREEMPT Mon Aug 7 17:39:29 CEST 2017

Quote:
Aug 10 17:32:49 moria syslog-ng[2915]: syslog-ng starting up; version='3.7.3'

The key parts is the time. Dmesg says the system time is Aug 7, but the messages is Aug 10. So the stuff between the 2 indicates they are from 2 different boot ups.


Typically the date and time in the first line where the kernel announces it's name, rev, etc and date/time .... I believe the date and time on that first line are from when the kernel was built.

Not sure how that might effect any of the conclusions drawn.
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Fri Aug 11, 2017 5:30 pm    Post subject: Reply with quote

Great analysis indeed! :o

@ct85711, the net.eth0 is the script that starts the network. the network card is an on-board Realtek-something that gets activated by a specific module, r8169.ko.

Regarding the /dev/sdb1 & /dev/sdb2, it complains because I changed the new hard disk with the old one(Gentoo). It's just a matter of correcting the /etc/fstab on this.

Regarding dates, Aug 7 was the last time I booted the system before booting again on Aug 10th. I deleted the Aug 7 entries in /var/log/messages before pasting it on pastebin, but I forgot to do it in dmesg. Sorry for this!


I see... So, /etc/conf.d/modules looks normal. As I understand it, it is 'make modules_install' that gets to tell the kernel which modules to get loaded, or something like that...
So, should /boot partition be mounted BEFORE one gives 'make modules_install' and 'make install'?

@xaviermiller, I guess so, I can't be certain. When I did this process, I followed the steps from the 'https://wiki.gentoo.org/wiki/Kernel/Upgrade' and 'https://wiki.gentoo.org/wiki/Kernel/Configuration#Build'

@russK No mystery there about the times/dates, it was the two last dates I booted Gentoo. :)


Should I try rebuilding the modules with making sure /boot is mounted?

Thanks,
M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41562
Location: 56N 3W

PostPosted: Fri Aug 11, 2017 6:07 pm    Post subject: Reply with quote

muadib25,

The kernel loads modules from /lib/modules/`uname -r'/
As its on the root filesystem, make modules_install is fine at any time.

The kernel binary is normally loaded from /boot, which is normally not mounted, so its important that you remember to mount boot before the kernel is copied there.
The directory /boot (without boot mounted) is a normal directory, so installing the kernel there is not an error.
The boot loader won't find it though.

Check your
Code:
uname -a
after every kernel update.
The date/time shown is the build time of the running kernel. Does it look light?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1660

PostPosted: Fri Aug 11, 2017 7:24 pm    Post subject: Reply with quote

Quote:
@ct85711, the net.eth0 is the script that starts the network. the network card is an on-board Realtek-something that gets activated by a specific module, r8169.ko.


Yes, I agree net.eth0 starts the network and gets an ip address. The potential issue, is specifically the eth0. When presistant naming came out, it was the idea to make the device name so that network cards get the same name even if you add/remove additional network cards. So what this means is that, it takes the old naming from the kernel (eth0) and scrambles the name to something like enp1s0f1.

So this means if you don't have internet connection, I'd first check and make sure to see what your network card is called; as eth0 is not enp1s0f1...
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Fri Aug 11, 2017 9:03 pm    Post subject: Reply with quote

NeddySeagoon wrote:
muadib25,

The kernel binary is normally loaded from /boot, which is normally not mounted, so its important that you remember to mount boot before the kernel is copied there.
The directory /boot (without boot mounted) is a normal directory, so installing the kernel there is not an error.
The boot loader won't find it though.

Check your
Code:
uname -a
after every kernel update.
The date/time shown is the build time of the running kernel. Does it look light?


Ok, I am aware of that and I have checked after mounting /boot that all kernel images are in place. The problem is that my modules stopped loading from the first reboot after a @world update, I hadn't rebuilt the kernel then.
And even after both rebuilding it and building a newer kernel version, no module ever autoloaded.


Checking uname -a and ifconfig -a, brb...

UPDATE:
Ok, ifconfig -a first:
Code:
dummy0: flags=130<BROADCAST,NOARP>  mtu 1500
        ether c2:3f:f3:9d:93:94  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2  bytes 100 (100.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 100 (100.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Here is uname -a:
Code:
Linux moria 4.4.6-gentoo #2 SMP PREEMPT Mon Aug 7 17:39:29 CEST 2017 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux


And here is /boot partition contents:
Code:
total 58010
lrwxrwxrwx 1 root root       1 Apr 23  2011 boot -> .
-rw-r--r-- 1 root root   82792 May 30  2015 config-3.18.11-gentoo
-rw-r--r-- 1 root root   82792 Jun 12  2015 config-3.18.12-gentoo
-rw-r--r-- 1 root root   89089 Aug 11 23:18 config-4.4.6-gentoo
-rw-r--r-- 1 root root   89089 Aug  7 20:16 config-4.4.6-gentoo.old
-rw-r--r-- 1 root root   93329 Aug 11 23:13 config-4.9.34-gentoo
-rw-r--r-- 1 root root   93329 Aug  7 20:05 config-4.9.34-gentoo.old
drwxr-xr-x 2 root root    1024 Sep 30  2012 grub
-rw-r--r-- 1 root root 4792752 May 18  2012 kernel-3.2.17-rt28
-rw-r--r-- 1 root root 4819856 May 20  2012 kernel-3.2.1-gentoo-r2-20120518
-rw-r--r-- 1 root root 3518448 Jun 17  2012 kernel-3.4.2-seed
-rw-r--r-- 1 root root 3628736 Dec 22  2012 kernel-3.4.2-seed2
drwx------ 2 root root   12288 Apr 22  2011 lost+found
-rw-r--r-- 1 root root 2079382 May 30  2015 System.map-3.18.11-gentoo
-rw-r--r-- 1 root root 2077823 Jun 12  2015 System.map-3.18.12-gentoo
-rw-r--r-- 1 root root 2333937 Aug 11 23:18 System.map-4.4.6-gentoo
-rw-r--r-- 1 root root 2333937 Aug  7 20:16 System.map-4.4.6-gentoo.old
-rw-r--r-- 1 root root 2450915 Aug 11 23:13 System.map-4.9.34-gentoo
-rw-r--r-- 1 root root 2450915 Aug  7 20:05 System.map-4.9.34-gentoo.old
-rw-r--r-- 1 root root 4394992 May 30  2015 vmlinuz-3.18.11-gentoo
-rw-r--r-- 1 root root 4312144 Jun 12  2015 vmlinuz-3.18.12-gentoo
-rw-r--r-- 1 root root 4740960 Aug 11 23:18 vmlinuz-4.4.6-gentoo
-rw-r--r-- 1 root root 4740960 Aug  7 20:16 vmlinuz-4.4.6-gentoo.old
-rw-r--r-- 1 root root 4957168 Aug 11 23:13 vmlinuz-4.9.34-gentoo
-rw-r--r-- 1 root root 4957168 Aug  7 20:05 vmlinuz-4.9.34-gentoo.old


As you can see, I ran 'make install' again just now, just to make sure /boot partition was mounted and correctly got the images from 'make install', hence the Aug 11 date by the 4.4.6-gentoo files.
I then rebooted into both 4.4.6 followed by 4.9.34 with the same result, no module loading...

Regards,
M.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1660

PostPosted: Sat Aug 12, 2017 6:16 pm    Post subject: Reply with quote

Can you please pastebin your kernel's .config, I want to see if anything in there will tell us more on why it isn't loading any modules. As the kernel should be able to find and load modules, unless it is looking someplace else or something (possibly module support maybe is disabled or so).
Back to top
View user's profile Send private message
muadib25
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2010
Posts: 144
Location: Sweden

PostPosted: Sun Aug 13, 2017 5:41 pm    Post subject: Reply with quote

Sure, here:

https://pastebin.com/Tqestihj

This .config is the same I used on June 2016 when I first compiled 4.4.6.
_________________
“What we do for ourselves dies with us. What we do for others and the world remains and is immortal.” -Albert Pine
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum