From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 3 04:00:44 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EDBB37B401 for ; Thu, 3 Jul 2003 04:00:44 -0700 (PDT) Received: from mail.econolodgetulsa.com (mail.econolodgetulsa.com [198.78.66.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA8FA43FBF for ; Thu, 3 Jul 2003 04:00:43 -0700 (PDT) (envelope-from user@mail.econolodgetulsa.com) Received: from mail (mail [198.78.66.163])h63B0knW038494 for ; Thu, 3 Jul 2003 04:00:46 -0700 (PDT) (envelope-from user@mail.econolodgetulsa.com) Date: Thu, 3 Jul 2003 04:00:46 -0700 (PDT) From: Josh Brooks To: freebsd-hackers@freebsd.org Message-ID: <20030702220924.V57224-100000@mail.econolodgetulsa.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: current state of the art / best practice for devfs in a jail ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2003 11:00:44 -0000 I have been researching the various of ways people add devfs to a jail to give the jail certian /dev devices necessary to function ... One strategy I saw was: mount -t devfs devfs /home/jail/dev ( cd /home/jail/dev ; rm $devices_i_dont_want_in_my_jails ) mount -u -o nonewdev /home/jail/dev However I do not know of a `nonewdev` option for mount - but does that even matter, since `mknod` does not work inside of a jail ? Or does it in 5.x ? -- Another strategy I saw was : # mount -t devfs devfs /home/jail/dev # cd /home/jail/dev # rm -f * # rm -W null zero tty console # ls -l crw------- 1 phk wheel 0, 0 2 Feb 01:09 console drwxr-xr-x 2 root wheel 0 2 Feb 01:06 fd crw-rw-rw- 1 root wheel 2, 2 3 Feb 21:25 null crw-rw-rw- 1 root wheel 1, 0 3 Feb 17:27 tty crw-rw-rw- 1 root wheel 2, 12 1 Jan 1970 zero # Does this even work ? -- So I guess I am asking two questions: 1. in 5.x, is it still true that mknod will not work from within a jail (I sure hope it is still true) 2. what is the current "best practices" strategy for mounting up a devfs in a jail ? thank!