# HG changeset patch # User Rob Landley # Date 1355163291 21600 # Node ID a91fb1944247e6ee0f17150bd63a62230b838537 # Parent 193e92aab6d2dc019b59d7d3d1435751ec56b748 Making bind mounts read only inexplicably requires a two step process, due to a kernel limitation. diff -r 193e92aab6d2 -r a91fb1944247 more/chroot-splice.sh --- a/more/chroot-splice.sh Sun Dec 09 13:04:37 2012 -0600 +++ b/more/chroot-splice.sh Mon Dec 10 12:14:51 2012 -0600 @@ -40,7 +40,8 @@ if [ -d "$2" ] then - mount -o bind,ro "$2" "$CHROOT/mnt" || exit 1 + mount -o bind "$2" "$CHROOT/mnt" && + mount -o remount,ro "$CHROOT/mnt"|| exit 1 else mount -o loop "$2" "$CHROOT/mnt" || exit 1 fi