clone 677811 -1
reassign -1 mount
retitle -1 mount: Documented behaviour of bind mounts is incorrect
thanks

On Sun, Jun 17, 2012 at 12:29:02AM +0200, Julian Andres Klode wrote:
> On Sat, Jun 16, 2012 at 11:13:03PM +0100, Roger Leigh wrote:
> > On Sat, Jun 16, 2012 at 02:57:26PM -0700, Vagrant Cascadian wrote:
> > > /etc/schroot/setup.d/15binfmt looked so clever! Unfortunately, I seem to 
> > > be 
> > > running into problems with it...
> > > 
> > > So, I built an schroot environment for armhf using qemu-debootstrap.
> > > 
> > > When trying to use it, I get the following error:
> > > 
> > >   schroot -c sid-armhf
> > >   E: 15binfmt: mount: 
> > > /var/lib/schroot/mount/sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6/sid-armhf/usr/bin/qemu-arm-static
> > >  is busy
> > >   E: 15binfmt: mount: 
> > > /var/lib/schroot/mount/sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6/sid-armhf/usr/bin/qemu-arm-static
> > >  is busy
> > >   E: sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6: Chroot setup failed: 
> > > stage=setup-start
> > 
> > That's odd, any idea why the remount would be failing here?
> > 
> > Julian, do you have any thoughts?
> 
> It turns out that mount has changed behavior recently (but man-pages document
> the one that worked until now). Replacing
>       mount -o remount,ro "$dst"
> by
>       mount -o remount,ro,bind "$dst"
> fixes this. A bug report against mount seems to be a good
> idea.

OK.  Done as above.

> > Would copying rather than binding be the safer method here?
> > (Does binding prevent upgrades on the host by preventing
> > unlinking?)
> 
> The best solution in my opinion would be to make qemu-user-static
> multi-arch and add the native architecture to the chroot, and then
> install qemu-user-static for the native architecture inside the
> chroot.

Would this work correctly with binfmt-support?  Would it impact on
binfmt-related stuff outside the chroot?  We could potentially
have multiple clones of the chroot (or chroots) each having a copy
of the qemu-user-static binaries.  I guess if the paths are shared
between chroots (and mount namespaces?), you'd still need it to be
installed on the host to have it automatically set up?

I'll request that qemu be multi-archified.

> Alternatively, copying it over and marking it read-only or
> immutable (to get a very strong guarantee that the chroot
> cannot break it, replace it, or remove it), might also
> work. The guarantees of an immutable copy and a bind mount
> are practically the same from inside the chroot, apart from
> the copy taking up more space.

OK.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to