systemd[1]: Failed to start Load Kernel Modules.

Bug #1574163 reported by Pinkesh
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I recently upgraded to ubuntu 16.04 and since then my startup time has almost doubled.
Also, i can see the following failure in the loading of a service.

Description: Ubuntu 16.04 LTS
Release: 16.04

Here is the log,

$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-04-24 09:50:31 IST; 43min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 721 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 721 (code=exited, status=1/FAILURE)

Apr 24 09:50:31 jaguar systemd[1]: Starting Load Kernel Modules...
Apr 24 09:50:31 jaguar systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 09:50:31 jaguar systemd[1]: Failed to start Load Kernel Modules.
Apr 24 09:50:31 jaguar systemd[1]: systemd-modules-load.service: Unit entered failed state.
Apr 24 09:50:31 jaguar systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.

I don't know why this is happening. Also my /usr/lib/modules-load.d/
 directory is empty. If you need more logs/details regarding the bug then i would surely help.

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1574163/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → systemd (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

This is unrelated to the startup time. As you see in the timestamps in your description, systemd-modules-load takes much less than a second. Presumably one of the modules in /etc/modules or /etc/modules-load.d/ does not exist any more. Can you please run

   sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-modules-load

and copy&paste the output here?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Harry (harryramsey3) wrote :

I guess I'll bite, considering I have the same problem:

systemctl status systemd-modules-load.service -l

● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-04-26 10:23:21 EDT; 11min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 660 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 660 (code=exited, status=1/FAILURE)

Apr 26 10:23:21 harry systemd[1]: Starting Load Kernel Modules...
Apr 26 10:23:21 harry systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Apr 26 10:23:21 harry systemd[1]: Failed to start Load Kernel Modules.
Apr 26 10:23:21 harry systemd[1]: systemd-modules-load.service: Unit entered failed state.
Apr 26 10:23:21 harry systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.

My /usr/lib/modules-load.d/ directory is also empty.

sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-modules-load gives:

apply: /etc/modules-load.d/cups-filters.conf
load: lp
Module 'lp' is already loaded
load: ppdev
Module 'ppdev' is already loaded
load: parport_pc
Module 'parport_pc' is already loaded
apply: /etc/modules-load.d/modules.conf
load: nouveau
could not find module by name='off'
Failed to insert 'off': No such file or directory
could not find module by name='off'
Failed to insert 'off': No such file or directory

Revision history for this message
Martin Pitt (pitti) wrote :

@Harry: So apparently your /etc/modules contains a line "off" which is not a valid module name. Just remove that and it should stop failing?

Revision history for this message
Harry (harryramsey3) wrote :

I looked at the /etc/modules-load.d/modules.conf file and there was no "off" line. There was only one line: "nouveau". I commented out the "nouveau" line, restarted my computer, and the kernel failure message did not appear.

$ systemctl status systemd-modules-load.service now gives:

Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
   Active: active (exited) since Tue 2016-04-26 16:02:26 EDT; 23min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 264 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)
 Main PID: 264 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)
   CGroup: /system.slice/systemd-modules-load.service

Apr 26 16:02:26 harry systemd-modules-load[264]: Inserted module 'lp'
Apr 26 16:02:26 harry systemd-modules-load[264]: Inserted module 'ppdev'
Apr 26 16:02:26 harry systemd-modules-load[264]: Inserted module 'parport_pc'
Apr 26 16:02:26 harry systemd[1]: Started Load Kernel Modules.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Problem solved?

Revision history for this message
Pinkesh (pinkbadpink) wrote :

@Martin Sorry for the delayed response.

Here is the output on running the stated command.

$ sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-modules-load
apply: /etc/modules-load.d/cups-filters.conf
load: lp
Module 'lp' is already loaded
load: ppdev
Module 'ppdev' is already loaded
load: parport_pc
Module 'parport_pc' is already loaded
apply: /etc/modules-load.d/modules.conf
load: lp
Module 'lp' is already loaded
load: videodev
Module 'videodev' is already loaded
load: v4l2loopback-dc width=320 height=240
Failed to find module 'v4l2loopback-dc width=320 height=240'
load: v4l2loopback_dc
Failed to find module 'v4l2loopback_dc'

Revision history for this message
Pinkesh (pinkbadpink) wrote :

Also, these are the output of some additional command,

$ modprobe v4l2loopback_dc
modprobe: FATAL: Module v4l2loopback_dc not found in directory /lib/modules/4.4.0-21-generic

$ modprobe v4l2loopback-dc
modprobe: FATAL: Module v4l2loopback-dc not found in directory /lib/modules/4.4.0-21-generic

Revision history for this message
Martin Pitt (pitti) wrote :

Right, so please remove the nonexisting v4l2loopback_dc from /etc/modules.

Changed in systemd (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
ppanon (ppanon) wrote :

Well, I was running 14.02 and tried the upgrade to 16.04, which failed miserably. After spending a fair it of time trying to put humpty dumpty together again, I finaly re-installed 16.04 from CD (server because I have an LVM disk setup which the desktop CD couldn't figure out), and then did an apt-get install unity-desktop to get the desktop GUI. I now have a number of outstanding issues:
ppanon@whiteygu:~$ sudo SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-modules-load
apply: /etc/modules-load.d/cups-filters.conf
load: lp
could not open moddep file '/lib/modules/4.4.0-22-generic/modules.dep.bin'
Failed to lookup alias 'lp': Function not implemented
load: ppdev
could not open moddep file '/lib/modules/4.4.0-22-generic/modules.dep.bin'
Failed to lookup alias 'ppdev': Function not implemented
load: parport_pc
could not open moddep file '/lib/modules/4.4.0-22-generic/modules.dep.bin'
Failed to lookup alias 'parport_pc': Function not implemented
apply: /etc/modules-load.d/modules.conf
apply: /lib/modules-load.d/open-iscsi.conf
load: iscsi_tcp
could not open moddep file '/lib/modules/4.4.0-22-generic/modules.dep.bin'
Failed to lookup alias 'iscsi_tcp': Function not implemented
load: ib_iser
could not open moddep file '/lib/modules/4.4.0-22-generic/modules.dep.bin'
Failed to lookup alias 'ib_iser': Function not implemented

There actually aren't any modules or files at all in /lib/modules/4.4.0-22-generic/
There is just a 'build' symbolic link to /usr/src/linux-headers-4.4.0-22-generic. That also means that, in addition to the above, I don't have any sound driver modules, including missing the snd-hda-intel for the onboard Azalia sound hardware that was being used under 14.04. I'm guessing that means either I'm missing installing some packages, that they should have been part of the linux-image package but got dropped from the package list at some point, or that the wrong directory is being searched. I can see missing the odd driver, but all of them missing seems a stretch.

I'm also have problems with the encrypted swap, being prompted to
Please enter passphrase for disk RaidVol1-LogSwap (cryptswap1) on none!
multiple times during boot and during apt-get upgrade. I see some cryptswap related issues date back to 15.04, according to some posts. When I try to re-initialize the swap and rebuild the boot ramdisk, I get

ppanon@whiteygu:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.4.0-21-generic
WARNING: missing /lib/modules/4.4.0-21-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-21-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_AMz3PJ/lib/modules/4.4.0-21-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_AMz3PJ/lib/modules/4.4.0-21-generic/modules.builtin: No such file or directory

So those problems also appear related to missing kernel modules.

Revision history for this message
ppanon (ppanon) wrote :

It appears that my rebuilt system may have been missing the linux-image and version specific associated packages. How the system actually managed to boot is a bit of a mystery.

Revision history for this message
Drone4four (drone4four) wrote :
Download full text (4.1 KiB)

I'm here to report a similar issue. But what distinguishes my case from all of you is that I formatted 16.04 straight from live media. I never upgraded from 14.04.

I'm getting this:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  linux-image-4.4.0-22-generic linux-image-extra-4.4.0-22-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 217 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 406405 files and directories currently installed.)
Removing linux-image-extra-4.4.0-22-generic (4.4.0-22.40) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-22-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
Error! Your kernel headers for kernel 4.4.0-22-generic cannot be found.
Please install the linux-headers-4.4.0-22-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-22-generic cannot be found.
Please install the linux-headers-4.4.0-22-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-22-generic cannot be found.
Please install the linux-headers-4.4.0-22-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
WARNING: missing /lib/modules/4.4.0-22-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-22-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_P309qI/lib/modules/4.4.0-22-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_P309qI/lib/modules/4.4.0-22-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
/usr/sbin/grub-mkconfig: 26: /etc/default/grub: Syntax error: newline unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
dpkg: error processing package linux-image-extra-4.4.0-22-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-22-generic (4.4.0-22.40) ...
Examining /etc/kernel/postrm.d .
run-parts: executi...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.