Subject: bin/4564: newfs(8) can destroy non 4.2BSD partitions
To: None <>
From: Eric S. Hvozda <>
List: netbsd-bugs
Date: 11/22/1997 22:41:19
>Number:         4564
>Category:       bin
>Synopsis:       newfs(8) can destroy partitions not of type 4.2BSD
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 22 19:50:01 1997
>Originator:     Eric S. Hvozda
>Release:        NetBSD 1.3_ALPHA supped 22Nov97
System: NetBSD 1.3_ALPHA NetBSD 1.3_ALPHA (HELIOS) #0: Sat Nov 22 13:57:07 EST 1997 i386

	newfs(8) will destroy the contents of a non 4.2BSD disk
	slice.  Apparently newfs(8) doesn't check the slice type
	in the disklabel when attempting to initalize a raw device.
	Create a DOS partition; format it (under DOS of course).  Now
	add it to the disklabel (so that it may be mounted).  Now
	attempt initalize a FFS on it (I did this by a typo).  Discover
	very quickly that newfs(8) did indeed junk the DOS parition.
	newfs(8) should check the disklabel for type 4.2BSD.  I was under
	the impression that it did (didn't this fix go in a while ago?
	or was that only for swap slices?).