Subject: port-i386/569: wd disk inaccessible errors if disklabel is fumbled
To: None <>
From: John Kohl <>
List: netbsd-bugs
Date: 11/11/1994 12:35:11
>Number:         569
>Category:       port-i386
>Synopsis:       if you fumble a disklabel on a wd drive, disk is inaccessible
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 11 12:35:10 1994
>Originator:     John Kohl
>Release:        1.0
System: NetBSD kolvir 1.0 NetBSD 1.0 (KOLVIR) #60: Sat Nov 5 08:56:32 EST 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386


I was installing a Dell 486DX4/100 last night.  While wrestling with the
partition tables, I ended up getting into a situation where I could not
recover using solely NetBSD.

Basically, I had set up the DOS disklabel to create a NetBSD partition
on the disk.  In the NetBSD partition I installed blank bootblocks by
something like:
	cat /usr/mdec/{wdboot,bootwd} >/tmp/blocks
	dd if=/tmp/blocks of=/tmp/xx conv=sync
	dd if=/tmp/xx of=/dev/rwd0c

The end result was that I had either an invalid or all-zero disk label
as far as BSD is concerned.  This resulted in any disk access (even by
disklabel) ended up generating "wdc0: controller error" or somesuch.

I theorize that somehow the kernel thought all the partitions were zero
sized, or otherwise got confused, and it just couldn't deal.

	see above
	Not sure; I don't have the time or machine to play with to see
exactly what I was screwing up.