NetBSD Problem Report #540

From gnats  Sun Oct 30 00:17:36 1994
Received: from excalibur.entropic.com (root@excalibur.entropic.com [192.86.164.105]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id AAA01761 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 30 Oct 1994 00:17:25 -0700
Message-Id: <199410300719.CAA00793@excalibur.entropic.com>
Date: Sun, 30 Oct 1994 02:19:08 -0500
From: Ken Hornstein <kenh@excalibur.entropic.com>
Reply-To: kenh@entropic.com
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: People don't understand what the "overwriting disk.." message from disklabel means
X-Send-Pr-Version: 3.2

>Number:         540
>Category:       port-i386
>Synopsis:       People don't understand what the "overwriting disk.." message from disklabel means
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 30 00:20:01 +0000 1994
>Closed-Date:    Sat Jan 06 22:53:28 +0000 1996
>Last-Modified:  Sat Jan 06 22:54:27 +0000 1996
>Originator:     Ken Hornstein
>Release:        
>Organization:
"	"
>Environment:

System: NetBSD excalibur 1.0 NetBSD 1.0 (EXCALIBUR) #5: Wed Oct 26 03:26:15 EDT 1994 kenh@excalibur:/usr/src/sys/arch/i386/compile/EXCALIBUR i386


>Description:
People don't really understand what the "Overwriting disk with DOS partition
table" message you get from disklabel means.  And when someone _does_
understand it, they don't get any feedback as to _why_ disklabel thinks their
DOS and Unix partition setup doesn't jive.

>How-To-Repeat:
Have some inexperienced users try to install NetBSD on their drive and have
it co-exist with DOS.  Watch the partition tables get trashed :-)

>Fix:

The following patch will make a user think twice before hitting 'y', and also
give some possible reasons why you got that message.

--- disklabel.c.old	Sun Oct 30 01:34:18 1994
+++ disklabel.c	Sun Oct 30 02:08:00 1994
@@ -404,8 +404,24 @@
 			if (dosdp) {
 				int c;

-				printf("overwriting disk with DOS partition table? (n): ");
+				printf("Warning!!  A wrong answer to the question below could trash your disk!\n");
+				printf("\nYou have a DOS partition table that is not compatible with NetBSD.\n");
+				printf("This can be caused by one of three things:\n");
+				printf(" - a partition type that is not %d\n",
+					DOSPTYP_386BSD);
+				printf("   (Your partition type is %d)\n",
+					dosdp->dp_typ);
+				printf(" - a zero size for your Unix 'c' partition\n");
+				printf("   (Your 'c' partition is %d blocks)\n",
+					pp->p_size);
+				printf(" - the offset of your NetBSD MS-DOS partition not being the same as\n   the offset of your Unix 'c' partition\n");
+				printf("   (Your MS-DOS paritition offset is %d, your Unix 'c' partition\n    offset is %d)\n",
+					dosdp->dp_start, pp->p_offset);
+				printf("\nYou should only answer 'y' to the following question if you plan on using\n");
+				printf("your whole disk for NetBSD.  Otherwise hit 'n' and correct your\npartition table.\n");
+				printf("\nOverwriting disk with DOS partition table? (n): ");
 				fflush(stdout);
+				exit(0);
 				c = getchar();
 				if (c != EOF && c != '\n')
 					while (getchar() != '\n')
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Sat Jan 6 17:53:28 EST 1996 
State-Changed-Why:  
This has been taken care of in rev. 1.20 of disklabel.c, although terser than 
suggested here.. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.