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.

>
> 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.

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.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.



-- 
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