From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 14 20:58:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C1B7106568A for ; Mon, 14 Jul 2008 20:58:04 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id CD3A68FC0C for ; Mon, 14 Jul 2008 20:58:03 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 4587 invoked by uid 1001); 14 Jul 2008 16:57:49 -0400 Received: from bhuda.mired.org (bhuda [192.168.195.1]) by bhuda (tmda-ofmipd) with ESMTP; Mon, 14 Jul 2008 16:57:49 -0400 Date: Mon, 14 Jul 2008 16:57:47 -0400 To: "Tapan Chaudhari" Message-ID: <20080714165747.6c12371b@bhuda.mired.org> In-Reply-To: <482257ad0807141310h3381a97dif17290aed1133cfe@mail.gmail.com> References: <482257ad0807141106m679ec19frd853339637d27a2d@mail.gmail.com> <20080714184030.GA62288@eos.sc1.parodius.com> <482257ad0807141218l26cbb95aid91414a3c88a121c@mail.gmail.com> <20080714153653.59ecb307@bhuda.mired.org> <482257ad0807141310h3381a97dif17290aed1133cfe@mail.gmail.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: Can I change the device of the "/" mount point at boot time. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 20:58:04 -0000 On Tue, 15 Jul 2008 01:40:24 +0530 "Tapan Chaudhari" wrote: > Hi, > Thanks a lot Mike. But the problem is the device I am talking about is > not the physical device. I am writing a driver which will create a virtual > device and all the i/os done on this virtual device will be ultimately > redirected to the original device. Correct me if I am wrong, but I guess the > loader will try to mount my new device on '/' and then load the modules into > the kernel. Since my driver would not be loaded at that point in time, it > will fail to even mount '/'. Am I right? Or can our drivers get loaded > before loader mounts '/' ? You gotta keep your "/"'s straight. The kernel will boot of off a physical devices - pretty much required. At that point, you can use boot.config to load modules from that device, including any needed to keep your driver happy. Set the vsf.root.mountfrom to tell the kernel what where to find what's going to become the root file system when it gets to that point. The process is documented in the man pages, starting with say boot(8). Read through that and some of the "SEE ALSO" pages. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org