Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2003 03:32:29 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no>
Cc:        current@freebsd.org
Subject:   Re: boot0 and fdisk / disklabel misbehaviour
Message-ID:  <20031112031212.O1363@gamplex.bde.org>
In-Reply-To: <xzp1xsfpaip.fsf@dwp.des.no>
References:  <xzp1xsfpaip.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031112031212.O1363>