From owner-freebsd-questions@FreeBSD.ORG Wed Aug 11 15:34:25 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 2913F16A4CE for ; Wed, 11 Aug 2004 15:34:25 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E00BF43D1D for ; Wed, 11 Aug 2004 15:34:24 +0000 (GMT) (envelope-from henrik.w.lund@broadpark.no) Received: from [10.0.0.3] (52.80-202-129.nextgentel.com [80.202.129.52]) by mail.broadpark.no (Postfix) with ESMTP id 750FD2F7C; Wed, 11 Aug 2004 17:34:58 +0200 (MEST) Message-ID: <411ABADD.3050702@broadpark.no> Date: Wed, 11 Aug 2004 17:33:33 -0700 From: Henrik W Lund User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: nb, en-us, en MIME-Version: 1.0 To: hampi@rootshell.be References: <20040811151539.GA1658@gicco.homeip.net> In-Reply-To: <20040811151539.GA1658@gicco.homeip.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 5, chroot and /dev 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: Wed, 11 Aug 2004 15:34:25 -0000 Hanspeter Roth wrote: >Hello, > >I have built a new kernel on a FreeBSD 5.2 system which doesn't boot >anymore. So I took a Freesbee and mounted the filesystems from the >harddisk and changed root to the harddisk's one. But there were no >devices in /dev. I tried some of /etc/rc.d/dev*. This only created a >/dev/null. >Trying to build the kernel (with a different configuration) fails. >A regular file /dev/stdout has been created. > >What is the recommended way to create the device nodes in /dev in a >chroot environment? > >-Hanspeter > > Greetings! I may be wrong here, but I think that in the 5.x system, /dev is populated at boottime, courtesy of the GEOM layer and the devfs filesystem. These two operate together, GEOM detecting hardware and giving it proper device nodes in the special devfs filesystem (which is mounted under /dev, if you check your fstab). So, messing with device nodes in a chrooted 5.x system is not possible (someone correct me here, if I'm wrong). What happens when you try to boot it normally? -Henrik W Lund