[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: For those who have no sound in their 32bit chroot



On Fri, Jan 26, 2007 at 05:47:28PM +0100, Gudjon I. Gudjonsson wrote:
> If I add more to this long discussion. A year ago I needed to set Matlab up in 
> a sarge chroot (because of its libc dependencies). I had some very tricky 
> error message that I spend many hours on until Lennart pointed out to me that 
> it was because of the chroot dev being mounted with bind instead of rbind.
>    My guess is that bind is good enough as long as you don't need device nodes 
> that are in subdirectories. But is there any reason for not using rbind?

As far as I have under stood it the difference is this:

If you have mounted:

/dev
/dev/pts
/dev/something else

Then bind mount /dev to the chroot will give you:
/chroot/dev

Doing rbind mount /dev to the chroot will give you:

/chroot/dev
/chroot/dev/pts
/chroot/dev/something

So rbind bind mounts everything that is mounted under what you ask for
in addition to what you ask for, while bind only does the thing you ask
for (and ignores any mounts below it).

rbind does NOT however mount anything mounted under the original mount
done after the rbind is done.  So unfortunately it won't automatically
add any new mounts you do for you, so it is of no use for people trying
to do things with automount or autofs or the like.

--
Len Sorensen



Reply to: