Date: Fri, 09 May 2003 14:28:22 -0700 From: Tim Kientzle <kientzle@acm.org> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: freebsd-stable@freebsd.org Subject: Re: Can't boot from ad4: Device Not Configured? Message-ID: <3EBC1D76.2050009@acm.org> References: <20030508221553.B89449-100000@voo.doo.net> <3EBAC016.7020108@acm.org> <20030508204351.GA23694@Odin.AC.HMC.Edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EBC1D76.2050009>