Comment 2 for bug 974584

Serge Hallyn (serge-hallyn) wrote :

There are a few parts to this. At core, we need /dev/shm to be a symbolic link to /dev/shm, which *is* mounted.

/etc/init/mounted-dev.conf is supposed to create that symbolic link. However, it does not run because we never mount /dev.

If it did run, it would do the wrong thing. That is because the initscripts postinst leaves a /dev/shm directory. mounted-dev.conf simply does

[ -e /dev/shm ] || ln -s /run/shm /dev/shm

That would cause /dev/shm/shm to be the symbolic link to /run/shm.

The simplest solution is probably to rmdir $rootfs/dev/shm at the end of the container creation templates.