[lxc-devel] [PATCH] debian: Symlink /etc/mtab
Holger Amann
holger at sauspiel.de
Wed Mar 19 06:06:13 UTC 2014
/etc/mtab doesn’t exist after bootstrapping a debian container, and will be created as regular file after first start.
That leads to at least two errors:
- output of `mount` is wrong and get messed up the more often you start/stop the container
- /dev/pts/ptmx has wrong permissions
Signed-off-by: Holger Amann <holger at sauspiel.de>
---
templates/lxc-debian.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index 7ad8e3c..63a44a6 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -144,6 +144,9 @@ EOF
echo "Timezone in container is not configured. Adjust it manually."
fi
+ # symlink mtab
+ ln -s /proc/self/mounts $rootfs/etc/mtab
+
echo "root:root" | chroot $rootfs chpasswd
echo "Root password is 'root', please change !"
--
1.8.4.1
More information about the lxc-devel
mailing list