Subject: kern/18135: dumping to an otherwise unused IDE disk doesn't work
To: None <gnats-bugs@gnats.netbsd.org>
From: None <M.Drochner@fz-juelich.de>
List: netbsd-bugs
Date: 08/31/2002 17:39:45
>Number:         18135
>Category:       kern
>Synopsis:       dumping to an otherwise unused IDE disk doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 31 09:04:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Drochner
>Release:        NetBSD 1.6G
>Organization:
	KFA Juelich
>Environment:
System: NetBSD zelz48 1.6G NetBSD 1.6G (ZELZ48) #17: Sat Aug 31 16:29:55 MEST 2002 drochner@zelz48:/usr/users/drochner/NetBSD-current/sys/arch/i386/compile/ZELZ48 i386
Architecture: i386
Machine: i386
>Description:
	a crashdump to a disk which doesn't have filesystems in use fails
with: "dump device bad" (on i386; on other architectures the diagnostic
message might look different, but the underlying problem is MI).
This is caused by the check:
	/* Make sure it was initialized. */
	if (wd->drvp->state < READY)
		return ENXIO;
in dev/ata/wd.c:1262
If I put a small filesystem onto that disk and mount it, the dump succeeds.
I also suspect that dumps in early startup don't work, whether the disk
das filesystems in use or not. (didn't check this)
>How-To-Repeat:
	dedicate an IDE disk as dump device. look at code
>Fix:
	add some initialisation code to wddump(), or perhaps wdattach()
>Release-Note:
>Audit-Trail:
>Unformatted: