Ubuntu 11.10 boot problem

Ubuntu 11.10 boot problem

Today i had a network issue on my system, so i tried rebooting my Ubuntu 11.10 server which acts like a router, firewall, DHCP and DNS server for my network. Turns out there was a rather big problem with Ubuntu 11.10 if you upgraded from a previous version.

It seems that in Ubuntu 11.10 the directory containing running processes information and lock files has changed, or well, it has for certain programs. This results in a system where certain daemons/programs expect to find sockets in /var/run, while they are present in /run, or vice versa.

This might result in a boot problem looking like this:

The first lines are not so important, what is important are the last two. It says:

1
2
unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket : connection refused
Waiting for network configuration...

After that last one, you might get that it waits for another 60 seconds for network configuration, but it will get stuck in boot after that.

Luckily i had my 3G enabled phone close, so i could do some searching, which gave me a link to a bug report and a forum post with a fix. In short, few simple steps can help you out here:

  1. reboot into recovery mode
  2. start a root shell
  3. mount the filesystem as read/write:
    1
    mount -o remount,rw /
  4. move everything from /var/run into /run:
    1
    mv /var/run/* /run/
  5. move /var/lock into /run:
    1
    mv /var/lock /run/
  6. create symlinks from /var/run to /run and /var/run/lock to /var/lock:
    1
    2
    ln -s /run /var/run
    ln -s /run/lock /var/lock
  7. reboot

Worked like charm here. Hope this helps.

Share on Twitter

Tags: ,