I'm running Ubuntu 12.04 on a VirtualBox. I was trying to create a central log server with rsyslog. At some point I made changes to the conf file and tried to restart rsyslog, but started getting the following error:

Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

Following what this question suggested http://ubuntuforums.org/showthread.php?t=1997229

I issued the following commands

dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl

However this did not resolve the issue as running the following was not actually restarting rsyslog.

service rsyslog restart

So I tried to undo the initial commands by doing

dpkg-divert --local --remove /sbin/initctl
rm /sbin/initctl

However deleting initctl started causing other issues. So I rebooted the machine, and the machine wouldn't boot normally. I went into recovery mode, and before displaying the recovery menu it printed /proc/self/fd/9: 5: /proc/self/fd/9: initctl: not found.

Does anyone know how I can restore the initctl?

Edit: I also booted the VM with the iso image for 12.04 and went to recovery menu, however there does not seem to be a way of restoring the deleted files.


Try re-installing Upstart:

sudo apt-get --reinstall install upstart

There is no way to recover lost binary otherwise. initctl unlike start, stop or restart is a separate executable and not a link to init itself.

If you do not have connectivity, see which version of Upstart package you have dpkg -l|grep upstart and download the package manually on another machine to a USB stick and reinstall from the stick. All dependencies are correct since you're just reinstalling the exact same version.


I got into the same problem and this is how I did it and my ubuntu 14.04 started booting normal.

  1. get a live CD/USB, boot it and choose try ubuntu without installing.
  2. CTRL+ALT+T to get to the terminal
  3. copy the /sbin/initctl file from the live CD/USB to the /sbin of the installed ubuntu on the machine.
  4. sudo cp /sbin/initctl /media/ubuntu/your ubuntu partition/sbin

Note: replace "your ubuntu partition" with the partition where you have your original ubuntu installed.

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.