Subject: Re: devfs, was Re: FreeBSD 5/6/7 kernel emulator for NetBSD 2.x
To: None <>
From: M. Warner Losh <>
List: tech-kern
Date: 10/29/2005 00:11:57
In message: <>
            Bill Studenmund <> writes:
: I do see an advantage to having multiple /dev mounts so that chroot 
: environments can have devices. I think that came up as a MUST last time we 
: hashed this out.

I think it is a must.  Let me share some experience I had when FreeBSD
transitioned to using devfs from the traditional method.  I don't
share this to show FreeBSD is better or worse than anything, but to
give a concrete example of why it is needed, and some of the pitfalls
that I didn't anticpate up front.

My company builds FreeBSD based systems.  We have a build process that
builds a chroot, then builds the image/binaries in the chroot to
ensure that there is no host contamination possible.  We quickly
discovered (and fixed) that you have to mount a devfs instance inside
the jail, or you get weird errors.  Lots of stuff just works w/o real
devs, but enough doesn't that you really need to mount it.  There were
also issues about mounting devfs on top of a amd automount, but those
were also resolved.

If you have a lot of chroots, then the chroot command you used to use
might have to change to into a mount + chroot command to get the
desired effects.