Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Feb 2004 13:06:12 +0000
From:      Colin Percival <colin.percival@wadham.ox.ac.uk>
To:        Harald Schmalzbauer <h@schmalzbauer.de>
Cc:        questions@freebsd.org
Subject:   Re: buildworld inside a jail
Message-ID:  <6.0.1.1.1.20040206125718.032e6420@imap.sfu.ca>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.1.1.1.20040206125718.032e6420>