/run: Too many levels of symbolic links

Bug #908614 reported by Mike Mestnik
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
base-files
New
Undecided
Unassigned
sysvinit
New
Undecided
Unassigned
dnsmasq (Ubuntu)
Invalid
High
Unassigned
update-manager-core (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

root@ubuntu:~# ls /run
ls: cannot access /run: Too many levels of symbolic links
root@ubuntu:~# ls -alrt /run /var/run
lrwxrwxrwx 1 root root 8 Dec 24 14:58 /run -> /var/run
lrwxrwxrwx 1 root root 4 Dec 25 14:42 /var/run -> /run

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: dnsmasq-base 2.59-4
ProcVersionSignature: Ubuntu 3.2.0-6.12-generic-pae 3.2.0-rc6
Uname: Linux 3.2.0-6-generic-pae i686
ApportVersion: 1.90-0ubuntu1
Architecture: i386
CasperVersion: 1.296
Date: Sun Dec 25 20:54:20 2011
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20111220)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: dnsmasq
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mike Mestnik (cheako) wrote :
Revision history for this message
Mike Mestnik (cheako) wrote :

root@ubuntu:~# dpkg -S /var/run
base-files, initscripts: /run
base-files, dnsmasq-base: /var/run

Revision history for this message
Mike Mestnik (cheako) wrote :

I made both into a directory with no symlinks. For the time being /var/run is a link to /run, should be "../run" if any thing.

I believe that if /var/run is needed prior to /var being mounted that /tmp should be used. After var is mounted /tmp can hold symlinks into /var/run.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for taking the time to report this bug.

To help us reproduce this, can you tell us which url you used to get the install media, and describe the steps you followed to install?

Changed in dnsmasq (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Mike Mestnik (cheako) wrote :

This was all done using apt-get. After do-release-upgrade had failed to find an upgrade path, I ran `find /etc/apt -type f -exec sed -i -e 's/lucid/precise/g'` and then I manually went through and downgraded a few packages to help satisfy dependencies.

I understand that /run is likely needed in cases where /var is on another file system from root. However I believe that /tmp/shm/run would be a better candidate as / should be mostly read-only. /var/run should have symbolic links pointed to /tmp/shm/run for use after boot and applications that run during boot should be configured to make use of /tmp/shm/run and then create these links after /var is mounted for it's brethren.

This seams like a cleaner solution then for parts of /var to be mapped to a filesystem for which they don't belong.

As for how things got this way, it has to be because one package created one of these symbolic links and another package created the other. I would look for a package that creates a /run -> var/run link.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the information.

/run is supposed to be a tmpfs filesystem, listed in /lib/init/fstab, with /var/run a symlink to /run.

The failed upgrade from lucid to precise was a bug which ideally we would figure out. I'm not sure how your issues with /run came to be, but it may be possible to reproduce it since you gave the detailed steps you took - thanks for that.

Changed in dnsmasq (Ubuntu):
status: Incomplete → New
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Marked as affecting update-manager-core, as do-release-upgrade was the source of the core failure.

Changed in dnsmasq (Ubuntu):
status: New → Invalid
Revision history for this message
Mike Mestnik (cheako) wrote :

Vary well.

Revision history for this message
Mohamed (mohamed-am83) wrote :

just for the noobs who reach here searching for a temporary solution:
mount your root partition as r/w (e.g. using live CD) then issue the following commands
$ cd /
$ sudo rm run
$ sudo mkdir -p run

that did the tick with me!

Revision history for this message
praseodym (oliver-ehlert) wrote :

Confirmed after the do-release-upgrade from 10.04 to 12.04, 32 bit.

The temporary solution from mohamed-am83 worked.

Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager-core (Ubuntu):
status: New → Confirmed
tags: added: lucid2precise
Revision history for this message
Liviu Andronic (landronimirc) wrote :

I encountered this issue while upgrading from 10.04 to 12.04.1 on 64-bit machine. Apparently the upgrade scripts messed up the /var/run and /run, making each symlink to the other.
lrwxrwxrwx 1 root root 4 Sep  7 13:57 /var/run -> /run
lrwxrwxrwx 1 root root 8 Sep  5 18:13 /run -> /var/run

The workaround in Comment #9 worked fine and allowed me to boot Precise. However this is a difficult to debug bug and it should likely be marked as 'High' importance.

Revision history for this message
Mike Mestnik (cheako) wrote :

There are plenty of other important bugs to work on: https://bugs.launchpad.net/~cheako

Not everyone who posted on this bug saying it effected them marked it as having effected them, too sad. The count should be at least 3, but one wonders how many noobs read the fix and didn't know to at least trip the this effects me.

Cheers.

Revision history for this message
James (reedj) wrote :

Had this bug whilst updating from 11.04 -> 11.10, the workaround of deleting /run and re-making it worked.

Revision history for this message
NoBugs! (luke32j) wrote :

Same here when updating10.04 - 12.04, it gave /run not mounted, / not mounted, swap not mounted... until I renamed /run and created /run and reboot!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.