[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 28d831a 2/3: Mount essential directories in "
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 28d831a 2/3: Mount essential directories in "plain" chroot |
Date: |
Sat, 8 Oct 2016 18:02:25 +0000 (UTC) |
branch: master
commit 28d831a259f5a656f10f9cf14c9467f3b2835af4
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Mount essential directories in "plain" chroot
---
README.schroot | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/README.schroot b/README.schroot
index c1f20df..e46366f 100644
--- a/README.schroot
+++ b/README.schroot
@@ -49,6 +49,7 @@ directory=/srv/chroot/cross-lmi
users=greg
groups=greg
root-groups=root
+type=plain
EOF
# Exit root shell (return to normal shell).
@@ -78,15 +79,35 @@ chmod a+x /usr/sbin/policy-rc.d
dpkg-divert --divert /usr/bin/ischroot.debianutils --rename /usr/bin/ischroot
ln -s /bin/true /usr/bin/ischroot
+# This being a "plain" schroot, mount essential directories:
+mount -t devpts -o rw,nosuid,noexec,relatime,mode=600 devpts /dev/pts
+mount -t proc -o rw,nosuid,nodev,noexec,relatime proc /proc
+
+# If the chroot is to be permanent, consider adding those mounts to /etc/fstab
.
+# If the chroot is ever to be eradicated, be sure to unmount first:
+# ...inside chroot:
+# umount ./dev/pts
+# umount ./proc
+# ...or outside chroot:
+# umount /srv/chroot/cross-lmi/dev/pts/
+# umount /srv/chroot/cross-lmi/proc/
+# Then, and only then:
+# rm -rf /srv/chroot/cross-lmi/
+# rm /etc/schroot/chroot.d/cross-lmi.conf
+
apt-get update
apt-get --assume-yes install g++-mingw-w64-i686 automake libtool make \
pkg-config git zsh bzip2 unzip sudo wine default-jre fop jing trang \
>cross-lmi-apt-get-log 2>&1
-# Don't worry about messages like these:
-# E: Can not write log (Is /dev/pts mounted?)
-# [FAIL] Can't start system message bus - /proc is not mounted ... failed!
-# It's okay that /dev/pts and /proc are not mounted in this chroot.
+# Don't worry about messages like the following--see:
+# http://lists.nongnu.org/archive/html/lmi/2016-09/msg00025.html
+#
+# update-rc.d: warning: start and stop actions are no longer supported;
falling back to defaults
+# invoke-rc.d: policy-rc.d denied execution of start.
+# No schema files found: doing nothing.
+# Warning: The home dir /run/uuidd you specified can't be accessed: No such
file or directory
+# Not creating home directory `/run/uuidd'.
addgroup --gid=1000 greg
adduser --gid=1000 --uid=1000 greg