1

I'm working on a Debian wheezy x64 box, with dist-upgrade to:

Debian 7.7 (wheezy) 64-bit
kernel Linux 3.2.0-4-amd64

It's configured with Linux RAID10, dm-crypt/LUKS and LVM. I've installed VirtualBox from virtualbox-4.3_4.3.20-96996~Debian~wheezy_amd64.deb.

Although it boots and runs software, something about insserv is broken. For example:

root@debian:/home/user# apt-get install iptables-persistent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  iptables-persistent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.3 kB of archives.
After this operation, 61.4 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package iptables-persistent.
(Reading database ... 133127 files and directories currently installed.)
Unpacking iptables-persistent (from .../iptables-persistent_0.5.7_all.deb) ...
Setting up iptables-persistent (0.5.7) ...
insserv: There is a loop between service mountnfs and nfs-common if started
insserv:  loop involving service nfs-common at depth 12
insserv:  loop involving service rpcbind at depth 10
insserv:  loop involving service mountnfs at depth 13
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing iptables-persistent (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)

I get basically the same errors with root@debian:/home/user# apt-get install -f . However, some other packages install successfully:

root@debian:/home/user# apt-get install p7zip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  p7zip
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 386 kB of archives.
After this operation, 1,010 kB of additional disk space will be used.
Get:1 http://ftp.at.debian.org/debian/ wheezy/main p7zip amd64 9.20.1~dfsg.1-4 [386 kB]
Fetched 386 kB in 1s (299 kB/s)
Selecting previously unselected package p7zip.
(Reading database ... 133131 files and directories currently installed.)
Unpacking p7zip (from .../p7zip_9.20.1~dfsg.1-4_amd64.deb) ...
Processing triggers for man-db ...
Setting up iptables-persistent (0.5.7) ...
insserv: There is a loop between service mountnfs and nfs-common if started
insserv:  loop involving service nfs-common at depth 12
insserv:  loop involving service rpcbind at depth 10
insserv:  loop involving service mountnfs at depth 13
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing iptables-persistent (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up p7zip (9.20.1~dfsg.1-4) ...
Errors were encountered while processing:
 iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)

But installation of iptables-persistent still fails to complete.

Updating nfs-common runlevel defaults doesn't help, and shows the same errors:

root@debian:/home/user# update-rc.d nfs-common defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match nfs-common Default-Start values (2 3 4 5 S)
insserv: There is a loop between service mountnfs and nfs-common if started
insserv:  loop involving service nfs-common at depth 12
insserv:  loop involving service rpcbind at depth 10
insserv:  loop involving service mountnfs at depth 13
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header

Google has not shown me anything useful. And the only similar question here is fortunately not relevant.

How might I fix this? I appreciate that the runlevel mismatch for nfs-common may be relevant, but I don't understand how to proceed.

Edit: As suggested by wurtel, given that I'm not using nfs, I've removed mountnfs, nfs-common and rpcbind. I had to remove them in that order, to avoid the loop errors. But setting the defaults failed:

root@debian:/home/user# update-rc.d -f rpcbind defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match rpcbind Default-Start values (S 2 3 4 5)
root@debian:/home/user# update-rc.d -f nfs-common defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match nfs-common Default-Start values (2 3 4 5 S)
insserv: There is a loop between service mountnfs and nfs-common if started
insserv:  loop involving service nfs-common at depth 14
insserv:  loop involving service rpcbind at depth 12
insserv:  loop involving service mountnfs at depth 16
insserv: There is a loop between service mountnfs and nfs-common if started
insserv:  loop involving service rsyslog at depth 17
root@debian:/home/user# update-rc.d -f mountnfs defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: error: unable to read /etc/init.d/mountnfs

On the bright side, once I had managed again to remove mountnfs, nfs-common and rpcbind, I was able to install and configure iptables-persistent. However, I'm left with update-rc.d: error: unable to read /etc/init.d/mountnfs and the mismatching default start runlevel values for rpcbind and nfs-common.

Even worse, I find that setting defaults fails for other packages in /etc/default/. For some, it's "unable to read". For example:

root@debian:/etc/iptables# update-rc.d grub defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: error: unable to read /etc/init.d/grub

For others, it's the default start runlevel mismatch. For example:

root@debian:/etc/default# update-rc.d halt defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match halt Default-Start values (none)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match halt Default-Stop values (0)

And the rest work. For example:

root@debian:/etc/default# update-rc.d exim4 defaults
update-rc.d: using dependency based boot sequencing

However, with mountnfs, nfs-common and rpcbind removed, I don't see loop errors for any of them. So that seems to be merely a symptom of the rc.d errors.

But that ought to be another question, I think.

4
  • Do you actually use nfs? If not, remove nfs-common and rpcbind. However, I have those installed and have no problems. Try update-rc.d -f nfs-common remove; update-rc.d -f nfs-common defaults for each of the three files, perhaps even first remove them all, then set the defaults.
    – wurtel
    Jan 7, 2015 at 11:55
  • Maybe this ought to be an answer?
    – Al Fansome
    Jan 7, 2015 at 22:56
  • Well, it doesn't really solve the cause of your problem. If I do the same thing then I don't get any errors. Are the init.d scripts the originals as distributed by the package? dpkg -s packagname will show the md5sums of the conffiles, so you can compare the actual md5sums.
    – wurtel
    Jan 8, 2015 at 7:55
  • I would check the chkconfig start/stop comments in the nfs-common script.
    – Jeff Schaller
    Oct 6, 2015 at 20:27

1 Answer 1

-1

I had similar problem. Delete initscripts.* from /var/lib/dpkg/info

Running apt-get install -f after that fixes the problem.

The solution was taken from here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .