«

»

Jan
21
2012

Ubuntu boot issues

One issue I ran into while upgrading from Ubuntu 10.10 to 11.04 was the infamous “nuking initramfs contents: directory not empty”. At that time I did not do much about it as the previous kernel worked fine. However, today my router refused to boot any of the installed kernels. As the issue has been there since 2.6.38-11-server, it was about time to figure out what was wrong.

As it turns out, this issue has been mentioned in numerous posts on the Internet. There are even multiple threads on Ubuntu launchpad. However, they point to an issue with udev and states that it is resolved in Oneiric. It is not.

First, they conclusion is wrong. It is not *udev* that is the root cause for this issue, it is the switch from the usual init system to startup and the fact that they have moved /var/run to /run that is the root cause for this issue.

To solve it, you have to either get your OS to boot an older kernel or boot with a rescue image. When in, you will notice that /run is an symlink to /var/run. This is indeed the problem, it should be the other way around. To fix it:

  • Remove the /run symlink
  • Make a new /run directory
  • Move the contents of /var/run to /run
  • Remove /var/run
  • Create a symlink from /run to /var/run
  • Perform the same procedure with /var/run/lock so that /var/run/lock becomes a symlink to /run/lock
  • Reboot
  • Problem solved. At least for me.

    Leave a Reply

    Your email address will not be published.

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>