Browse files

Fix accessibility issues of devpts and other mountpoints.

  • Loading branch information...
1 parent 606345b commit 9bd7de2391596346ee2e698817835f84495b56c4 @agravier committed Mar 13, 2012
Showing with 11 additions and 7 deletions.
  1. +11 −1 chromiarchos-run
  2. +0 −6 chromiarchos-sysinit
@@ -30,7 +30,17 @@ echo 0 > /proc/$$/oom_score_adj
# Mounts
mount /dev/sda13 $CHROOT_DIR
-mount -o bind /dev $CHROOT_DIR/dev # TODO check that this is really needed
+mount -o bind /dev $CHROOT_DIR/dev
+mount -o bind /dev/shm $CHROOT_DIR/dev/shm
+mount -t devpts devpts $CHROOT_DIR/dev/pts # we want pseudoterminals. alternately, tmux.
+mount -t proc proc $CHROOT_DIR/proc # we want a shared process info space.
+mount -t sysfs sys $CHROOT_DIR/sys #
+mount -o bind /var/lib/dbus $CHROOT_DIR/var/lib/dbus
+rm -Rf $CHROOT_DIR/run
+mkdir -m 1777 $CHROOT_DIR/run # dbus & co will fail without this
+mount -o bind /var/run $CHROOT_DIR/run
+mkdir -m 1777 $CHROOT_DIR/run/lock
+mount -o bind /var/lock $CHROOT_DIR/run/lock
# Internet
rm $CHROOT_DIR/etc/resolv.conf
@@ -16,12 +16,6 @@ printsep
mountpoint -q /run || mount -n -t tmpfs run /run -o mode=0755,size=10M,nosuid,nodev
mountpoint -q /dev || mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid &>/dev/null \
|| mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
- mkdir -p -m 1777 /run/lock
- mkdir -p /dev/{pts,shm}
- mountpoint -q /dev/pts || mount -n /dev/pts &>/dev/null \
- || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
- mountpoint -q /dev/shm || mount -n /dev/shm &>/dev/null \
- || mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
# remount root ro to allow for fsck later on, we remount now to
# make sure nothing can open files rw on root which would block a remount

0 comments on commit 9bd7de2

Please sign in to comment.