From owner-freebsd-current Tue Sep 9 01:43:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA06061 for current-outgoing; Tue, 9 Sep 1997 01:43:48 -0700 (PDT) Received: from micron.efn.org (d198-232.uoregon.edu [128.223.198.232]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA06052 for ; Tue, 9 Sep 1997 01:43:45 -0700 (PDT) Received: (from mini@localhost) by micron.efn.org (8.8.5/8.8.5) id BAA03043; Tue, 9 Sep 1997 01:43:44 -0700 (PDT) Message-ID: <19970909014343.23842@micron.efn.org> Date: Tue, 9 Sep 1997 01:43:43 -0700 From: Jonathan Mini To: current@freebsd.org Subject: options DEVFS_ROOT breaks boot Reply-To: Jonathan Mini Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.76e X-files: The Truth is Out There. Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I have been playing with devfs recently and tried to use the DEVS_ROOT option (automatically mount devfs on /dev) but it break the boot if the kernel. The kernel panics from : ffs_mountroot: can't setup bdevvp for root panic: cannot mount root. The same thing happens with an MFS_ROOT kernel also. (I was working on one when I tried the DEVFS_ROOT option originally) Hoping to attach a patch in a pr, I poked around in the kernel (find . -name "*.c" | xargs grep DEVFS_ROOT | more) and it looks like the problem is that when DEVFS_ROOT is defined, a bdevvp in miscfs/devfs/devfs_tree is used in replacement of the bdevvp in kern/vfs_subr.c. In and adventurous spirit, I just removed the #ifdefs to swap the functions, so that the DEVFS_ROOT option only adds the d flag to init upon boot. Now DEVFS_ROOT works. I am curious, why was DEVFS_ROOT swaping the functions at all? Anybody want my patches for that wonder, or do you want to generate them yourselves. :) -- Jonathan Mini (j_mini@efn.org) Ingenious Productions Software Development P.O. Box 5693 Eugene, Or 97405