From owner-freebsd-current@FreeBSD.ORG Tue Nov 11 08:32:40 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FFBE16A4CE for ; Tue, 11 Nov 2003 08:32:40 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7664543F93 for ; Tue, 11 Nov 2003 08:32:38 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id DAA10939; Wed, 12 Nov 2003 03:32:30 +1100 Date: Wed, 12 Nov 2003 03:32:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= In-Reply-To: Message-ID: <20031112031212.O1363@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: current@freebsd.org Subject: Re: boot0 and fdisk / disklabel misbehaviour X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 16:32:40 -0000 On Tue, 11 Nov 2003, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > I've been busy installing various OSes on a spare disk in order to try > to reproduce some of fefe's benchmarks. In the process, I've noticed > a couple of bogons in boot0 and disklabel: > > - disklabel -B trashes the partition table: > > # dd if=3D/dev/zero of=3D/dev/ad0 count=3D20 > # fdisk -i ad0 > (create a FreeBSD partition) > # disklabel -rw ad0s1 auto > # newfs -U /dev/ad0s1a > # disklabel -B ad0s1a > (this trashes the partition table) I think you mean bsdlabel. disklabel is just a link to bsdlabel in -current. This was fixed in rev.1.8 of disklabel.c, but the change was lost in bsdlabel. > This probably happens because fdisk silently allows the user to > create a partition that overlaps the partition table. Arguably > pilot error, but very confusing at the time, and fdisk should warn > about it. Yes. This is the dangerously undedicated case. Some consider this to be an error. I only ever used it for one drive. Bruce