From owner-freebsd-stable@FreeBSD.ORG Fri May 9 14:26:54 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B5A437B401 for ; Fri, 9 May 2003 14:26:54 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B314943FAF for ; Fri, 9 May 2003 14:26:53 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org (big.x.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h49LQqtJ003442; Fri, 9 May 2003 14:26:53 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3EBC1D76.2050009@acm.org> Date: Fri, 09 May 2003 14:28:22 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brooks Davis References: <20030508221553.B89449-100000@voo.doo.net> <3EBAC016.7020108@acm.org> <20030508204351.GA23694@Odin.AC.HMC.Edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re: Can't boot from ad4: Device Not Configured? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2003 21:26:54 -0000 Brooks Davis wrote: > On Thu, May 08, 2003 at 01:37:42PM -0700, Tim Kientzle wrote: >>b) It doesn't get that far. >> (The root hasn't yet been mounted, so the >> contents of /dev would seem to be immaterial. >> If you can't read the disk, it doesn't really >> matter what's on it. ;-) > > Before root is mounted for real, it is actually mounted. /sbin/init > attempts to remount / properly using the device listed in /etc/fstab > and will fail to mount it if the entry does not exist in /dev. I ran > into this exact problem (ad4 and everything) before when I moved my root > disk to a PCI ATA controler. As I recall the two issues I had where a > bogus fstab entry and not creating all the necessicary entries to get > ad4s1a in /dev. Hmmm... Editing /etc/fstab before moving the disk does seem to work, but looking through sys/kern/vfs_conf.c convinces me there's a bug in here somewhere. As far as I can tell: * It is really the _loader_ that reads /etc/fstab to get the root device name. This name is then passed to the kernel. * The kernel tries several different devices in an attempt to mount the root filesystem. This includes the value provided by the loader, a variety of optional compiled-in defaults, and finally, a value typed by the user. * This last option does not work and it should. It's not clear why vfs_mountroot_ask() never works, but it doesn't. Based on the code, you should be able to take a bootable disk from ad0, move it to ad4, boot it, get a kernel "Root mount failure" message, type in the real root device at the prompt, and get to single-user mode. That this doesn't work concerns me: If my separate IDE controller blows up and I have to plug the drive back in as ad0, I'm going to be in big trouble if it won't boot. :( Tim Kientzle