iptables-persistent install fail with monolithic kernel

Project:Linux server
Category:bug report
Project wiki:Server
Related pages:#295: iptables

Follow up from #301: How to remove package that has not been properly installed?.

I failed to install iptables-persistent:

# apt-get install iptables-persistent
Reading package lists... Done
Building dependency tree      
Reading state information... Done
iptables-persistent is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up iptables-persistent (0.5.3ubuntu2) ...
FATAL: Could not load /lib/modules/ No such file or directory
dpkg: error processing iptables-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I searched and found that this is apparently due to the fact that my server provider (OHV) provides a monolithic kernel: modules cannot be loaded.

While I could install my own kernel, the error message given above could be improved, or the kernel dependency could be better diagnosed by apt-get and the iptables-persistent package.



Related pages:+295: iptables