netfilter-persistent install fails with missing kernel module files
Sep 05 20:57:42 server systemd: Unit systemd-modules-load.service entered failed state.
Sep 05 20:57:42 server systemd: Dependency failed for netfilter persistent configuration.
Sep 05 20:57:42 server systemd: Failed to start Load Kernel Modules.
Sep 05 20:57:42 server systemd: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
Sep 05 20:57:42 server systemd-modules-load: Failed to lookup alias 'loop': Function not implemented
Sep 05 20:57:42 server systemd-modules-load: could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'
Sep 05 20:57:42 server systemd: Starting Load Kernel Modules…
At first, I assumed that netfliter-persistent was just a bit dated. But I ran depmod and got this output:
depmod: WARNING: could not open /lib/modules/4.1.5-x86_64-linode61/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/4.1.5-x86_64-linode61/modules.builtin: No such file or directory
I then ran into this semi-related thread on the forum (
This might be related to the issue you are experiencing:
The solution for me was to comment out "loop" in /etc/modules.
sudo echo "fuse" >> /lib/modules/4.1.5-x86_64-linode61/modules.builtin sudo touch /lib/modules/4.1.5-x86_64-linode61/modules.order sudo depmod
You should now be able to install the iptables-persistent package.
I had the error with both fuse and loop, I don't seem to need either so I did this:
Create this file (it can really be named anything as long as it's in that dir)…
and add these two lines:
install loop /bin/false install fuse /bin/false
In my case the there was no real problem being caused, aside from the failure to start systemd-modules-load, but now it runs fine, now errors/warnings. Hope this helps someone else!