Date: Fri, 21 May 1999 07:33:02 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: roger@cs.strath.ac.uk (Roger Hardiman) Cc: hackers@FreeBSD.ORG, small@FreeBSD.ORG Subject: Re: error 6: panic : cannot mount root(2) with PicoBSD current Message-ID: <199905202133.HAA05350@cimlogic.com.au> In-Reply-To: <3744577E.167E@cs.strath.ac.uk> from Roger Hardiman at "May 20, 1999 7:42: 6 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/param.h> /* dev_t (types.h)*/
#include <sys/kernel.h>
***************
*** 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905202133.HAA05350>
