NetBSD Problem Report #43430

From  Mon Jun  7 16:51:29 2010
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 1C6D363B8CF
	for <>; Mon,  7 Jun 2010 16:51:29 +0000 (UTC)
Message-Id: <>
Date: Mon,  7 Jun 2010 16:51:28 +0000 (UTC)
Subject: disklabel -i should not create overlapping partions (except unused)
X-Send-Pr-Version: www-1.0

>Number:         43430
>Category:       bin
>Synopsis:       disklabel -i should not create overlapping partions (except unused)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 07 16:55:00 +0000 2010
>Originator:     Rainer Glaschick
>Release:        NetBSD 5.1_RC2
NetBSD kerneu 5.1_RC2 NetBSD 5.1_RC2 (GENERIC) #0: Fri May 21 04:32:33 UTC 2010 i386

disklabel -i allows the user to define overlapping partitions. 

In particular, the indication of "'$' for all remaining" is misleading; it should at least read "'$' for end of disk", making clear that not the remaining space until the next used partition is meant. The man page is silent about this "feature", which is very dangerous.

Moreover, although new with NetBSD, I doubt that there are many cases where overlapping partitions in a disklabel are useful, except unused partitions like c and d. So I would prefer - in the interactive mode at least - that, before writing a disklabel, it should be checked for consistency, and acknowledge required for write if there are overlaps. 

Note that checking the consistency manually requires additions, as the display is in start/length notation, not in start/end notation. See also PR#5277

I marked the severity 'serious', because I think that it should not be so easy to create disklabels that lead to corrupted file systems.
Just enter $ for the size of a partition if there is another one behind.

Or make partition 'a' of 500MB size, and let partition 'b' start at 200MB

Check partitions with a pocket calculator before writing. 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.