Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Having serious booting problems...

From: John D. <lists(at)webcrunchers.com>
Date: Wed Nov 20 2002 - 20:01:40 EST


HELP! I am getting "panic: cannot open disk, 0x0/0x300, error 6".

Questions:
What is error 6 and which subroutine returns it? Look at dk_mountroot C functiion below.

I can't even determine the function doing the open, is it d_open()? It appears to be a field in a structure that contains a function pointer. We want to know what function it points to, during the boot phase. This function (somewhere in the kernel) is partially included below.

The function:

error = (cdevsw[major(rrootdev)].d_open)(rawdev, FREAD,

            S_IFCHR, curproc);

returns error 6. What is curproc? Appears to be a procedure, but can't seen to find what it is.

If so, where is the source for it? There's no man page. cdevsw seems to be a big table in RAM? How do I dump it? What does it contain? How do I trace this instruction?

Do you need help?X

How do I enter the kernel debugger from the command line? How do I exit it?
How do I save the "trace" and "ps" to a file to report? How can I do disk I/O from it (say, read sector #0?)

/* Snippet from kern/subr_disk.c: */

dk_mountroot()
{

	dev_t rawdev, rrootdev;
	int part = DISKPART(rootdev);
	int (*mountrootfn)(void);
	struct disklabel dl;
	int error;

	rrootdev = blktochr(rootdev);
	rawdev = MAKEDISKDEV(major(rrootdev), DISKUNIT(rootdev), RAW_PART);
	printf("rootdev=0x%x rrootdev=0x%x rawdev=0x%x\n", rootdev,
	    rrootdev, rawdev);

/* rootdev=0, rrootdev=0x300, rawdev=0x302 */
error = (cdevsw[major(rrootdev)].d_open)(rawdev, FREAD, S_IFCHR, curproc); if (error) panic("cannot open disk, 0x%x/0x%x, error %d", rootdev, rrootdev, error);

/* Returns error 6 */

Anyway - this is hard core stuff, but sometimes it takes digging at this level to try and find out why a system isn't booting. It apparently occurrs at the very earliest stage of the boot process.

Is there anyone out there that can answer these questions?

Regards
JD Received on Wed Nov 20 20:03:08 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:31:39 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library