From owner-freebsd-hackers Thu May 20 14:18:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (Postfix) with ESMTP id CE7FF1587B; Thu, 20 May 1999 14:18:45 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id HAA05350; Fri, 21 May 1999 07:33:02 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199905202133.HAA05350@cimlogic.com.au> Subject: Re: error 6: panic : cannot mount root(2) with PicoBSD current In-Reply-To: <3744577E.167E@cs.strath.ac.uk> from Roger Hardiman at "May 20, 1999 7:42: 6 pm" To: roger@cs.strath.ac.uk (Roger Hardiman) Date: Fri, 21 May 1999 07:33:02 +1000 (EST) Cc: hackers@FreeBSD.ORG, small@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Roger Hardiman wrote: > Help > > I'm trying to get the PicoBSD code on -current compiling again > as it has got a bit stale. But I get a kernel Panic. > > > I brought the kernel config files up to date. Booting > with the 'dial' disk (build without ssh) panics with > > error 6: panic: cannot mount root (2) > > This comes just ater the sio and ie0 probes. > > I wonder if it has anything to do with the old entry > config kernel root on wd0 > > which the new config program ignores. In a kernel with only mfs, MFS_ROOT means _no_ rootdev. This breakage was caused by phk when he changed src/sys/kern/vfs_conf.c for his "jail" implementation. The problem is that with MFS_ROOT, the cpu_rootconf() function in src/i386/i386/autoconf.c correctly chooses mfs, but doesn't set the global rootdev variable that phk's code requires. I've reported this problem to current (got no response) and to phk (with a patch which he responded to with "what am I missing?"). Here is the patch I sent (cut'n'pasted from my copy of the email. so tabs are smashed). NB: I have an axe too. Mine is an Oz version though, so if I turn it over, it works like a hammer. I'll use it on Sunday (23rd) and commit this patch if nobody fixes the MFS_ROOT problem before then. Index: vfs_conf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_conf.c,v retrieving revision 1.26 diff -c -r1.26 vfs_conf.c *** vfs_conf.c 1998/09/14 19:56:40 1.26 --- vfs_conf.c 1999/05/11 09:53:33 *************** *** 52,57 **** --- 52,58 ---- * on SMP reentrancy */ #include "opt_bootp.h" + #include "opt_mfs.h" #include /* dev_t (types.h)*/ #include *************** *** 136,141 **** --- 137,145 ---- /* * Attempt the mount */ + #ifdef MFS_ROOT + err = VFS_MOUNT(mp, NULL, NULL, NULL, p); + #else err = ENXIO; orootdev = rootdev; if (rootdevs[0] == NODEV) *************** *** 154,159 **** --- 158,164 ---- if (err != ENXIO) break; } + #endif if (err) { /* * XXX should ask the user for the name in some cases. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message