Package:schroot
Version:1.4.19
Subject:schroot doesn't mount /home submounts into the chroot

If you use schroot on a machine used in a large company or institution
it is likely that your $home mount is actually mounted on /home/user,
not /home. 

Because the default fstab mounts /home with bind, rather then rbind
this means that you don't see the real $HOME inside the chroot. I have
such a machine at work, which is how I noticed this issue.

What I actually see inside the chroot is the underlying almost-empty
/home/wookey that is obscured by the real /home/wookey when it is
mounted. (This is of course exptremely confusing for while until you
work out what the hell is going on).

Is there a good reason not to make rbind the default for /home in the
same way that it now is for /proc and /sys? Then users would get the
full 'schroot experience' where their $HOME is just the same insde the
chroot as outside.

I've attached a patch for this changing the default config. Perhaps it
should apply to the desktop config too - I'm not sure exactly how
those are used? 

This bug was originally found and reported on Ubuntu (
https://bugs.launchpad.net/ubuntu/+source/schroot/+bug/791908 ). 

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
--- etc/profile-templates/default/linux/fstab.orig	2010-12-05 18:31:12.000000000 +0000
+++ etc/profile-templates/default/linux/fstab	2011-11-11 18:13:54.587864691 +0000
@@ -1,3 +1,3 @@
 /dev            /dev            none    rw,rbind        0       0
-/home		/home		none	rw,bind		0	0
+/home		/home		none	rw,rbind	0	0
 /tmp		/tmp		none	rw,bind		0	0

Reply via email to