Date: Tue, 20 Sep 2005 08:47:16 +0100 From: Brian Candler <B.Candler@pobox.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Martin Cracauer <cracauer@cons.org>, freebsd-current@freebsd.org Subject: Re: device entries outside /proc with procfs (for chroot) Message-ID: <20050920074716.GB18149@uk.tiscali.com> In-Reply-To: <1950.1127150337@critter.freebsd.dk> References: <20050919130810.A41848@cons.org> <1950.1127150337@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 19, 2005 at 05:18:57PM +0000, Poul-Henning Kamp wrote: > In message <20050919130810.A41848@cons.org>, Martin Cracauer writes: > >I noticed the creation of /dev/ entries outside of /dev doesn't work > >anymore. This is needed for chroot environments, which rely on > >/dev/null on a regular basis. > > mount -t devfs foo /chroot/dev > > Consider devfs(8) rules as a filtering method. It took me a while to work out exactly how to configure this, so here's the recipe (from a FreeBSD 5.4 box) [/etc/rc.conf] devfs_set_rulesets="/chroot/dev=devfsrules_jail" Then run "/etc/rc.d/devfs start" Under FreeBSD 5.4 at least, mknod still works. But using devfs is much better since you get all necessary pty devices. $ ls /chroot/dev fd ptyp2 ptyp7 ptypc stderr ttyp2 ttyp7 ttypc zero log ptyp3 ptyp8 ptypd stdin ttyp3 ttyp8 ttypd null ptyp4 ptyp9 ptype stdout ttyp4 ttyp9 ttype ptyp0 ptyp5 ptypa ptypf ttyp0 ttyp5 ttypa ttypf ptyp1 ptyp6 ptypb random ttyp1 ttyp6 ttypb urandom Regards, Brian.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050920074716.GB18149>