From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 05:06:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 618E716A4CE for ; Fri, 6 Feb 2004 05:06:30 -0800 (PST) Received: from tx3.oucs.ox.ac.uk (tx3.oucs.ox.ac.uk [163.1.2.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28C6643D2F for ; Fri, 6 Feb 2004 05:06:26 -0800 (PST) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan3.oucs.ox.ac.uk ([163.1.2.166] helo=localhost) by tx3.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1Ap5gf-00008D-NN for questions@freebsd.org; Fri, 06 Feb 2004 13:06:25 +0000 Received: from rx3.oucs.ox.ac.uk ([163.1.2.165]) by localhost (scan3.oucs.ox.ac.uk [163.1.2.166]) (amavisd-new, port 25) with ESMTP id 00486-01 for ; Fri, 6 Feb 2004 13:06:25 +0000 (GMT) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx3.oucs.ox.ac.uk with smtp (Exim 4.24) id 1Ap5gf-000089-9o for questions@freebsd.org; Fri, 06 Feb 2004 13:06:25 +0000 Received: (qmail 2554 invoked by uid 0); 6 Feb 2004 13:06:17 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.16 (sweep: 2.14/3.71. spamassassin: 2.53. Clear:. Processed in 1.602149 secs); 06 Feb 2004 13:06:17 -0000 X-Qmail-Scanner-Mail-From: colin.percival@wadham.ox.ac.uk via gateway X-Qmail-Scanner: 1.16 (Clear:. Processed in 1.602149 secs) Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 6 Feb 2004 13:06:15 -0000 Message-Id: <6.0.1.1.1.20040206125718.032e6420@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Fri, 06 Feb 2004 13:06:12 +0000 To: Harald Schmalzbauer From: Colin Percival In-Reply-To: <200402061350.04442@harrymail> References: <200402060259.07248@harrymail> <6.0.1.1.1.20040206020419.032b7910@imap.sfu.ca> <200402060324.38196@harrymail> <200402061350.04442@harrymail> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: questions@freebsd.org Subject: Re: buildworld inside a jail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2004 13:06:30 -0000 At 12:49 06/02/2004, Harald Schmalzbauer wrote: >On Friday 06 February 2004 03:24, Harald Schmalzbauer wrote: > > On Friday 06 February 2004 03:05, Colin Percival wrote: > > > * The contents of /dev inside the jail? > > > > It's the result of [devfsrules_jail=4] from devfs.rules (/etc/defaults) > > reading: > > dr-xr-xr-x 2 root wheel - 512 5 Feb 23:21:07 2004 fd > > dr-xr-xr-x 2 root wheel - 512 5 Feb 23:21:07 2004 net > > crw-rw-rw- 1 root wheel - 2, 2 6 Feb 03:13:50 2004 null > > crw-rw-rw- 1 root wheel - 6, 0 6 Feb 02:35:01 2004 ptyp0 > > crw-rw-rw- 1 root wheel - 6, 1 6 Feb 03:18:17 2004 ptyp1 > > crw-rw-rw- 1 root wheel - 6, 2 6 Feb 02:31:13 2004 ptyp2 > > crw-rw-rw- 1 root wheel - 6, 3 6 Feb 01:13:39 2004 ptyp3 > > crw-rw-rw- 1 root wheel - 249, 0 5 Feb 23:21:08 2004 random > > lrwxr-xr-x 1 root wheel - 6 5 Feb 23:21:07 2004 stderr -> fd/2 > > lrwxr-xr-x 1 root wheel - 5 5 Feb 23:21:07 2004 stdin -> fd/0 > > lrwxr-xr-x 1 root wheel - 6 5 Feb 23:21:07 2004 stdout -> fd/1 > > crw-rw-rw- 1 root wheel - 5, 0 6 Feb 03:18:17 2004 ttyp0 > > crw--w---- 1 root tty - 5, 1 6 Feb 03:18:17 2004 ttyp1 > > crw-rw-rw- 1 root wheel - 5, 2 6 Feb 02:31:13 2004 ttyp2 > > crw-rw-rw- 1 root wheel - 5, 3 6 Feb 01:13:39 2004 ttyp3 > > lrwxr-xr-x 1 root wheel - 7 5 Feb 23:21:07 2004 urandom -> > > random crw-rw-rw- 1 root wheel - 2, 12 5 Feb 23:20:19 2004 zero > >I found out that if I don't hide any device it finishes compiling!?!?!? Interesting. I create a jailed /dev with the following commands: mount -t devfs devfs ${BASEDIR}/jail/dev devfs rule -s 10 delset devfs rule -s 10 add hide devfs rule -s 10 add path null unhide devfs rule -s 10 add path zero unhide devfs rule -s 10 add path fd unhide devfs rule -s 10 add path 'fd/*' unhide devfs rule -s 10 add path 'std*' unhide devfs -m ${BASEDIR}/jail/dev ruleset 10 devfs -m ${BASEDIR}/jail/dev rule applyset and you've certainly got all of those devices. >What device could be needed to compile source code? I'm not sure why this would make any difference, but try with just /dev/null, /dev/zero, /dev/fd, /dev/fd/*, and /dev/std*. Also, try listing the contents of /dev before starting the buildworld, to make sure that nothing is missing. Colin Percival