[Pkg-ltsp-devel] Bug#590318: ltsp-server: chroot building fail because /proc can't be umounted (binfmt_misc blocks it)

Petter Reinholdtsen pere at hungry.com
Sun Jul 25 20:51:01 UTC 2010


Package:  ltsp-server
Version:  5.2.3-1
Severity: important
Tags:     patch
User:     debian-edu at lists.debian.org
UserTags: debian-edu

Since a few days ago, LTSP chroot building is failing from within d-i.
I tracked it down to /proc failing to umount in the chroot, and this
is caused by /proc/sys/fs/binfmt_misc still being mounted underneath
it.

I believe this patch would solve it, by not counting the number of
binfmt_misc mounts, but instead see if there is one in the chroot.

diff -ur ltsp-5.2.3-pere/server/plugins/ltsp-build-client/common/091-unmount-dirs ltsp-5.2.3/server/plugins/ltsp-build-client/common/091-unmount-dirs
--- ltsp-5.2.3-pere/server/plugins/ltsp-build-client/common/091-unmount-dirs    2010-07-06 05:38:10.000000000 +0200
+++ ltsp-5.2.3/server/plugins/ltsp-build-client/common/091-unmount-dirs 2010-07-25 22:47:04.000000000 +0200
@@ -3,7 +3,7 @@
 case "$MODE" in
     finalization)
         # binfmt_misc might need to be unmounted manually, see LP #534211
-        if [ $(grep ^binfmt_misc $ROOT/proc/mounts 2>/dev/null | wc -l) -gt 1 ]; then
+        if grep -q "^binfmt_misc $ROOT/proc/sys/fs/binfmt_misc" $ROOT/proc/mounts; then
             umount $ROOT/proc/sys/fs/binfmt_misc || true
         fi


Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-ltsp-devel mailing list