Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#45754 - [systemd] Message "Failed to insert module ..." on boot using systemd hook

Attached to Project: Arch Linux
Opened by Alain Kalker (ackalker) - Thursday, 23 July 2015, 17:56 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 16 August 2015, 22:53 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas B├Ąchler (brain0)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No



During boot, a message briefly shows on the console:

systemd[1]: Failed to insert module 'ip_tables': Function not implemented

From my investigation[1] I found
I found that systemd treats certain modules in a special way (and may try to load them) during early boot, see the function kmod_setup() in src/core/kmod-setup.c
In this case, the message appears to be due to the ip_tables module missing from generated initramfs-linux.img. Adding an "add_module ip_tables" to the systemd hook makes the message go away.

Some other problems we found (may need to be fixed upstream):

- The message isn't logged in the journal, which hints at a possible "blind spot" where messages could disappear from record between kernel boot and systemd startup.
- systemd appears to depend on modules outside the normal /etc/modules-load.d mechanism, which makes it harder to autodetect needed modules needed in initramfs. (Better keep an eye on struct kmod_table[] in src/core/kmod-setup.c which may become relevant again when kdbus support becomes mainstream, etc.)


Additional info:
* package version(s)
* config and/or log files etc.

Steps to reproduce:
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 16 August 2015, 22:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  kmod 21-2
Comment by Alain Kalker (ackalker) - Thursday, 23 July 2015, 17:59 GMT
Also, the message itself is misleading: "Function not implemented" gives no clue that the problem is actually a missing module. "No such file or directory" would be much better.
Comment by Peter Weber (hoschi) - Friday, 24 July 2015, 12:32 GMT
We should also report this to upstream, the list of required dependencies inside the kernel is not complete with systemd-222[1], it's missing all the nf*tables ip*tables stuff.

Question at the developers of Archlinux:
What is the state of the systemd init hook? I switched to default of base and udev for the official kernel of Archlinux.

[side note]
I'm planning to remove the loading of the initramfs for my self compiled kernel during this weekend. The kenrel contains all necessary options for bootup and the initramfs is therefore only unnecessary work and with possible issues. But that is my very one decision, most people can't and won't compile a kernel itself.
[/side note]


// edit
Since when is bugtracker of Systemd no longer hosted on Doesn't remember my github credentials.
Comment by Marius (65kid) - Friday, 24 July 2015, 17:03 GMT Comment by Marius (65kid) - Saturday, 01 August 2015, 13:56 GMT
To summarize, this is not a problem in systemd, it's that kmod returns the wrong error code. The correct "no such file or directory" would be silently ignored by systemd, so the modules do not actually need to be in the initrd.

It would be nice if the the kmod patch [1] could be backported, since libkmod releases seem to be quite infrequent.