On a raspbian GNU/Linux 8 system, I get these errors during bootup:

ifplugd(eth0)[214]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
ifplugd(eth0)[214]: client: /sbin/ifup: failed to open lockfile /run/network/.ifstate.lock: No such file or directory
ifplugd(eth0)[214]: client: run-parts: /etc/ifplugd/action.d//ifupdown exited with return code 1
ifplugd(eth0)[214]: Program execution failed, return value is 1.

Later on, ifplugd repeats the action and succeeds. I suspect the initial failure is due to /run not being mounted. My questions are:

  1. Is this normal behaviour or a bug/misconfiguration? ifplugd runs while systemd-fsck is still running, so it seems ifplugd is a bit early? Can I just ignore this problem?

  2. Mounting /run appears to be a special case not handled by /etc/fstab because it needs to be present very early. So which part controls the mounting of /run? Is this done by systemd? If so, which part of systemd?


/run is already mounted early enough.

Your diagnosis is faulty.

/run is mounted by the systemd program running as process #1. It is one of the so-called "API filesystems" that systemd mounts before it even begins to bring up services and targets. Indeed, systemd allows for /run to be mounted by the initrd stage of the bootstrap before process #1 executes the systemd program itself. Whatever the cause of your problem, it is not because of /run not being mounted.

Given that the problem is with a file that is in /run/network/, really your first thought rather should have been Does the /run/network/ directory yet exist at this point in the bootstrap? leading to the question What creates the /run/network/ directory? leading to the networking service that runs the /etc/init.d/networking script and whether it runs before or after the ifplugd service that runs the /etc/init.d/ifplugd script. For the answer to which, see the very logs that you are looking at. ☺

Yes, the ifplugd service is relying upon the networking service having been started first. No, their van Smoorenburg rc scripts do not in fact encode this ordering.

Further reading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.